Skip to content

Commit

Permalink
add support for topologyspreadconstraints in all subcharts
Browse files Browse the repository at this point in the history
  • Loading branch information
velotioaastha committed Dec 18, 2024
1 parent 83067b9 commit 979af3d
Show file tree
Hide file tree
Showing 30 changed files with 98 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "console.labels" .))) | nindent 6 }}
{{- end }}
# Extend the pods shutdown grace period from the default of 30s to 60s.
# This goes in the pod template spec.
terminationGracePeriodSeconds: 60
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/console/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

service:
type: ClusterIP
annotations: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "executor.labels" .))) | nindent 6 }}
{{- end }}
# needed to ensure ensure Kafka consumers handle pod termination gracefully and avoid data loss
terminationGracePeriodSeconds: 60
containers:
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/executor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

common:
labels: {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "filestream.labels" .))) | nindent 6 }}
{{- end }}
# needed to ensure ensure Kafka consumers handle pod termination gracefully and avoid data loss
terminationGracePeriodSeconds: 60
containers:
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/filestream/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

common:
labels: {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "flat-run-fields-updater.labels" .))) | nindent 6 }}
{{- end }}
# needed to ensure ensure Kafka consumers handle pod termination gracefully and avoid data loss
terminationGracePeriodSeconds: 60
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

common:
labels: {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "mysql.labels" .))) | nindent 6 }}
{{- end }}
containers:
- name: mysql
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
{{- include "wandb.podSecurityContext" .Values.container.securityContext | nindent 10 }}
{{- include "wandb.containerSecurityContext" .Values.container.securityContext | nindent 10 }}
ports:
- name: mysql
containerPort: 3306
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/mysql/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

resources:
requests:
cpu: 500m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "otelAgent.labels" .))) | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "otelAgent.labels" .))) | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/otel/charts/agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

clusterRole:
annotations: {}
labels: {}
Expand Down
4 changes: 4 additions & 0 deletions charts/operator-wandb/charts/otel/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
daemonset:
install: true
mode: "daemonset"
topologySpreadConstraints:
enabled: false
presets:
receivers:
hostMetrics: true
Expand Down Expand Up @@ -29,6 +31,8 @@ daemonset:
deployment:
install: true
mode: "deployment"
topologySpreadConstraints:
enabled: false
presets:
receivers:
statsd: true
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/parquet/templates/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 10 }}
{{- include "wandb.priorityClassName" . | nindent 10 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 10 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "parquet.labels" .))) | nindent 10 }}
{{- end }}
containers:
- name: backfill-job
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "parquet.labels" .))) | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/parquet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ container:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: false

topologySpreadConstraints:
enabled: false

resources:
# We usually recommend not to specify default resources and to leave this as a
# conscious choice for the user. This also increases chances charts run on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "mysql-exporter.labels" .))) | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ pod:
labels: {}
annotations: {}

topologySpreadConstraints:
enabled: false

common:
labels: {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "redis-exporter.labels" .))) | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ pod:
labels: {}
annotations: {}

topologySpreadConstraints:
enabled: false

common:
labels: {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "stackdriver.labels" .))) | nindent 6 }}
{{- end }}
spec:
containers:
- name: {{ .Chart.Name }}
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/stackdriver/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

deployment: {}

serviceAccount:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "weaveTrace.labels" .))) | nindent 6 }}
{{- end }}
{{- if not .Values.migration.useHook }}
initContainers:
- name: {{ include "weaveTraceMigrate.fullname" . }}
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/weave-trace/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

resources:
requests:
cpu: 500m
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/weave/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "weave.labels" .))) | nindent 6 }}
{{- end }}
containers:
- name: {{ include "weave.fullname" . }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/weave/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

resources:
# We usually recommend not to specify default resources and to leave this as a
# conscious choice for the user. This also increases chances charts run on
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/yace/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ spec:
{{- include "wandb.nodeSelector" . | nindent 6 }}
{{- include "wandb.priorityClassName" . | nindent 6 }}
{{- include "wandb.podSecurityContext" .Values.pod.securityContext | nindent 6 }}
{{- if .Values.topologySpreadConstraints.enabled }}
{{- include "wandb.topologySpreadConstraints" (dict "matchLabels" (fromYaml (include "yace.labels" .))) | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}"
Expand Down
3 changes: 3 additions & 0 deletions charts/operator-wandb/charts/yace/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ container:
readOnlyRootFilesystem: false
privileged: false

topologySpreadConstraints:
enabled: false

deployment: {}

serviceAccount:
Expand Down
16 changes: 9 additions & 7 deletions charts/operator-wandb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,13 @@ prometheus:

redis-exporter:
install: true
topologySpreadConstraints:
enabled: false

mysql-exporter:
install: true

topologySpreadConstraints:
enabled: false
topologySpreadConstraints:
enabled: false

stackdriver:
install: false
Expand All @@ -346,21 +347,22 @@ stackdriver:

otel:
install: true
topologySpreadConstraints:
enabled: false

# Consider deploying with a deployment rather than a daemonset to avoid
# redundant metrics. In setups where both are scraping the same endpoints,
# this redundancy occurs as both scrape the same points.
daemonset:
install: true
install: false
topologySpreadConstraints:
enabled: false

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

# # cannot use install because schema validation will fail.
# enabled: true
Expand Down

0 comments on commit 979af3d

Please sign in to comment.