Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): Add ability to customize affinity per deployment #22827

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ maintainers:
- name: craig-rueda
email: [email protected]
url: https://github.com/craig-rueda
version: 0.8.3
version: 0.8.4
dependencies:
- name: postgresql
version: 12.1.6
Expand Down
17 changes: 13 additions & 4 deletions helm/superset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: https://github.com/norwoodj/helm-docs

# superset

![Version: 0.8.3](https://img.shields.io/badge/Version-0.8.3-informational?style=flat-square)
![Version: 0.8.4](https://img.shields.io/badge/Version-0.8.4-informational?style=flat-square)

Apache Superset is a modern, enterprise-ready business intelligence web application

Expand Down Expand Up @@ -107,6 +107,7 @@ helm install my-superset superset/superset
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `false` | Create custom service account for Superset. If create: true and name is not provided, `superset.fullname` will be used. |
| supersetCeleryBeat.affinity | object | `{}` | Affinity to be added to supersetCeleryBeat deployment |
| supersetCeleryBeat.command | list | a `celery beat` command | Command |
| supersetCeleryBeat.containerSecurityContext | object | `{}` | |
| supersetCeleryBeat.deploymentAnnotations | object | `{}` | Annotations to be added to supersetCeleryBeat deployment |
Expand All @@ -117,9 +118,11 @@ helm install my-superset superset/superset
| supersetCeleryBeat.podLabels | object | `{}` | Labels to be added to supersetCeleryBeat pods |
| supersetCeleryBeat.podSecurityContext | object | `{}` | |
| supersetCeleryBeat.resources | object | `{}` | Resource settings for the CeleryBeat pods - these settings overwrite might existing values from the global resources object defined above. |
| supersetCeleryBeat.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetCeleryBeat deployments |
| supersetCeleryFlower.affinity | object | `{}` | Affinity to be added to supersetCeleryFlower deployment |
| supersetCeleryFlower.command | list | a `celery flower` command | Command |
| supersetCeleryFlower.containerSecurityContext | object | `{}` | |
| supersetCeleryFlower.deploymentAnnotations | object | `{}` | Annotations to be added to supersetCeleryBeat deployment |
| supersetCeleryFlower.deploymentAnnotations | object | `{}` | Annotations to be added to supersetCeleryFlower deployment |
| supersetCeleryFlower.enabled | bool | `false` | Enables a Celery flower deployment (management UI to monitor celery jobs) WARNING: on superset 1.x, this requires a Superset image that has `flower<1.0.0` installed (which is NOT the case of the default images) flower>=1.0.0 requires Celery 5+ which Superset 1.5 does not support |
| supersetCeleryFlower.initContainers | list | a container waiting for postgres and redis | List of init containers |
| supersetCeleryFlower.livenessProbe.failureThreshold | int | `3` | |
Expand All @@ -129,8 +132,8 @@ helm install my-superset superset/superset
| supersetCeleryFlower.livenessProbe.periodSeconds | int | `5` | |
| supersetCeleryFlower.livenessProbe.successThreshold | int | `1` | |
| supersetCeleryFlower.livenessProbe.timeoutSeconds | int | `1` | |
| supersetCeleryFlower.podAnnotations | object | `{}` | Annotations to be added to supersetCeleryBeat pods |
| supersetCeleryFlower.podLabels | object | `{}` | Labels to be added to supersetCeleryBeat pods |
| supersetCeleryFlower.podAnnotations | object | `{}` | Annotations to be added to supersetCeleryFlower pods |
| supersetCeleryFlower.podLabels | object | `{}` | Labels to be added to supersetCeleryFlower pods |
| supersetCeleryFlower.podSecurityContext | object | `{}` | |
| supersetCeleryFlower.readinessProbe.failureThreshold | int | `3` | |
| supersetCeleryFlower.readinessProbe.httpGet.path | string | `"/api/workers"` | |
Expand All @@ -151,6 +154,8 @@ helm install my-superset superset/superset
| supersetCeleryFlower.startupProbe.periodSeconds | int | `5` | |
| supersetCeleryFlower.startupProbe.successThreshold | int | `1` | |
| supersetCeleryFlower.startupProbe.timeoutSeconds | int | `1` | |
| supersetCeleryFlower.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetCeleryFlower deployments |
| supersetNode.affinity | object | `{}` | Affinity to be added to supersetNode deployment |
| supersetNode.command | list | See `values.yaml` | Startup command |
| supersetNode.connections.db_host | string | `"{{ template \"superset.fullname\" . }}-postgresql"` | |
| supersetNode.connections.db_name | string | `"superset"` | |
Expand Down Expand Up @@ -192,6 +197,8 @@ helm install my-superset superset/superset
| supersetNode.startupProbe.successThreshold | int | `1` | |
| supersetNode.startupProbe.timeoutSeconds | int | `1` | |
| supersetNode.strategy | object | `{}` | |
| supersetNode.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetNode deployments |
| supersetWebsockets.affinity | object | `{}` | Affinity to be added to supersetWebsockets deployment |
| supersetWebsockets.command | list | `[]` | |
| supersetWebsockets.config | object | see `values.yaml` | The config.json to pass to the server, see https://github.com/apache/superset/tree/master/superset-websocket Note that the configuration can also read from environment variables (which will have priority), see https://github.com/apache/superset/blob/master/superset-websocket/src/config.ts for a list of supported variables |
| supersetWebsockets.containerSecurityContext | object | `{}` | |
Expand Down Expand Up @@ -232,6 +239,7 @@ helm install my-superset superset/superset
| supersetWebsockets.startupProbe.successThreshold | int | `1` | |
| supersetWebsockets.startupProbe.timeoutSeconds | int | `1` | |
| supersetWebsockets.strategy | object | `{}` | |
| supersetWebsockets.topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to supersetWebsockets deployments |
| supersetWorker.command | list | a `celery worker` command | Worker startup command |
| supersetWorker.containerSecurityContext | object | `{}` | |
| supersetWorker.deploymentAnnotations | object | `{}` | Annotations to be added to supersetWorker deployment |
Expand All @@ -253,3 +261,4 @@ helm install my-superset superset/superset
| supersetWorker.startupProbe | object | `{}` | No startup/readiness probes by default since we don't really care about its startup time (it doesn't serve traffic) |
| supersetWorker.strategy | object | `{}` | |
| tolerations | list | `[]` | |
| topologySpreadConstraints | list | `[]` | TopologySpreadConstrains to be added to all deployments |
18 changes: 16 additions & 2 deletions helm/superset/templates/deployment-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,23 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- if or .Values.affinity .Values.supersetCeleryBeat.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetCeleryBeat.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.topologySpreadConstraints .Values.supersetCeleryBeat.topologySpreadConstraints }}
topologySpreadConstraints:
{{- with .Values.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetCeleryBeat.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
Expand Down
18 changes: 16 additions & 2 deletions helm/superset/templates/deployment-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,23 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- if or .Values.affinity .Values.supersetCeleryFlower.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetCeleryFlower.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.topologySpreadConstraints .Values.supersetCeleryFlower.topologySpreadConstraints }}
topologySpreadConstraints:
{{- with .Values.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetCeleryFlower.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
Expand Down
16 changes: 15 additions & 1 deletion helm/superset/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,23 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- if or .Values.affinity .Values.supersetWorker.affinity }}
affinity:
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetWorker.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.topologySpreadConstraints .Values.supersetWorker.topologySpreadConstraints }}
topologySpreadConstraints:
{{- with .Values.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetWorker.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
Expand Down
16 changes: 15 additions & 1 deletion helm/superset/templates/deployment-ws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,23 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- if or .Values.affinity .Values.supersetWebsockets.affinity }}
affinity:
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetWebsockets.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.topologySpreadConstraints .Values.supersetWebsockets.topologySpreadConstraints }}
topologySpreadConstraints:
{{- with .Values.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetWebsockets.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
Expand Down
16 changes: 15 additions & 1 deletion helm/superset/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,23 @@ spec:
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- if or .Values.affinity .Values.supersetNode.affinity }}
affinity:
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetNode.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- if or .Values.topologySpreadConstraints .Values.supersetNode.topologySpreadConstraints }}
topologySpreadConstraints:
{{- with .Values.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.supersetNode.topologySpreadConstraints }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
Expand Down
25 changes: 22 additions & 3 deletions helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ supersetNode:
deploymentAnnotations: {}
# -- Labels to be added to supersetNode deployment
deploymentLabels: {}
# -- Affinity to be added to supersetNode deployment
affinity: {}
# -- TopologySpreadConstrains to be added to supersetNode deployments
topologySpreadConstraints: []
# -- Annotations to be added to supersetNode pods
podAnnotations: {}
# -- Labels to be added to supersetNode pods
Expand Down Expand Up @@ -426,6 +430,10 @@ supersetCeleryBeat:
- dockerize -wait "tcp://$DB_HOST:$DB_PORT" -wait "tcp://$REDIS_HOST:$REDIS_PORT" -timeout 120s
# -- Annotations to be added to supersetCeleryBeat deployment
deploymentAnnotations: {}
# -- Affinity to be added to supersetCeleryBeat deployment
affinity: {}
# -- TopologySpreadConstrains to be added to supersetCeleryBeat deployments
topologySpreadConstraints: []
# -- Annotations to be added to supersetCeleryBeat pods
podAnnotations: {}
# -- Labels to be added to supersetCeleryBeat pods
Expand Down Expand Up @@ -498,11 +506,15 @@ supersetCeleryFlower:
- /bin/sh
- -c
- dockerize -wait "tcp://$DB_HOST:$DB_PORT" -wait "tcp://$REDIS_HOST:$REDIS_PORT" -timeout 120s
# -- Annotations to be added to supersetCeleryBeat deployment
# -- Annotations to be added to supersetCeleryFlower deployment
deploymentAnnotations: {}
# -- Annotations to be added to supersetCeleryBeat pods
# -- Affinity to be added to supersetCeleryFlower deployment
affinity: {}
# -- TopologySpreadConstrains to be added to supersetCeleryFlower deployments
topologySpreadConstraints: []
# -- Annotations to be added to supersetCeleryFlower pods
podAnnotations: {}
# -- Labels to be added to supersetCeleryBeat pods
# -- Labels to be added to supersetCeleryFlower pods
podLabels: {}
# -- Resource settings for the CeleryBeat pods - these settings overwrite might existing values from the global resources object defined above.
resources:
Expand Down Expand Up @@ -558,6 +570,10 @@ supersetWebsockets:
command: []
resources: {}
deploymentAnnotations: {}
# -- Affinity to be added to supersetWebsockets deployment
affinity: {}
# -- TopologySpreadConstrains to be added to supersetWebsockets deployments
topologySpreadConstraints: []
podAnnotations: {}
podLabels: {}
strategy: {}
Expand Down Expand Up @@ -765,3 +781,6 @@ nodeSelector: {}
tolerations: []

affinity: {}

# -- TopologySpreadConstrains to be added to all deployments
topologySpreadConstraints: []