Skip to content

Commit

Permalink
added init containers configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Apr 14, 2024
1 parent 287e86e commit d21e716
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 3 deletions.
2 changes: 1 addition & 1 deletion charts/redash/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v1
name: redash
version: 3.1.0-alpha4
version: 3.1.0-alpha5
appVersion: 24.04.0-dev-b8671264667.25
description: Redash is an open source tool built for teams to query, visualize and collaborate.
keywords:
Expand Down
7 changes: 6 additions & 1 deletion charts/redash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This chart bootstraps a [Redash](https://github.com/getredash/redash) deployment

This is a contributed project developed by volunteers and not officially supported by Redash.

Current chart version is `3.1.0-alpha4`
Current chart version is `3.1.0-alpha5`

* <https://github.com/getredash/redash>

Expand Down Expand Up @@ -96,7 +96,9 @@ The following table lists the configurable parameters of the Redash chart and th
| ingress.ingressClassName | string | `""` | Sets the ingress controller class name to use. |
| ingress.pathType | string | `"Prefix"` | How ingress paths should be treated. |
| ingress.tls | list | `[]` | Ingress TLS configuration |
| initContainers | list | `[]` | Redash global init containers |
| migrations.affinity | object | `{}` | Affinity for scheduled worker pod assignment [ref](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) |
| migrations.initContainers | list | `[]` | migrations init container configuration |
| migrations.nodeSelector | object | `{}` | Node labels for scheduled worker pod assignment [ref](https://kubernetes.io/docs/user-guide/node-selection/) |
| migrations.podAnnotations | object | `{}` | Annotations for scheduled worker pod assignment [ref](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
| migrations.podSecurityContext | object | `{}` | Security contexts for scheduled worker pod assignment [ref](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) |
Expand Down Expand Up @@ -203,6 +205,7 @@ The following table lists the configurable parameters of the Redash chart and th
| redis.master.service.ports.redis | int | `6379` | |
| scheduler.affinity | object | `{}` | Affinity for scheduler pod assignment [ref](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) |
| scheduler.env | object | `{}` | Redash scheduler specific environment variables. |
| scheduler.initContainers | list | `[]` | Redash scheduler init containers configuration. |
| scheduler.livenessProbe | object | `{}` | Liveness probe for scheduler to ensure workers are running fine |
| scheduler.nodeSelector | object | `{}` | Node labels for scheduler pod assignment [ref](https://kubernetes.io/docs/user-guide/node-selection/) |
| scheduler.podAnnotations | object | `{}` | Annotations for scheduler pod assignment [ref](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
Expand All @@ -216,6 +219,7 @@ The following table lists the configurable parameters of the Redash chart and th
| server.affinity | object | `{}` | Affinity for server pod assignment [ref](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) |
| server.env | object | `{}` | Redash server specific environment variables Don't use this for variables that are in the configuration above, however. |
| server.httpPort | int | `5000` | Server container port (only useful if you are using a customized image) |
| server.initContainers | list | `[]` | Server init containers configuration |
| server.livenessProbe | object | `{"failureThreshold":10,"initialDelaySeconds":90,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}` | Server liveness probe configuration |
| server.nodeSelector | object | `{}` | Node labels for server pod assignment [ref](https://kubernetes.io/docs/user-guide/node-selection/) |
| server.podAnnotations | object | `{}` | Annotations for server pod assignment [ref](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
Expand All @@ -239,6 +243,7 @@ The following table lists the configurable parameters of the Redash chart and th
| volumeMounts | list | `[]` | Redash global volume mounts configuration - applied to all containers |
| volumes | list | `[]` | Redash global volumes configuration - applied to all containers |
| worker.affinity | object | `{}` | Default affinity for worker pod assignment [ref](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity) |
| worker.initContainers | list | `[]` | Worker default init containers configuration |
| worker.livenessProbe | object | `{}` | Default worker's liveness probe to ensure workers are running fine |
| worker.nodeSelector | object | `{}` | Default node labels for worker pod assignment [ref](https://kubernetes.io/docs/user-guide/node-selection/) |
| worker.podAnnotations | object | `{}` | Default annotations for worker pod assignment [ref](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) |
Expand Down
2 changes: 1 addition & 1 deletion charts/redash/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Shared environment block used across each component.
value: {{ .Values.redis.database | quote }}
{{ end -}}
{{ range $key, $value := .Values.env -}}
- name: {{ $key | quote }}
- name: {{ $key }}
value: {{ $value | quote }}
{{ end -}}
## Start primary Redash configuration
Expand Down
4 changes: 4 additions & 0 deletions charts/redash/templates/hook-migrations-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ spec:
serviceAccountName: {{ include "redash.serviceAccountName" . }}
restartPolicy: Never
securityContext: {{ toYaml .Values.migrations.podSecurityContext | nindent 8 }}
{{- $initContainers := concat .Values.initContainers .Values.migrations.initContainers }}
{{- with $initContainers }}
initContainers: {{ toYaml . | nindent 8 }}
{{- end }}
containers:
- name: {{ include "redash.name" . }}-server
securityContext: {{ toYaml .Values.migrations.securityContext | nindent 10 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/redash/templates/scheduler-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ spec:
{{ end -}}
serviceAccountName: {{ include "redash.serviceAccountName" . }}
securityContext: {{ toYaml .Values.scheduler.podSecurityContext | nindent 8 }}
{{- $initContainers := concat .Values.initContainers .Values.scheduler.initContainers }}
{{- with $initContainers }}
initContainers: {{ toYaml . | nindent 8 }}
{{- end }}
containers:
{{- with .Values.scheduler.extraContainers -}}
{{ toYaml . | nindent 8 }}
Expand Down
4 changes: 4 additions & 0 deletions charts/redash/templates/server-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ spec:
{{ end -}}
serviceAccountName: {{ include "redash.serviceAccountName" . }}
securityContext: {{ toYaml .Values.server.podSecurityContext | nindent 8 }}
{{- $initContainers := concat .Values.initContainers .Values.server.initContainers }}
{{- with $initContainers }}
initContainers: {{ toYaml . | nindent 8 }}
{{- end }}
containers:
{{- with .Values.server.extraContainers -}}
{{- toYaml . | nindent 8 }}
Expand Down
3 changes: 3 additions & 0 deletions charts/redash/templates/worker-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ spec:
{{- end -}}
serviceAccountName: {{ include "redash.serviceAccountName" $context }}
securityContext: {{ toYaml $workerConfig.podSecurityContext | nindent 8 }}
{{- with concat $.Values.initContainers $workerConfig.initContainers }}
initContainers: {{ toYaml . | nindent 8 }}
{{- end }}
containers:
{{- with $workerConfig.extraContainers -}}
{{- toYaml . | nindent 8 }}
Expand Down
15 changes: 15 additions & 0 deletions charts/redash/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ env:
PYTHONUNBUFFERED: 0
REDASH_PRODUCTION: "true"

# initContainers -- Redash global init containers
initContainers: []

# volumes -- Redash global volumes configuration - applied to all containers
volumes: []

Expand Down Expand Up @@ -287,6 +290,9 @@ server:
# server.httpPort -- Server container port (only useful if you are using a customized image)
httpPort: 5000

# server.initContainers -- Server init containers configuration
initContainers: []

# server.env -- Redash server specific environment variables
# Don't use this for variables that are in the configuration above, however.
env: {}
Expand Down Expand Up @@ -404,6 +410,9 @@ worker:
# worker.replicaCount -- Default number of worker pods to run
replicaCount: 1

# worker.initContainers -- Worker default init containers configuration
initContainers: []

# worker.resources -- Worker default resource requests and limits [ref](http://kubernetes.io/docs/user-guide/compute-resources/)
resources:
# limits:
Expand Down Expand Up @@ -453,6 +462,9 @@ scheduler:
# scheduler.env -- Redash scheduler specific environment variables.
env: {}

# scheduler.initContainers -- Redash scheduler init containers configuration.
initContainers: []

# scheduler.resources -- scheduler resource requests and limits [ref](http://kubernetes.io/docs/user-guide/compute-resources/)
resources:
# limits:
Expand Down Expand Up @@ -502,6 +514,9 @@ migrations:
# migrations.volumes -- volumes that will be mounted to migrations pods only
volumes: []

# migrations.initContainers -- migrations init container configuration
initContainers: []

# migrations.volumeMounts -- volume mounts for migrations pods
volumeMounts: []

Expand Down

0 comments on commit d21e716

Please sign in to comment.