Skip to content

Commit 91f8bd6

Browse files
committed
add support for topologyspreadconstraints in all subcharts
1 parent 230015b commit 91f8bd6

File tree

32 files changed

+99
-11
lines changed

32 files changed

+99
-11
lines changed

Diff for: charts/operator-wandb/Chart.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ dependencies:
4848
repository: file://charts/yace
4949
version: 0.1.0
5050
digest: sha256:c3cd39db4bfcb9f25b1e666b9786d28b5045d3337bfdd98a6d9a1be2c6b075b5
51-
generated: "2024-11-20T14:26:55.38318-08:00"
51+
generated: "2024-12-04T19:15:36.497729+05:30"

Diff for: charts/operator-wandb/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: operator-wandb
33
description: A Helm chart for deploying W&B to Kubernetes
44
type: application
5-
version: 0.19.4
5+
version: 0.19.5
66
appVersion: 1.0.0
77
icon: https://wandb.ai/logo.svg
88

Diff for: charts/operator-wandb/charts/console/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
{{- include "wandb.nodeSelector" . | nindent 6 }}
4343
{{- include "wandb.priorityClassName" . | nindent 6 }}
4444
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
45+
{{- if .Values.topologySpreadConstraints.enabled }}
46+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "console.labels" .))) | nindent 6 }}
47+
{{- end }}
4548
# Extend the pods shutdown grace period from the default of 30s to 60s.
4649
# This goes in the pod template spec.
4750
terminationGracePeriodSeconds: 60

Diff for: charts/operator-wandb/charts/console/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ container:
4949
readOnlyRootFilesystem: false
5050
privileged: false
5151

52+
topologySpreadConstraints:
53+
enabled: false
54+
5255
service:
5356
type: ClusterIP
5457
annotations: {}

Diff for: charts/operator-wandb/charts/executor/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ spec:
4545
{{- include "wandb.nodeSelector" . | nindent 6 }}
4646
{{- include "wandb.priorityClassName" . | nindent 6 }}
4747
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
48+
{{- if .Values.topologySpreadConstraints.enabled }}
49+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "executor.labels" .))) | nindent 6 }}
50+
{{- end }}
4851
# needed to ensure ensure Kafka consumers handle pod termination gracefully and avoid data loss
4952
terminationGracePeriodSeconds: 60
5053
containers:

Diff for: charts/operator-wandb/charts/executor/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ container:
5353
readOnlyRootFilesystem: false
5454
privileged: false
5555

56+
topologySpreadConstraints:
57+
enabled: false
58+
5659
common:
5760
labels: {}
5861

Diff for: charts/operator-wandb/charts/filestream/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ spec:
4545
{{- include "wandb.nodeSelector" . | nindent 6 }}
4646
{{- include "wandb.priorityClassName" . | nindent 6 }}
4747
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
48+
{{- if .Values.topologySpreadConstraints.enabled }}
49+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "filestream.labels" .))) | nindent 6 }}
50+
{{- end }}
4851
# needed to ensure ensure Kafka consumers handle pod termination gracefully and avoid data loss
4952
terminationGracePeriodSeconds: 60
5053
containers:

Diff for: charts/operator-wandb/charts/filestream/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ container:
5656
readOnlyRootFilesystem: false
5757
privileged: false
5858

59+
topologySpreadConstraints:
60+
enabled: false
61+
5962
common:
6063
labels: {}
6164

Diff for: charts/operator-wandb/charts/flat-run-fields-updater/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ spec:
4545
{{- include "wandb.nodeSelector" . | nindent 6 }}
4646
{{- include "wandb.priorityClassName" . | nindent 6 }}
4747
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
48+
{{- if .Values.topologySpreadConstraints.enabled }}
49+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "flat-run-fields-updater.labels" .))) | nindent 6 }}
50+
{{- end }}
4851
# needed to ensure ensure Kafka consumers handle pod termination gracefully and avoid data loss
4952
terminationGracePeriodSeconds: 60
5053
containers:

Diff for: charts/operator-wandb/charts/flat-run-fields-updater/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ container:
5252
readOnlyRootFilesystem: false
5353
privileged: false
5454

55+
topologySpreadConstraints:
56+
enabled: false
57+
5558
common:
5659
labels: {}
5760

Diff for: charts/operator-wandb/charts/mysql/templates/statefulset.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,13 @@ spec:
2929
{{- include "wandb.nodeSelector" . | nindent 6 }}
3030
{{- include "wandb.priorityClassName" . | nindent 6 }}
3131
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
32+
{{- if .Values.topologySpreadConstraints.enabled }}
33+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "mysql.labels" .))) | nindent 6 }}
34+
{{- end }}
3235
containers:
3336
- name: mysql
3437
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
35-
{{- include "wandb.podSecurityContext" .Values.container.securityContext | nindent 10 }}
38+
{{- include "wandb.containerSecurityContext" .Values.container.securityContext | nindent 10 }}
3639
ports:
3740
- name: mysql
3841
containerPort: 3306

