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): Support for flower and websocket containers #21806

Merged
merged 12 commits into from
Oct 27, 2022
9 changes: 9 additions & 0 deletions helm/superset/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: postgresql
repository: https://charts.bitnami.com/bitnami
version: 11.1.22
- name: redis
repository: https://charts.bitnami.com/bitnami
version: 16.3.1
digest: sha256:f80cc4ec2bb6f327d348bc15e9192cc6ab2163781c1e35f85720565a36a1cb14
generated: "2022-10-13T16:59:44.305764+02:00"
24 changes: 15 additions & 9 deletions helm/superset/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,23 @@ apiVersion: v2
appVersion: "1.0"
description: Apache Superset is a modern, enterprise-ready business intelligence web application
name: superset
home: https://superset.apache.org/
keywords:
- business intelligence
- data science
sources:
- https://github.com/apache/superset
maintainers:
- name: craig-rueda
email: craig@craigrueda.com
url: https://github.com/craig-rueda
version: 0.7.4
version: 0.7.5
dependencies:
- name: postgresql
version: 11.1.22
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: redis
version: 16.3.1
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
- name: postgresql
version: 11.1.22
repository: https://charts.bitnami.com/bitnami
condition: postgresql.enabled
- name: redis
version: 16.3.1
repository: https://charts.bitnami.com/bitnami
condition: redis.enabled
230 changes: 230 additions & 0 deletions helm/superset/README.md

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions helm/superset/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}

{{ template "chart.versionBadge" . }}

{{ template "chart.description" . }}

{{ template "chart.homepageLine" . }}

{{ template "chart.sourcesSection" . }}

## TL;DR;

```console
helm repo add superset http://apache.github.io/superset/
helm install my-superset superset/superset
```

{{ template "chart.requirementsSection" . }}

