Skip to content

Commit 06da7bf

Browse files
authored
feat(helm): Support for flower and websocket containers (#21806)
1 parent 7e3e133 commit 06da7bf

18 files changed

+1122
-901
lines changed

.github/workflows/superset-helm-lint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ jobs:
4444
CT_CHART_DIRS: helm
4545
CT_LINT_CONF: lintconf.yaml
4646
CT_SINCE: HEAD
47+
CT_CHART_REPOS: bitnami=https://charts.bitnami.com/bitnami

.markdownlint.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"no-bare-urls": false,
3+
"line-length": false
4+
}

helm/superset/Chart.lock

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
dependencies:
2+
- name: postgresql
3+
repository: https://charts.bitnami.com/bitnami
4+
version: 11.1.22
5+
- name: redis
6+
repository: https://charts.bitnami.com/bitnami
7+
version: 16.3.1
8+
digest: sha256:f80cc4ec2bb6f327d348bc15e9192cc6ab2163781c1e35f85720565a36a1cb14
9+
generated: "2022-10-13T16:59:44.305764+02:00"

helm/superset/Chart.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,24 @@ apiVersion: v2
1818
appVersion: "1.0"
1919
description: Apache Superset is a modern, enterprise-ready business intelligence web application
2020
name: superset
21+
icon: https://artifacthub.io/image/68c1d717-0e97-491f-b046-754e46f46922@2x
22+
home: https://superset.apache.org/
23+
keywords:
24+
- business intelligence
25+
- data science
26+
sources:
27+
- https://github.com/apache/superset
2128
maintainers:
2229
- name: craig-rueda
2330
2431
url: https://github.com/craig-rueda
25-
version: 0.7.4
32+
version: 0.7.5
2633
dependencies:
27-
- name: postgresql
28-
version: 11.1.22
29-
repository: https://charts.bitnami.com/bitnami
30-
condition: postgresql.enabled
31-
- name: redis
32-
version: 16.3.1
33-
repository: https://charts.bitnami.com/bitnami
34-
condition: redis.enabled
34+
- name: postgresql
35+
version: 11.1.22
36+
repository: https://charts.bitnami.com/bitnami
37+
condition: postgresql.enabled
38+
- name: redis
39+
version: 16.3.1
40+
repository: https://charts.bitnami.com/bitnami
41+
condition: redis.enabled

helm/superset/README.md

Lines changed: 249 additions & 0 deletions
Large diffs are not rendered by default.

helm/superset/README.md.gotmpl

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
{{ template "chart.header" . }}
21+
{{ template "chart.deprecationWarning" . }}
22+
23+
{{ template "chart.versionBadge" . }}
24+
25+
{{ template "chart.description" . }}
26+
27+
{{ template "chart.homepageLine" . }}
28+
29+
{{ template "chart.sourcesSection" . }}
30+
31+
## TL;DR
32+
33+
```console
34+
helm repo add superset http://apache.github.io/superset/
35+
helm install my-superset superset/superset
36+
```
37+
38+
{{ template "chart.requirementsSection" . }}
39+
40+
{{ template "chart.valuesSection" . }}