Diff for: charts/operator-wandb/charts/mysql/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ container:
4545
readOnlyRootFilesystem: false
4646
privileged: false
4747

48+
topologySpreadConstraints:
49+
enabled: false
50+
4851
resources:
4952
requests:
5053
cpu: 500m

Diff for: charts/operator-wandb/charts/otel/charts/agent/templates/deamonset.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ spec:
4343
{{- include "wandb.nodeSelector" . | nindent 6 }}
4444
{{- include "wandb.priorityClassName" . | nindent 6 }}
4545
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
46+
{{- if .Values.topologySpreadConstraints.enabled }}
47+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "otelAgent.labels" .))) | nindent 6 }}
48+
{{- end }}
4649
containers:
4750
- name: {{ .Chart.Name }}
4851
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Diff for: charts/operator-wandb/charts/otel/charts/agent/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ spec:
4343
{{- include "wandb.nodeSelector" . | nindent 6 }}
4444
{{- include "wandb.priorityClassName" . | nindent 6 }}
4545
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
46+
{{- if .Values.topologySpreadConstraints.enabled }}
47+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "otelAgent.labels" .))) | nindent 6 }}
48+
{{- end }}
4649
containers:
4750
- name: {{ .Chart.Name }}
4851
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Diff for: charts/operator-wandb/charts/otel/charts/agent/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ container:
5151
readOnlyRootFilesystem: false
5252
privileged: false
5353

54+
topologySpreadConstraints:
55+
enabled: false
56+
5457
clusterRole:
5558
annotations: {}
5659
labels: {}

Diff for: charts/operator-wandb/charts/otel/values.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
daemonset:
22
install: true
33
mode: "daemonset"
4+
topologySpreadConstraints:
5+
enabled: false
46
presets:
57
receivers:
68
hostMetrics: true
@@ -29,6 +31,8 @@ daemonset:
2931
deployment:
3032
install: true
3133
mode: "deployment"
34+
topologySpreadConstraints:
35+
enabled: false
3236
presets:
3337
receivers:
3438
statsd: true

Diff for: charts/operator-wandb/charts/parquet/templates/cron.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
{{- include "wandb.nodeSelector" . | nindent 10 }}
4343
{{- include "wandb.priorityClassName" . | nindent 10 }}
4444
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 10 }}
45+
{{- if .Values.topologySpreadConstraints.enabled }}
46+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "parquet.labels" .))) | nindent 10 }}
47+
{{- end }}
4548
containers:
4649
- name: backfill-job
4750
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Diff for: charts/operator-wandb/charts/parquet/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ spec:
4444
{{- include "wandb.nodeSelector" . | nindent 6 }}
4545
{{- include "wandb.priorityClassName" . | nindent 6 }}
4646
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
47+
{{- if .Values.topologySpreadConstraints.enabled }}
48+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "parquet.labels" .))) | nindent 6 }}
49+
{{- end }}
4750
containers:
4851
- name: {{ .Chart.Name }}
4952
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Diff for: charts/operator-wandb/charts/parquet/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ container:
5454
allowPrivilegeEscalation: false
5555
readOnlyRootFilesystem: false
5656

57+
topologySpreadConstraints:
58+
enabled: false
59+
5760
resources:
5861
# We usually recommend not to specify default resources and to leave this as a
5962
# conscious choice for the user. This also increases chances charts run on

Diff for: charts/operator-wandb/charts/prometheus/charts/mysql-exporter/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
{{- include "wandb.nodeSelector" . | nindent 6 }}
4343
{{- include "wandb.priorityClassName" . | nindent 6 }}
4444
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
45+
{{- if .Values.topologySpreadConstraints.enabled }}
46+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "mysql-exporter.labels" .))) | nindent 6 }}
47+
{{- end }}
4548
containers:
4649
- name: {{ .Chart.Name }}
4750
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Diff for: charts/operator-wandb/charts/prometheus/charts/mysql-exporter/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ pod:
1919
labels: {}
2020
annotations: {}
2121

22+
topologySpreadConstraints:
23+
enabled: false
24+
2225
common:
2326
labels: {}
2427

Diff for: charts/operator-wandb/charts/prometheus/charts/redis-exporter/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ spec:
4141
{{- include "wandb.nodeSelector" . | nindent 6 }}
4242
{{- include "wandb.priorityClassName" . | nindent 6 }}
4343
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
44+
{{- if .Values.topologySpreadConstraints.enabled }}
45+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "redis-exporter.labels" .))) | nindent 6 }}
46+
{{- end }}
4447
containers:
4548
- name: {{ .Chart.Name }}
4649
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Diff for: charts/operator-wandb/charts/prometheus/charts/redis-exporter/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ pod:
1919
labels: {}
2020
annotations: {}
2121

