diff --git a/sentry-db/Chart.yaml b/sentry-db/Chart.yaml index 9667c104c..45b5fbe60 100644 --- a/sentry-db/Chart.yaml +++ b/sentry-db/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: sentry-db description: A Helm chart for Kubernetes type: application -version: 0.5.0 +version: 0.6.0 appVersion: 10.0.0 dependencies: - name: redis diff --git a/sentry/Chart.yaml b/sentry/Chart.yaml index 6e01ba037..e0d9936a4 100644 --- a/sentry/Chart.yaml +++ b/sentry/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: sentry description: A Helm chart for Kubernetes type: application -version: 0.5.0 +version: 0.6.0 appVersion: 10.0.0 diff --git a/sentry/templates/deployment-sentry-worker-redis.yaml b/sentry/templates/deployment-sentry-worker-redis.yaml new file mode 100644 index 000000000..cb69044f2 --- /dev/null +++ b/sentry/templates/deployment-sentry-worker-redis.yaml @@ -0,0 +1,106 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "sentry.prefix" . }}sentry-worker-redis + labels: + app: sentry + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + selector: + matchLabels: + app: sentry + release: "{{ .Release.Name }}" + role: sentry-worker-redis + replicas: {{ .Values.sentry.worker.replicas }} + template: + metadata: + annotations: + checksum/configYml: {{ .Values.config.yaml | sha256sum }} + checksum/sentryConfPy: {{ .Values.config.py | sha256sum }} + checksum/config.yaml: {{ include (print $.Template.BasePath "/configmap-sentry.yaml") . | sha256sum }} + {{- if .Values.sentry.worker.annotations }} +{{ toYaml .Values.sentry.worker.annotations | indent 8 }} + {{- end }} + labels: + app: sentry + release: "{{ .Release.Name }}" + role: sentry-worker-redis + {{- if .Values.sentry.worker.podLabels }} +{{ toYaml .Values.sentry.worker.podLabels | indent 8 }} + {{- end }} + spec: + affinity: + {{- if .Values.sentry.worker.affinity }} +{{ toYaml .Values.sentry.worker.affinity | indent 8 }} + {{- end }} + {{- if .Values.sentry.worker.nodeSelector }} + nodeSelector: +{{ toYaml .Values.sentry.worker.nodeSelector | indent 8 }} + {{- end }} + {{- if .Values.sentry.worker.tolerations }} + tolerations: +{{ toYaml .Values.sentry.worker.tolerations | indent 8 }} + {{- end }} + {{- if .Values.images.sentry.imagePullSecrets }} + imagePullSecrets: +{{ toYaml .Values.images.sentry.imagePullSecrets | indent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }}-worker + image: "{{ .Values.images.sentry.repository }}:{{ .Values.images.sentry.tag }}" + imagePullPolicy: {{ .Values.images.sentry.pullPolicy }} + command: ["sentry"] + args: + - "run" + - "worker" + {{- if .Values.sentry.worker.concurrency }} + - "-c" + - "{{ .Values.sentry.worker.concurrency }}" + {{- end }} + env: + - name: SNUBA + value: http://{{ template "sentry.prefix" . }}snuba + - name: C_FORCE_ROOT + value: "true" + - name: BROKER_URL + value: redis://redis-master:6379/0 + {{ if eq .Values.filestore.backend "gcs" }} + - name: GOOGLE_APPLICATION_CREDENTIALS + value: /var/run/secrets/google/{{ .Values.filestore.gcs.credentialsFile }} + {{ end }} +{{- if .Values.sentry.worker.env }} +{{ toYaml .Values.sentry.worker.env | indent 8 }} +{{- end }} + volumeMounts: + - mountPath: /etc/sentry + name: config + readOnly: true + - mountPath: {{ .Values.filestore.filesystem.path }} + name: sentry-data + {{- if eq .Values.filestore.backend "gcs" }} + - name: sentry-google-cloud-key + mountPath: /var/run/secrets/google + {{ end }} + resources: +{{ toYaml .Values.sentry.worker.resources | indent 12 }} + volumes: + - name: config + configMap: + name: {{ template "sentry.prefix" . }}sentry + - name: sentry-data + {{- if and (eq .Values.filestore.backend "filesystem") .Values.filestore.filesystem.persistence.enabled }} + persistentVolumeClaim: + claimName: {{ .Values.filestore.filesystem.persistence.existingClaim | default (include "sentry.fullname" .) }} + {{- else }} + emptyDir: {} + {{ end }} + {{- if eq .Values.filestore.backend "gcs" }} + - name: sentry-google-cloud-key + secret: + secretName: {{ .Values.filestore.gcs.secretName }} + {{ end }} + {{- if .Values.sentry.worker.priorityClassName }} + priorityClassName: "{{ .Values.sentry.worker.priorityClassName }}" + {{- end }} \ No newline at end of file