helm/superset/templates/deployment-beat.yaml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ metadata:
2626
heritage: {{ .Release.Service }}
2727
{{- if .Values.supersetCeleryBeat.deploymentAnnotations }}
2828
annotations:
29-
{{ toYaml .Values.supersetCeleryBeat.deploymentAnnotations | nindent 4 }}
29+
{{- toYaml .Values.supersetCeleryBeat.deploymentAnnotations | nindent 4 }}
3030
{{- end }}
3131
spec:
3232
# This must be a singleton
@@ -50,13 +50,13 @@ spec:
5050
force-reload: {{ randAlphaNum 5 | quote }}
5151
{{ end }}
5252
{{- if .Values.supersetCeleryBeat.podAnnotations }}
53-
{{ toYaml .Values.supersetCeleryBeat.podAnnotations | nindent 8 }}
53+
{{- toYaml .Values.supersetCeleryBeat.podAnnotations | nindent 8 }}
5454
{{- end }}
5555
labels:
56-
app: {{ template "superset.name" . }}-celerybeat
56+
app: "{{ template "superset.name" . }}-celerybeat"
5757
release: {{ .Release.Name }}
5858
{{- if .Values.supersetCeleryBeat.podLabels }}
59-
{{ toYaml .Values.supersetCeleryBeat.podLabels | nindent 8 }}
59+
{{- toYaml .Values.supersetCeleryBeat.podLabels | nindent 8 }}
6060
{{- end }}
6161
spec:
6262
{{- if or (.Values.serviceAccount.create) (.Values.serviceAccountName) }}
@@ -65,21 +65,21 @@ spec:
6565
securityContext:
6666
runAsUser: {{ .Values.runAsUser }}
6767
{{- if .Values.supersetCeleryBeat.podSecurityContext }}
68-
{{ toYaml .Values.supersetCeleryBeat.podSecurityContext | nindent 8 }}
68+
{{- toYaml .Values.supersetCeleryBeat.podSecurityContext | nindent 8 }}
6969
{{- end }}
7070
{{- if .Values.supersetCeleryBeat.initContainers }}
7171
initContainers:
7272
{{- tpl (toYaml .Values.supersetCeleryBeat.initContainers) . | nindent 6 }}
7373
{{- end }}
7474
{{- with .Values.hostAliases }}
75-
hostAliases: {{ toYaml . | nindent 6 }}
75+
hostAliases: {{- toYaml . | nindent 6 }}
7676
{{- end }}
7777
containers:
78-
- name: {{ .Chart.Name }}
78+
- name: "{{ .Chart.Name }}-celerybeat"
7979
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
8080
imagePullPolicy: {{ .Values.image.pullPolicy }}
8181
{{- if .Values.supersetCeleryBeat.containerSecurityContext }}
82-
securityContext: {{ toYaml .Values.supersetCeleryBeat.containerSecurityContext | nindent 12 }}
82+
securityContext: {{- toYaml .Values.supersetCeleryBeat.containerSecurityContext | nindent 12 }}
8383
{{- end }}
8484
command: {{ tpl (toJson .Values.supersetCeleryBeat.command) . }}
8585
env:
@@ -108,25 +108,25 @@ spec:
108108
{{- end }}
109109
resources:
110110
{{- if .Values.supersetCeleryBeat.resources }}
111-
{{ toYaml .Values.supersetCeleryBeat.resources | indent 12 }}
111+
{{- toYaml .Values.supersetCeleryBeat.resources | nindent 12 }}
112112
{{- else }}
113-
{{ toYaml .Values.resources | indent 12 }}
113+
{{- toYaml .Values.resources | nindent 12 }}
114114
{{- end }}
115-
{{- with .Values.nodeSelector }}
115+
{{- with .Values.nodeSelector }}
116116
nodeSelector:
117-
{{ toYaml . | indent 8 }}
118-
{{- end }}
119-
{{- with .Values.affinity }}
117+
{{- toYaml . | nindent 8 }}
118+
{{- end }}
119+
{{- with .Values.affinity }}
120120
affinity:
121-
{{ toYaml . | indent 8 }}
122-
{{- end }}
123-
{{- with .Values.tolerations }}
121+
{{- toYaml . | nindent 8 }}
122+
{{- end }}
123+
{{- with .Values.tolerations }}
124124
tolerations:
125-
{{ toYaml . | indent 8 }}
126-
{{- end }}
127-
{{- if .Values.imagePullSecrets }}
125+
{{- toYaml . | nindent 8 }}
126+
{{- end }}
127+
{{- if .Values.imagePullSecrets }}
128128
imagePullSecrets:
129-
{{ toYaml .Values.imagePullSecrets | indent 8 }}
129+
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
130130
{{- end }}
131131
volumes:
132132
- name: superset-config
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
{{- if .Values.supersetCeleryFlower.enabled -}}
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
apiVersion: apps/v1
19+
kind: Deployment
20+
metadata:
21+
name: {{ template "superset.fullname" . }}-flower
22+
labels:
23+
app: {{ template "superset.name" . }}-flower
24+
chart: {{ template "superset.chart" . }}
25+
release: {{ .Release.Name }}
26+
heritage: {{ .Release.Service }}
27+
{{- if .Values.supersetCeleryFlower.deploymentAnnotations }}
28+
annotations:
29+
{{- toYaml .Values.supersetCeleryFlower.deploymentAnnotations | nindent 4 }}
30+
{{- end }}
31+
spec:
32+
replicas: {{ .Values.supersetCeleryFlower.replicaCount }}
33+
selector:
34+
matchLabels:
35+
app: {{ template "superset.name" . }}-flower
36+
release: {{ .Release.Name }}
37+
template:
38+
metadata:
39+
annotations:
40+
checksum/config: {{ include "superset-config" . | sha256sum }}
41+
checksum/secrets: {{ tpl (toJson .Values.extraSecretEnv) . | sha256sum }}
42+
{{- if .Values.supersetCeleryFlower.podAnnotations }}
43+
{{- toYaml .Values.supersetCeleryFlower.podAnnotations | nindent 8 }}
44+
{{- end }}
45+
labels:
46+
app: "{{ template "superset.name" . }}-flower"
47+
release: {{ .Release.Name }}
48+
{{- if .Values.supersetCeleryFlower.podLabels }}
49+
{{- toYaml .Values.supersetCeleryFlower.podLabels | nindent 8 }}
50+
{{- end }}
51+
spec:
52+
{{- if or (.Values.serviceAccount.create) (.Values.serviceAccountName) }}
53+
serviceAccountName: {{ template "superset.serviceAccountName" . }}
54+
{{- end }}
55+
securityContext:
56+
runAsUser: {{ .Values.runAsUser }}
57+
{{- if .Values.supersetCeleryFlower.podSecurityContext }}
58+
{{- toYaml .Values.supersetCeleryFlower.podSecurityContext | nindent 8 }}
59+
{{- end }}
60+
{{- if .Values.supersetCeleryFlower.initContainers }}
61+
initContainers:
62+
{{- tpl (toYaml .Values.supersetCeleryFlower.initContainers) . | nindent 6 }}
63+
{{- end }}
64+
{{- with .Values.hostAliases }}
65+
hostAliases: {{- toYaml . | nindent 6 }}
66+
{{- end }}
67+
containers:
68+
- name: "{{ .Chart.Name }}-flower"
69+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
70+
imagePullPolicy: {{ .Values.image.pullPolicy }}
71+
{{- if .Values.supersetCeleryFlower.containerSecurityContext }}
72+
securityContext: {{- toYaml .Values.supersetCeleryFlower.containerSecurityContext | nindent 12 }}
73+
{{- end }}
74+
command: {{ tpl (toJson .Values.supersetCeleryFlower.command) . }}
75+
env:
76+
{{- range $key, $value := .Values.extraEnv }}
77+
- name: {{ $key | quote}}
78+
value: {{ $value | quote }}
79+
{{- end }}
80+
{{- if .Values.extraEnvRaw }}
81+
{{- toYaml .Values.extraEnvRaw | nindent 12 }}
82+
{{- end }}
83+
envFrom:
84+
- secretRef:
85+
name: {{ tpl .Values.envFromSecret . | quote }}
86+
{{- range .Values.envFromSecrets }}
87+
- secretRef:
88+
name: {{ tpl . $ | quote }}
89+
{{- end }}
90+
ports:
91+
- name: flower
92+
containerPort: 5555
93+
protocol: TCP
94+
volumeMounts:
95+
- name: superset-config
96+
mountPath: {{ .Values.configMountPath | quote }}
97+
readOnly: true
98+
{{- with .Values.extraVolumeMounts }}
99+
{{- tpl (toYaml .) $ | nindent 12 -}}
100+
{{- end }}
101+
{{- if .Values.supersetCeleryFlower.startupProbe }}
102+
startupProbe:
103+
{{- .Values.supersetCeleryFlower.startupProbe | toYaml | nindent 12 }}
104+
{{- end }}
105+
{{- if .Values.supersetCeleryFlower.readinessProbe }}
106+
readinessProbe:
107+
{{- .Values.supersetCeleryFlower.readinessProbe | toYaml | nindent 12 }}
108+
{{- end }}
109+
{{- if .Values.supersetCeleryFlower.livenessProbe }}
110+
livenessProbe:
111+
{{- .Values.supersetCeleryFlower.livenessProbe | toYaml | nindent 12 }}
112+
{{- end }}
113+
resources:
114+
{{- if .Values.supersetCeleryFlower.resources }}
115+
{{- toYaml .Values.supersetCeleryFlower.resources | nindent 12 }}
116+
{{- else }}
117+
{{- toYaml .Values.resources | nindent 12 }}
118+
{{- end }}
119+
{{- with .Values.nodeSelector }}
120+
nodeSelector:
121+
{{- toYaml . | nindent 8 }}
122+
{{- end }}
123+
{{- with .Values.affinity }}
124+
affinity:
125+
{{- toYaml . | nindent 8 }}
126+
{{- end }}
127+
{{- with .Values.tolerations }}
128+
tolerations:
129+
{{- toYaml . | nindent 8 }}
130+
{{- end }}
131+
{{- if .Values.imagePullSecrets }}
132+
imagePullSecrets:
133+
{{- toYaml .Values.imagePullSecrets | nindent 8 }}
134+
{{- end }}
135+
volumes:
136+
- name: superset-config
137+
secret:
138+
secretName: {{ tpl .Values.configFromSecret . }}
139+
{{- with .Values.extraVolumes }}
140+
{{- tpl (toYaml .) $ | nindent 8 -}}
141+
{{- end }}
142+
{{- end -}}

0 commit comments

Comments
 (0)