Skip to content

Commit

Permalink
feat: Add missing sidecar and global parameter for deployments & hooks (
Browse files Browse the repository at this point in the history
  • Loading branch information
dromadaire54 authored Dec 4, 2024
1 parent def119d commit ac8143f
Show file tree
Hide file tree
Showing 49 changed files with 383 additions and 5 deletions.
13 changes: 12 additions & 1 deletion charts/sentry/templates/hooks/sentry-db-check.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,20 @@ spec:
securityContext:
{{ toYaml .Values.hooks.dbCheck.containerSecurityContext | indent 10 }}
{{- end }}
{{- if .Values.hooks.dbCheck.volumes }}
{{- if .Values.hooks.dbCheck.sidecars }}
{{ toYaml .Values.hooks.dbCheck.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if or .Values.hooks.dbCheck.volumes .Values.global.volumes }}
volumes:
{{- if .Values.hooks.dbCheck.volumes }}
{{ toYaml .Values.hooks.dbCheck.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- end }}
{{- if .Values.hooks.shareProcessNamespace }}
shareProcessNamespace: {{ .Values.hooks.shareProcessNamespace }}
Expand Down
6 changes: 6 additions & 0 deletions charts/sentry/templates/hooks/sentry-db-init.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,19 @@ spec:
{{- end }}
{{- if .Values.hooks.dbInit.sidecars }}
{{ toYaml .Values.hooks.dbInit.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ template "sentry.fullname" . }}-sentry
{{- if .Values.hooks.dbInit.volumes }}
{{ toYaml .Values.hooks.dbInit.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.hooks.shareProcessNamespace }}
shareProcessNamespace: {{ .Values.hooks.shareProcessNamespace }}
Expand Down
9 changes: 9 additions & 0 deletions charts/sentry/templates/hooks/snuba-db-init.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,22 @@ spec:
{{- if .Values.hooks.snubaInit.containerSecurityContext }}
securityContext:
{{ toYaml .Values.hooks.snubaInit.containerSecurityContext | indent 10 }}
{{- end }}
{{- if .Values.hooks.snubaInit.sidecars }}
{{ toYaml .Values.hooks.snubaInit.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ template "sentry.fullname" . }}-snuba
{{- if .Values.hooks.snubaInit.volumes }}
{{ toYaml .Values.hooks.snubaInit.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.hooks.shareProcessNamespace }}
shareProcessNamespace: {{ .Values.hooks.shareProcessNamespace }}
Expand Down
9 changes: 9 additions & 0 deletions charts/sentry/templates/hooks/snuba-migrate.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,22 @@ spec:
{{- if .Values.hooks.snubaMigrate.containerSecurityContext }}
securityContext:
{{ toYaml .Values.hooks.snubaMigrate.containerSecurityContext | indent 10 }}
{{- end }}
{{- if .Values.hooks.snubaMigrate.sidecars }}
{{ toYaml .Values.hooks.snubaMigrate.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ template "sentry.fullname" . }}-snuba
{{- if .Values.hooks.snubaInit.volumes }}
{{ toYaml .Values.hooks.snubaInit.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.hooks.shareProcessNamespace }}
shareProcessNamespace: {{ .Values.hooks.shareProcessNamespace }}
Expand Down
9 changes: 9 additions & 0 deletions charts/sentry/templates/hooks/user-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,22 @@ spec:
{{- if .Values.hooks.dbInit.containerSecurityContext }}
securityContext:
{{ toYaml .Values.hooks.dbInit.containerSecurityContext | indent 10 }}
{{- end }}
{{- if .Values.hooks.dbInit.sidecars }}
{{ toYaml .Values.hooks.dbInit.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
volumes:
- name: config
configMap:
name: {{ template "sentry.fullname" . }}-sentry
{{- if .Values.hooks.dbInit.volumes }}
{{ toYaml .Values.hooks.dbInit.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.hooks.shareProcessNamespace }}
shareProcessNamespace: {{ .Values.hooks.shareProcessNamespace }}
Expand Down
6 changes: 6 additions & 0 deletions charts/sentry/templates/relay/deployment-relay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ spec:
{{- end }}
{{- if .Values.relay.sidecars }}
{{ toYaml .Values.relay.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-relay
Expand All @@ -212,6 +215,9 @@ spec:
{{- end }}
{{- if .Values.relay.volumes }}
{{ toYaml .Values.relay.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.relay.priorityClassName }}
priorityClassName: "{{ .Values.relay.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ spec:
{{- end }}
{{- if .Values.sentry.cleanup.sidecars }}
{{ toYaml .Values.sentry.cleanup.sidecars | indent 10 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 10 }}
{{- end }}
restartPolicy: Never
volumes:
Expand All @@ -136,6 +139,9 @@ spec:
{{ end }}
{{- if .Values.sentry.cleanup.volumes }}
{{ toYaml .Values.sentry.cleanup.volumes | indent 10 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 10 }}
{{- end }}
{{- if .Values.sentry.cleanup.priorityClassName }}
priorityClassName: "{{ .Values.sentry.cleanup.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ spec:
{{- end }}
{{- if .Values.sentry.cron.sidecars }}
{{ toYaml .Values.sentry.cron.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-cron
Expand Down Expand Up @@ -141,6 +144,9 @@ spec:
{{ end }}
{{- if .Values.sentry.cron.volumes }}
{{ toYaml .Values.sentry.cron.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.cron.priorityClassName }}
priorityClassName: "{{ .Values.sentry.cron.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ spec:
{{- end }}
{{- if .Values.sentry.ingestConsumerAttachments.sidecars }}
{{ toYaml .Values.sentry.ingestConsumerAttachments.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-consumer-attachments
Expand Down Expand Up @@ -189,7 +192,10 @@ spec:
{{- if .Values.sentry.ingestConsumerAttachments.volumes }}
{{ toYaml .Values.sentry.ingestConsumerAttachments.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.ingestConsumerAttachments.priorityClassName }}
priorityClassName: "{{ .Values.sentry.ingestConsumerAttachments.priorityClassName }}"
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.ingestConsumerEvents.priorityClassName }}
priorityClassName: "{{ .Values.sentry.ingestConsumerEvents.priorityClassName }}"
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ spec:
{{- end }}
{{- if .Values.sentry.ingestConsumerEvents.sidecars }}
{{ toYaml .Values.sentry.ingestConsumerEvents.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-consumer-events
Expand Down Expand Up @@ -188,6 +191,9 @@ spec:
{{ end }}
{{- if .Values.sentry.ingestConsumerEvents.volumes }}
{{ toYaml .Values.sentry.ingestConsumerEvents.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.ingestConsumerEvents.priorityClassName }}
priorityClassName: "{{ .Values.sentry.ingestConsumerEvents.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ spec:
{{- end }}
{{- if .Values.sentry.ingestMonitors.sidecars }}
{{ toYaml .Values.sentry.ingestMonitors.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-monitors
Expand Down Expand Up @@ -167,6 +170,9 @@ spec:
{{ end }}
{{- if .Values.sentry.ingestMonitors.volumes }}
{{ toYaml .Values.sentry.ingestMonitors.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.ingestMonitors.priorityClassName }}
priorityClassName: "{{ .Values.sentry.ingestMonitors.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ spec:
{{- end }}
{{- if .Values.sentry.ingestOccurrences.sidecars }}
{{ toYaml .Values.sentry.ingestOccurrences.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-occurrences
Expand Down Expand Up @@ -167,6 +170,9 @@ spec:
{{ end }}
{{- if .Values.sentry.ingestOccurrences.volumes }}
{{ toYaml .Values.sentry.ingestOccurrences.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.ingestOccurrences.priorityClassName }}
priorityClassName: "{{ .Values.sentry.ingestOccurrences.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ spec:
{{- end }}
{{- if .Values.sentry.ingestProfiles.sidecars }}
{{ toYaml .Values.sentry.ingestProfiles.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-profiles
Expand Down Expand Up @@ -167,6 +170,9 @@ spec:
{{ end }}
{{- if .Values.sentry.ingestProfiles.volumes }}
{{ toYaml .Values.sentry.ingestProfiles.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.ingestProfiles.priorityClassName }}
priorityClassName: "{{ .Values.sentry.ingestProfiles.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ spec:
{{- end }}
{{- if .Values.sentry.ingestReplayRecordings.sidecars }}
{{ toYaml .Values.sentry.ingestReplayRecordings.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-ingest-replay-recordings
Expand Down Expand Up @@ -167,6 +170,9 @@ spec:
{{ end }}
{{- if .Values.sentry.ingestReplayRecordings.volumes }}
{{ toYaml .Values.sentry.ingestReplayRecordings.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.ingestReplayRecordings.priorityClassName }}
priorityClassName: "{{ .Values.sentry.ingestReplayRecordings.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ spec:
{{- end }}
{{- if .Values.sentry.billingMetricsConsumer.sidecars }}
{{ toYaml .Values.sentry.billingMetricsConsumer.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-billing-metrics-consumer
Expand Down Expand Up @@ -168,6 +171,9 @@ spec:
{{ end }}
{{- if .Values.sentry.billingMetricsConsumer.volumes }}
{{ toYaml .Values.sentry.billingMetricsConsumer.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.billingMetricsConsumer.priorityClassName }}
priorityClassName: "{{ .Values.sentry.billingMetricsConsumer.priorityClassName }}"
Expand Down
13 changes: 12 additions & 1 deletion charts/sentry/templates/sentry/metrics/deployment-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,20 @@ spec:
securityContext:
{{ toYaml .Values.metrics.containerSecurityContext | indent 10 }}
{{- end }}
{{- if .Values.metrics.volumes }}
{{- if .Values.metrics.sidecars }}
{{ toYaml .Values.metrics.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if or .Values.metrics.volumes .Values.global.volumes }}
volumes:
{{- if .Values.metrics.volumes }}
{{ toYaml .Values.metrics.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- end }}

{{- if .Values.serviceAccount.enabled }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ spec:
{{- end }}
{{- if .Values.sentry.metricsConsumer.sidecars }}
{{ toYaml .Values.sentry.metricsConsumer.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-metrics-consumer
Expand Down Expand Up @@ -178,6 +181,9 @@ spec:
{{ end }}
{{- if .Values.sentry.metricsConsumer.volumes }}
{{ toYaml .Values.sentry.metricsConsumer.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.metricsConsumer.priorityClassName }}
priorityClassName: "{{ .Values.sentry.metricsConsumer.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ spec:
{{- end }}
{{- if .Values.sentry.genericMetricsConsumer.sidecars }}
{{ toYaml .Values.sentry.genericMetricsConsumer.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-generic-metrics-consumer
Expand Down Expand Up @@ -178,6 +181,9 @@ spec:
{{ end }}
{{- if .Values.sentry.genericMetricsConsumer.volumes }}
{{ toYaml .Values.sentry.genericMetricsConsumer.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.genericMetricsConsumer.priorityClassName }}
priorityClassName: "{{ .Values.sentry.genericMetricsConsumer.priorityClassName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ spec:
{{- end }}
{{- if .Values.sentry.postProcessForwardErrors.sidecars }}
{{ toYaml .Values.sentry.postProcessForwardErrors.sidecars | indent 6 }}
{{- end }}
{{- if .Values.global.sidecars }}
{{ toYaml .Values.global.sidecars | indent 6 }}
{{- end }}
{{- if .Values.serviceAccount.enabled }}
serviceAccountName: {{ .Values.serviceAccount.name }}-post-process-forwarder-errors
Expand Down Expand Up @@ -165,6 +168,9 @@ spec:
{{ end }}
{{- if .Values.sentry.postProcessForwardErrors.volumes }}
{{ toYaml .Values.sentry.postProcessForwardErrors.volumes | indent 6 }}
{{- end }}
{{- if .Values.global.volumes }}
{{ toYaml .Values.global.volumes | indent 6 }}
{{- end }}
{{- if .Values.sentry.postProcessForwardErrors.priorityClassName }}
priorityClassName: "{{ .Values.sentry.postProcessForwardErrors.priorityClassName }}"
Expand Down
Loading

0 comments on commit ac8143f

Please sign in to comment.