|
| 1 | +{{- if .Values.sentry.ingestFeedback.enabled }} |
| 2 | +apiVersion: apps/v1 |
| 3 | +kind: Deployment |
| 4 | +metadata: |
| 5 | + name: {{ template "sentry.fullname" . }}-ingest-feedback |
| 6 | + labels: |
| 7 | + app: {{ template "sentry.fullname" . }} |
| 8 | + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" |
| 9 | + release: "{{ .Release.Name }}" |
| 10 | + heritage: "{{ .Release.Service }}" |
| 11 | + app.kubernetes.io/managed-by: "Helm" |
| 12 | + {{- if .Values.asHook }} |
| 13 | + {{- /* Add the Helm annotations so that deployment after asHook from true to false works */}} |
| 14 | + annotations: |
| 15 | + meta.helm.sh/release-name: "{{ .Release.Name }}" |
| 16 | + meta.helm.sh/release-namespace: "{{ .Release.Namespace }}" |
| 17 | + "helm.sh/hook": "post-install,post-upgrade" |
| 18 | + "helm.sh/hook-weight": "10" |
| 19 | + {{- end }} |
| 20 | +spec: |
| 21 | + revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} |
| 22 | + selector: |
| 23 | + matchLabels: |
| 24 | + app: {{ template "sentry.fullname" . }} |
| 25 | + release: "{{ .Release.Name }}" |
| 26 | + role: ingest-feedback |
| 27 | +{{- if not .Values.sentry.ingestFeedback.autoscaling.enabled }} |
| 28 | + replicas: {{ .Values.sentry.ingestFeedback.replicas }} |
| 29 | +{{- end }} |
| 30 | + template: |
| 31 | + metadata: |
| 32 | + annotations: |
| 33 | + checksum/configYml: {{ .Values.config.configYml | toYaml | toString | sha256sum }} |
| 34 | + checksum/sentryConfPy: {{ .Values.config.sentryConfPy | sha256sum }} |
| 35 | + checksum/config.yaml: {{ include "sentry.config" . | sha256sum }} |
| 36 | + {{- if .Values.sentry.ingestFeedback.annotations }} |
| 37 | +{{ toYaml .Values.sentry.ingestFeedback.annotations | indent 8 }} |
| 38 | + {{- end }} |
| 39 | + labels: |
| 40 | + app: {{ template "sentry.fullname" . }} |
| 41 | + release: "{{ .Release.Name }}" |
| 42 | + role: ingest-feedback |
| 43 | + {{- if .Values.sentry.ingestFeedback.podLabels }} |
| 44 | +{{ toYaml .Values.sentry.ingestFeedback.podLabels | indent 8 }} |
| 45 | + {{- end }} |
| 46 | + spec: |
| 47 | + affinity: |
| 48 | + {{- if .Values.sentry.ingestFeedback.affinity }} |
| 49 | +{{ toYaml .Values.sentry.ingestFeedback.affinity | indent 8 }} |
| 50 | + {{- end }} |
| 51 | + {{- if .Values.sentry.ingestFeedback.nodeSelector }} |
| 52 | + nodeSelector: |
| 53 | +{{ toYaml .Values.sentry.ingestFeedback.nodeSelector | indent 8 }} |
| 54 | + {{- else if .Values.global.nodeSelector }} |
| 55 | + nodeSelector: |
| 56 | +{{ toYaml .Values.global.nodeSelector | indent 8 }} |
| 57 | + {{- end }} |
| 58 | + {{- if .Values.sentry.ingestFeedback.tolerations }} |
| 59 | + tolerations: |
| 60 | +{{ toYaml .Values.sentry.ingestFeedback.tolerations | indent 8 }} |
| 61 | + {{- else if .Values.global.tolerations }} |
| 62 | + tolerations: |
| 63 | +{{ toYaml .Values.global.tolerations | indent 8 }} |
| 64 | + {{- end }} |
| 65 | + {{- if .Values.sentry.ingestFeedback.topologySpreadConstraints }} |
| 66 | + topologySpreadConstraints: |
| 67 | +{{ toYaml .Values.sentry.ingestFeedback.topologySpreadConstraints | indent 8 }} |
| 68 | + {{- end }} |
| 69 | + {{- if .Values.images.sentry.imagePullSecrets }} |
| 70 | + imagePullSecrets: |
| 71 | +{{ toYaml .Values.images.sentry.imagePullSecrets | indent 8 }} |
| 72 | + {{- end }} |
| 73 | + {{- if .Values.dnsPolicy }} |
| 74 | + dnsPolicy: {{ .Values.dnsPolicy | quote }} |
| 75 | + {{- end }} |
| 76 | + {{- if .Values.dnsConfig }} |
| 77 | + dnsConfig: |
| 78 | +{{ toYaml .Values.dnsConfig | indent 8 }} |
| 79 | + {{- end }} |
| 80 | + {{- if .Values.sentry.ingestFeedback.securityContext }} |
| 81 | + securityContext: |
| 82 | +{{ toYaml .Values.sentry.ingestFeedback.securityContext | indent 8 }} |
| 83 | + {{- end }} |
| 84 | + containers: |
| 85 | + - name: {{ .Chart.Name }}-ingest-feedback |
| 86 | + image: "{{ template "sentry.image" . }}" |
| 87 | + imagePullPolicy: {{ default "IfNotPresent" .Values.images.sentry.pullPolicy }} |
| 88 | + command: ["sentry"] |
| 89 | + args: |
| 90 | + - "run" |
| 91 | + - "consumer" |
| 92 | + - "ingest-feedback-events" |
| 93 | + - "--consumer-group" |
| 94 | + - "ingest-feedback" |
| 95 | + {{- if .Values.sentry.ingestFeedback.autoOffsetReset }} |
| 96 | + - "--auto-offset-reset" |
| 97 | + - "{{ .Values.sentry.ingestFeedback.autoOffsetReset }}" |
| 98 | + {{- end }} |
| 99 | + {{- if .Values.sentry.ingestFeedback.noStrictOffsetReset }} |
| 100 | + - "--no-strict-offset-reset" |
| 101 | + {{- end }} |
| 102 | + {{- if .Values.sentry.ingestFeedback.livenessProbe.enabled }} |
| 103 | + - "--healthcheck-file-path" |
| 104 | + - "/tmp/health.txt" |
| 105 | + {{- end }} |
| 106 | + {{- if .Values.sentry.ingestFeedback.livenessProbe.enabled }} |
| 107 | + livenessProbe: |
| 108 | + exec: |
| 109 | + command: |
| 110 | + - rm |
| 111 | + - /tmp/health.txt |
| 112 | + initialDelaySeconds: {{ .Values.sentry.ingestFeedback.livenessProbe.initialDelaySeconds }} |
| 113 | + periodSeconds: {{ .Values.sentry.ingestFeedback.livenessProbe.periodSeconds }} |
| 114 | + {{- end }} |
| 115 | + env: |
| 116 | + - name: C_FORCE_ROOT |
| 117 | + value: "true" |
| 118 | +{{ include "sentry.env" . | indent 8 }} |
| 119 | +{{- if .Values.sentry.ingestFeedback.env }} |
| 120 | +{{ toYaml .Values.sentry.ingestFeedback.env | indent 8 }} |
| 121 | +{{- end }} |
| 122 | + volumeMounts: |
| 123 | + - mountPath: /etc/sentry |
| 124 | + name: config |
| 125 | + readOnly: true |
| 126 | + - mountPath: {{ .Values.filestore.filesystem.path }} |
| 127 | + name: sentry-data |
| 128 | + {{- if and (eq .Values.filestore.backend "gcs") .Values.filestore.gcs.secretName }} |
| 129 | + - name: sentry-google-cloud-key |
| 130 | + mountPath: /var/run/secrets/google |
| 131 | + {{ end }} |
| 132 | +{{- if .Values.sentry.ingestFeedback.volumeMounts }} |
| 133 | +{{ toYaml .Values.sentry.ingestFeedback.volumeMounts | indent 8 }} |
| 134 | +{{- end }} |
| 135 | + resources: |
| 136 | +{{ toYaml .Values.sentry.ingestFeedback.resources | indent 12 }} |
| 137 | +{{- if .Values.sentry.ingestFeedback.containerSecurityContext }} |
| 138 | + securityContext: |
| 139 | +{{ toYaml .Values.sentry.ingestFeedback.containerSecurityContext | indent 12 }} |
| 140 | +{{- end }} |
| 141 | +{{- if .Values.sentry.ingestFeedback.sidecars }} |
| 142 | +{{ toYaml .Values.sentry.ingestFeedback.sidecars | indent 6 }} |
| 143 | +{{- end }} |
| 144 | +{{- if .Values.global.sidecars }} |
| 145 | +{{ toYaml .Values.global.sidecars | indent 6 }} |
| 146 | +{{- end }} |
| 147 | + {{- if .Values.serviceAccount.enabled }} |
| 148 | + serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-feedback |
| 149 | + {{- end }} |
| 150 | + volumes: |
| 151 | + - name: config |
| 152 | + configMap: |
| 153 | + name: {{ template "sentry.fullname" . }}-sentry |
| 154 | + - name: sentry-data |
| 155 | + {{- if and (eq .Values.filestore.backend "filesystem") .Values.filestore.filesystem.persistence.enabled (.Values.filestore.filesystem.persistence.persistentWorkers) }} |
| 156 | + {{- if .Values.filestore.filesystem.persistence.existingClaim }} |
| 157 | + persistentVolumeClaim: |
| 158 | + claimName: {{ .Values.filestore.filesystem.persistence.existingClaim }} |
| 159 | + {{- else }} |
| 160 | + persistentVolumeClaim: |
| 161 | + claimName: {{ template "sentry.fullname" . }}-data |
| 162 | + {{- end }} |
| 163 | + {{- else }} |
| 164 | + emptyDir: {} |
| 165 | + {{ end }} |
| 166 | + {{- if and (eq .Values.filestore.backend "gcs") .Values.filestore.gcs.secretName }} |
| 167 | + - name: sentry-google-cloud-key |
| 168 | + secret: |
| 169 | + secretName: {{ .Values.filestore.gcs.secretName }} |
| 170 | + {{ end }} |
| 171 | +{{- if .Values.sentry.ingestFeedback.volumes }} |
| 172 | +{{ toYaml .Values.sentry.ingestFeedback.volumes | indent 6 }} |
| 173 | +{{- end }} |
| 174 | +{{- if .Values.global.volumes }} |
| 175 | +{{ toYaml .Values.global.volumes | indent 6 }} |
| 176 | +{{- end }} |
| 177 | + {{- if .Values.sentry.ingestFeedback.priorityClassName }} |
| 178 | + priorityClassName: "{{ .Values.sentry.ingestFeedback.priorityClassName }}" |
| 179 | + {{- end }} |
| 180 | +{{- end }} |
0 commit comments