{{ template "chart.valuesSection" . }}
42 changes: 21 additions & 21 deletions helm/superset/templates/deployment-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ metadata:
heritage: {{ .Release.Service }}
{{- if .Values.supersetCeleryBeat.deploymentAnnotations }}
annotations:
{{ toYaml .Values.supersetCeleryBeat.deploymentAnnotations | nindent 4 }}
{{- toYaml .Values.supersetCeleryBeat.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
# This must be a singleton
Expand All @@ -50,13 +50,13 @@ spec:
force-reload: {{ randAlphaNum 5 | quote }}
{{ end }}
{{- if .Values.supersetCeleryBeat.podAnnotations }}
{{ toYaml .Values.supersetCeleryBeat.podAnnotations | nindent 8 }}
{{- toYaml .Values.supersetCeleryBeat.podAnnotations | nindent 8 }}
{{- end }}
labels:
app: {{ template "superset.name" . }}-celerybeat
app: "{{ template "superset.name" . }}-celerybeat"
release: {{ .Release.Name }}
{{- if .Values.supersetCeleryBeat.podLabels }}
{{ toYaml .Values.supersetCeleryBeat.podLabels | nindent 8 }}
{{- toYaml .Values.supersetCeleryBeat.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if or (.Values.serviceAccount.create) (.Values.serviceAccountName) }}
Expand All @@ -65,21 +65,21 @@ spec:
securityContext:
runAsUser: {{ .Values.runAsUser }}
{{- if .Values.supersetCeleryBeat.podSecurityContext }}
{{ toYaml .Values.supersetCeleryBeat.podSecurityContext | nindent 8 }}
{{- toYaml .Values.supersetCeleryBeat.podSecurityContext | nindent 8 }}
{{- end }}
{{- if .Values.supersetCeleryBeat.initContainers }}
initContainers:
{{- tpl (toYaml .Values.supersetCeleryBeat.initContainers) . | nindent 6 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases: {{ toYaml . | nindent 6 }}
hostAliases: {{- toYaml . | nindent 6 }}
{{- end }}
containers:
- name: {{ .Chart.Name }}
- name: "{{ .Chart.Name }}-celerybeat"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.supersetCeleryBeat.containerSecurityContext }}
securityContext: {{ toYaml .Values.supersetCeleryBeat.containerSecurityContext | nindent 12 }}
securityContext: {{- toYaml .Values.supersetCeleryBeat.containerSecurityContext | nindent 12 }}
{{- end }}
command: {{ tpl (toJson .Values.supersetCeleryBeat.command) . }}
env:
Expand Down Expand Up @@ -108,25 +108,25 @@ spec:
{{- end }}
resources:
{{- if .Values.supersetCeleryBeat.resources }}
{{ toYaml .Values.supersetCeleryBeat.resources | indent 12 }}
{{- toYaml .Values.supersetCeleryBeat.resources | nindent 12 }}
{{- else }}
{{ toYaml .Values.resources | indent 12 }}
{{- toYaml .Values.resources | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{ toYaml .Values.imagePullSecrets | indent 8 }}
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
volumes:
- name: superset-config
Expand Down
142 changes: 142 additions & 0 deletions helm/superset/templates/deployment-flower.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{{- if .Values.supersetCeleryFlower.enabled -}}
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "superset.fullname" . }}-flower
labels:
app: {{ template "superset.name" . }}-flower
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.supersetCeleryFlower.deploymentAnnotations }}
annotations:
{{- toYaml .Values.supersetCeleryFlower.deploymentAnnotations | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.supersetCeleryFlower.replicaCount }}
selector:
matchLabels:
app: {{ template "superset.name" . }}-flower
release: {{ .Release.Name }}
template:
metadata:
annotations:
checksum/config: {{ include "superset-config" . | sha256sum }}
checksum/secrets: {{ tpl (toJson .Values.extraSecretEnv) . | sha256sum }}
{{- if .Values.supersetCeleryFlower.podAnnotations }}
{{- toYaml .Values.supersetCeleryFlower.podAnnotations | nindent 8 }}
{{- end }}
labels:
app: "{{ template "superset.name" . }}-flower"
release: {{ .Release.Name }}
{{- if .Values.supersetCeleryFlower.podLabels }}
{{- toYaml .Values.supersetCeleryFlower.podLabels | nindent 8 }}
{{- end }}
spec:
{{- if or (.Values.serviceAccount.create) (.Values.serviceAccountName) }}
serviceAccountName: {{ template "superset.serviceAccountName" . }}
{{- end }}
securityContext:
runAsUser: {{ .Values.runAsUser }}
{{- if .Values.supersetCeleryFlower.podSecurityContext }}
{{- toYaml .Values.supersetCeleryFlower.podSecurityContext | nindent 8 }}
{{- end }}
{{- if .Values.supersetCeleryFlower.initContainers }}
initContainers:
{{- tpl (toYaml .Values.supersetCeleryFlower.initContainers) . | nindent 6 }}
{{- end }}
{{- with .Values.hostAliases }}
hostAliases: {{- toYaml . | nindent 6 }}
{{- end }}
containers:
- name: "{{ .Chart.Name }}-flower"
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.supersetCeleryFlower.containerSecurityContext }}
securityContext: {{- toYaml .Values.supersetCeleryFlower.containerSecurityContext | nindent 12 }}
{{- end }}
command: {{ tpl (toJson .Values.supersetCeleryFlower.command) . }}
env:
{{- range $key, $value := .Values.extraEnv }}
- name: {{ $key | quote}}
value: {{ $value | quote }}
{{- end }}
{{- if .Values.extraEnvRaw }}
{{- toYaml .Values.extraEnvRaw | nindent 12 }}
{{- end }}
envFrom:
- secretRef:
name: {{ tpl .Values.envFromSecret . | quote }}
{{- range .Values.envFromSecrets }}
- secretRef:
name: {{ tpl . $ | quote }}
{{- end }}
ports:
- name: flower
containerPort: 5555
protocol: TCP
volumeMounts:
- name: superset-config
mountPath: {{ .Values.configMountPath | quote }}
readOnly: true
{{- with .Values.extraVolumeMounts }}
{{- tpl (toYaml .) $ | nindent 12 -}}
{{- end }}
{{- if .Values.supersetCeleryFlower.startupProbe }}
startupProbe:
{{- .Values.supersetCeleryFlower.startupProbe | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.supersetCeleryFlower.readinessProbe }}
readinessProbe:
{{- .Values.supersetCeleryFlower.readinessProbe | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.supersetCeleryFlower.livenessProbe }}
livenessProbe:
{{- .Values.supersetCeleryFlower.livenessProbe | toYaml | nindent 12 }}
{{- end }}
resources:
{{- if .Values.supersetCeleryFlower.resources }}
{{- toYaml .Values.supersetCeleryFlower.resources | nindent 12 }}
{{- else }}
{{- toYaml .Values.resources | nindent 12 }}
{{- end }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
{{- end }}
volumes:
- name: superset-config
secret:
secretName: {{ tpl .Values.configFromSecret . }}
{{- with .Values.extraVolumes }}
{{- tpl (toYaml .) $ | nindent 8 -}}
{{- end }}
{{- end -}}
Loading