22+
topologySpreadConstraints:
23+
enabled: false
24+
2225
common:
2326
labels: {}
2427

Diff for: charts/operator-wandb/charts/stackdriver/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ spec:
3535
{{- include "wandb.nodeSelector" . | nindent 6 }}
3636
{{- include "wandb.priorityClassName" . | nindent 6 }}
3737
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
38+
{{- if .Values.topologySpreadConstraints.enabled }}
39+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "stackdriver.labels" .))) | nindent 6 }}
40+
{{- end }}
3841
spec:
3942
containers:
4043
- name: {{ .Chart.Name }}

Diff for: charts/operator-wandb/charts/stackdriver/values.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@ container:
9999
readOnlyRootFilesystem: false
100100
privileged: false
101101

102-
102+
topologySpreadConstraints:
103+
enabled: false
104+
103105
deployment: {}
104106

105107
serviceAccount:

Diff for: charts/operator-wandb/charts/weave-trace/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ spec:
4040
{{- include "wandb.nodeSelector" . | nindent 6 }}
4141
{{- include "wandb.priorityClassName" . | nindent 6 }}
4242
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
43+
{{- if .Values.topologySpreadConstraints.enabled }}
44+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "weaveTrace.labels" .))) | nindent 6 }}
45+
{{- end }}
4346
{{- if not .Values.migration.useHook }}
4447
initContainers:
4548
- name: {{ include "weaveTraceMigrate.fullname" . }}

Diff for: charts/operator-wandb/charts/weave-trace/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ container:
4646
readOnlyRootFilesystem: false
4747
privileged: false
4848

49+
topologySpreadConstraints:
50+
enabled: false
51+
4952
resources:
5053
requests:
5154
cpu: 500m

Diff for: charts/operator-wandb/charts/weave/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ spec:
4343
{{- include "wandb.nodeSelector" . | nindent 6 }}
4444
{{- include "wandb.priorityClassName" . | nindent 6 }}
4545
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
46+
{{- if .Values.topologySpreadConstraints.enabled }}
47+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "weave.labels" .))) | nindent 6 }}
48+
{{- end }}
4649
containers:
4750
- name: {{ include "weave.fullname" . }}
4851
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Diff for: charts/operator-wandb/charts/weave/values.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ container:
5555
readOnlyRootFilesystem: false
5656
privileged: false
5757

58+
topologySpreadConstraints:
59+
enabled: false
60+
5861
resources:
5962
# We usually recommend not to specify default resources and to leave this as a
6063
# conscious choice for the user. This also increases chances charts run on

Diff for: charts/operator-wandb/charts/yace/templates/deployment.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ spec:
4242
{{- include "wandb.nodeSelector" . | nindent 6 }}
4343
{{- include "wandb.priorityClassName" . | nindent 6 }}
4444
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
45+
{{- if .Values.topologySpreadConstraints.enabled }}
46+
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "yace.labels" .))) | nindent 6 }}
47+
{{- end }}
4548
containers:
4649
- name: {{ .Chart.Name }}
4750
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Diff for: charts/operator-wandb/charts/yace/values.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ container:
113113
readOnlyRootFilesystem: false
114114
privileged: false
115115

116+
topologySpreadConstraints:
117+
enabled: false
116118

117119
deployment: {}
118120

Diff for: charts/operator-wandb/values.yaml

+9-7
Original file line numberDiff line numberDiff line change
@@ -314,12 +314,13 @@ prometheus:
314314

315315
redis-exporter:
316316
install: true
317+
topologySpreadConstraints:
318+
enabled: false
317319

318320
mysql-exporter:
319321
install: true
320-
321-
topologySpreadConstraints:
322-
enabled: false
322+
topologySpreadConstraints:
323+
enabled: false
323324

324325
stackdriver:
325326
install: false
@@ -334,21 +335,22 @@ stackdriver:
334335

335336
otel:
336337
install: true
337-
topologySpreadConstraints:
338-
enabled: false
339-
340338
# Consider deploying with a deployment rather than a daemonset to avoid
341339
# redundant metrics. In setups where both are scraping the same endpoints,
342340
# this redundancy occurs as both scrape the same points.
343341
daemonset:
344-
install: true
342+
install: false
343+
topologySpreadConstraints:
344+
enabled: false
345345

346346
# By default, we use only the daemonset which, along with the Prometheus
347347
# receiver, gathers most necessary metrics.
348348
# - To forward Kafka metrics to an external system, you will need to scrape a
349349
# promethus endpoint which causes duplicated metrics that get repoted.
350350
deployment:
351351
install: false
352+
topologySpreadConstraints:
353+
enabled: false
352354

353355
# # cannot use install because schema validation will fail.
354356
# enabled: true

0 commit comments

Comments
 (0)