Skip to content

Commit

Permalink
feat: Introduce global tolerations across all components (#1580)
Browse files Browse the repository at this point in the history
  • Loading branch information
patsevanton authored Oct 26, 2024
1 parent ff65a5c commit 7b48399
Show file tree
Hide file tree
Showing 53 changed files with 157 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/sentry/templates/hooks/sentry-db-check.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ spec:
{{- if .Values.hooks.dbCheck.tolerations }}
tolerations:
{{ toYaml .Values.hooks.dbCheck.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
restartPolicy: Never
{{- if .Values.hooks.dbCheck.image.imagePullSecrets }}
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/hooks/sentry-db-init.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ spec:
{{- if .Values.hooks.dbInit.tolerations }}
tolerations:
{{ toYaml .Values.hooks.dbInit.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
restartPolicy: Never
{{- if .Values.images.sentry.imagePullSecrets }}
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/hooks/snuba-db-init.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.hooks.snubaInit.tolerations }}
tolerations:
{{ toYaml .Values.hooks.snubaInit.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
restartPolicy: Never
{{- if .Values.images.snuba.imagePullSecrets }}
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/hooks/snuba-migrate.job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.hooks.snubaInit.tolerations }}
tolerations:
{{ toYaml .Values.hooks.snubaInit.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
restartPolicy: Never
{{- if .Values.images.snuba.imagePullSecrets }}
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/hooks/user-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
{{- if .Values.hooks.dbInit.tolerations }}
tolerations:
{{ toYaml .Values.hooks.dbInit.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.images.sentry.imagePullSecrets }}
imagePullSecrets:
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/relay/deployment-relay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ spec:
{{- if .Values.relay.tolerations }}
tolerations:
{{ toYaml .Values.relay.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.relay.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
{{- if .Values.sentry.cleanup.tolerations }}
tolerations:
{{ toYaml .Values.sentry.cleanup.tolerations | indent 12 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 12 }}
{{- end }}
{{- if .Values.dnsPolicy }}
dnsPolicy: {{ .Values.dnsPolicy | quote }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ spec:
{{- if .Values.sentry.cron.tolerations }}
tolerations:
{{ toYaml .Values.sentry.cron.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.cron.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
{{- if .Values.sentry.ingestConsumerAttachments.tolerations }}
tolerations:
{{ toYaml .Values.sentry.ingestConsumerAttachments.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.ingestConsumerAttachments.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
{{- if .Values.sentry.ingestConsumerEvents.tolerations }}
tolerations:
{{ toYaml .Values.sentry.ingestConsumerEvents.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.ingestConsumerEvents.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
{{- if .Values.sentry.ingestMonitors.tolerations }}
tolerations:
{{ toYaml .Values.sentry.ingestMonitors.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.ingestMonitors.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
{{- if .Values.sentry.ingestOccurrences.tolerations }}
tolerations:
{{ toYaml .Values.sentry.ingestOccurrences.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.ingestOccurrences.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
{{- if .Values.sentry.ingestProfiles.tolerations }}
tolerations:
{{ toYaml .Values.sentry.ingestProfiles.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.ingestProfiles.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
{{- if .Values.sentry.ingestReplayRecordings.tolerations }}
tolerations:
{{ toYaml .Values.sentry.ingestReplayRecordings.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.ingestReplayRecordings.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
{{- if .Values.sentry.ingestConsumerTransactions.tolerations }}
tolerations:
{{ toYaml .Values.sentry.ingestConsumerTransactions.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.ingestConsumerTransactions.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ spec:
{{- if .Values.sentry.billingMetricsConsumer.tolerations }}
tolerations:
{{ toYaml .Values.sentry.billingMetricsConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.billingMetricsConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ spec:
{{- if .Values.metrics.tolerations }}
tolerations:
{{ toYaml .Values.metrics.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.metrics.schedulerName }}
schedulerName: "{{ .Values.metrics.schedulerName }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.metricsConsumer.tolerations }}
tolerations:
{{ toYaml .Values.sentry.metricsConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.metricsConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.genericMetricsConsumer.tolerations }}
tolerations:
{{ toYaml .Values.sentry.genericMetricsConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.genericMetricsConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.postProcessForwardErrors.tolerations }}
tolerations:
{{ toYaml .Values.sentry.postProcessForwardErrors.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.postProcessForwardErrors.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.postProcessForwardIssuePlatform.tolerations }}
tolerations:
{{ toYaml .Values.sentry.postProcessForwardIssuePlatform.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.postProcessForwardIssuePlatform.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.postProcessForwardTransactions.tolerations }}
tolerations:
{{ toYaml .Values.sentry.postProcessForwardTransactions.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.postProcessForwardTransactions.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.subscriptionConsumerEvents.tolerations }}
tolerations:
{{ toYaml .Values.sentry.subscriptionConsumerEvents.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.subscriptionConsumerEvents.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.subscriptionConsumerGenericMetrics.tolerations }}
tolerations:
{{ toYaml .Values.sentry.subscriptionConsumerGenericMetrics.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.subscriptionConsumerGenericMetrics.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.subscriptionConsumerMetrics.tolerations }}
tolerations:
{{ toYaml .Values.sentry.subscriptionConsumerMetrics.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.subscriptionConsumerMetrics.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ spec:
{{- if .Values.sentry.subscriptionConsumerTransactions.tolerations }}
tolerations:
{{ toYaml .Values.sentry.subscriptionConsumerTransactions.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.subscriptionConsumerTransactions.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/sentry/vroom/deployment-vroom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.vroom.tolerations }}
tolerations:
{{ toYaml .Values.vroom.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.vroom.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/sentry/web/deployment-sentry-web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ spec:
{{- if .Values.sentry.web.tolerations }}
tolerations:
{{ toYaml .Values.sentry.web.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.web.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
{{- if .Values.sentry.workerEvents.tolerations }}
tolerations:
{{ toYaml .Values.sentry.workerEvents.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.workerEvents.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
{{- if .Values.sentry.workerTransactions.tolerations }}
tolerations:
{{ toYaml .Values.sentry.workerTransactions.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.workerTransactions.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ spec:
{{- if .Values.sentry.worker.tolerations }}
tolerations:
{{ toYaml .Values.sentry.worker.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.sentry.worker.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/snuba/deployment-snuba-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ spec:
{{- if .Values.snuba.api.tolerations }}
tolerations:
{{ toYaml .Values.snuba.api.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.api.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
3 changes: 3 additions & 0 deletions charts/sentry/templates/snuba/deployment-snuba-consumer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.snuba.consumer.tolerations }}
tolerations:
{{ toYaml .Values.snuba.consumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.consumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.snuba.genericMetricsCountersConsumer.tolerations }}
tolerations:
{{ toYaml .Values.snuba.genericMetricsCountersConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.genericMetricsCountersConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.snuba.genericMetricsDistributionConsumer.tolerations }}
tolerations:
{{ toYaml .Values.snuba.genericMetricsDistributionConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.genericMetricsDistributionConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.snuba.genericMetricsSetsConsumer.tolerations }}
tolerations:
{{ toYaml .Values.snuba.genericMetricsSetsConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.genericMetricsSetsConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.snuba.groupAttributesConsumer.tolerations }}
tolerations:
{{ toYaml .Values.snuba.groupAttributesConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.groupAttributesConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.snuba.issueOccurrenceConsumer.tolerations }}
tolerations:
{{ toYaml .Values.snuba.issueOccurrenceConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.issueOccurrenceConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.snuba.metricsConsumer.tolerations }}
tolerations:
{{ toYaml .Values.snuba.metricsConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.metricsConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ spec:
{{- if .Values.snuba.outcomesBillingConsumer.tolerations }}
tolerations:
{{ toYaml .Values.snuba.outcomesBillingConsumer.tolerations | indent 8 }}
{{- else if .Values.global.tolerations }}
tolerations:
{{ toYaml .Values.global.tolerations | indent 8 }}
{{- end }}
{{- if .Values.snuba.outcomesBillingConsumer.topologySpreadConstraints }}
topologySpreadConstraints:
Expand Down
Loading

0 comments on commit 7b48399

Please sign in to comment.