This is an automated email from the ASF dual-hosted git repository.

villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new c03bf80864 feat(helm-chart): Add extraLabels to all resources (#30710)
c03bf80864 is described below

commit c03bf808643c1b35f4b6f7eb398d0408c29162a5
Author: Max Forasteiro <[email protected]>
AuthorDate: Sun Oct 27 21:36:06 2024 +0100

    feat(helm-chart): Add extraLabels to all resources (#30710)
---
 helm/superset/Chart.yaml                            | 2 +-
 helm/superset/README.md                             | 3 ++-
 helm/superset/templates/configmap-superset.yaml     | 3 +++
 helm/superset/templates/deployment-beat.yaml        | 6 ++++++
 helm/superset/templates/deployment-flower.yaml      | 6 ++++++
 helm/superset/templates/deployment-worker.yaml      | 6 ++++++
 helm/superset/templates/deployment-ws.yaml          | 6 ++++++
 helm/superset/templates/deployment.yaml             | 6 ++++++
 helm/superset/templates/hpa-node.yaml               | 3 +++
 helm/superset/templates/hpa-worker.yaml             | 3 +++
 helm/superset/templates/ingress.yaml                | 3 +++
 helm/superset/templates/init-job.yaml               | 4 ++++
 helm/superset/templates/pdb-beat.yaml               | 3 +++
 helm/superset/templates/pdb-flower.yaml             | 3 +++
 helm/superset/templates/pdb-worker.yaml             | 3 +++
 helm/superset/templates/pdb-ws.yaml                 | 3 +++
 helm/superset/templates/pdb.yaml                    | 3 +++
 helm/superset/templates/secret-env.yaml             | 3 +++
 helm/superset/templates/secret-superset-config.yaml | 3 +++
 helm/superset/templates/secret-ws.yaml              | 3 +++
 helm/superset/templates/service-flower.yaml         | 3 +++
 helm/superset/templates/service-ws.yaml             | 3 +++
 helm/superset/templates/service.yaml                | 3 +++
 helm/superset/templates/serviceaccount.yaml         | 3 +++
 helm/superset/values.yaml                           | 3 +++
 25 files changed, 88 insertions(+), 2 deletions(-)

diff --git a/helm/superset/Chart.yaml b/helm/superset/Chart.yaml
index 9ce9dd379b..2988973071 100644
--- a/helm/superset/Chart.yaml
+++ b/helm/superset/Chart.yaml
@@ -29,7 +29,7 @@ maintainers:
   - name: craig-rueda
     email: [email protected]
     url: https://github.com/craig-rueda
-version: 0.12.13
+version: 0.13.0
 dependencies:
   - name: postgresql
     version: 12.1.6
diff --git a/helm/superset/README.md b/helm/superset/README.md
index 5aeda56426..796fddfd00 100644
--- a/helm/superset/README.md
+++ b/helm/superset/README.md
@@ -23,7 +23,7 @@ NOTE: This file is generated by helm-docs: 
https://github.com/norwoodj/helm-docs
 
 # superset
 
-![Version: 
0.12.13](https://img.shields.io/badge/Version-0.12.13-informational?style=flat-square)
+![Version: 
0.13.0](https://img.shields.io/badge/Version-0.13.0-informational?style=flat-square)
 
 Apache Superset is a modern, enterprise-ready business intelligence web 
application
 
@@ -69,6 +69,7 @@ On helm this can be set on 
`extraSecretEnv.SUPERSET_SECRET_KEY` or `configOverri
 | extraConfigs | object | `{}` | Extra files to mount on `/app/pythonpath` |
 | extraEnv | object | `{}` | Extra environment variables that will be passed 
into pods |
 | extraEnvRaw | list | `[]` | Extra environment variables in RAW format that 
will be passed into pods |
+| extraLabels | object | `{}` | Labels to be added to all resources |
 | extraSecretEnv | object | `{}` | Extra environment variables to pass as 
secrets |
 | extraSecrets | object | `{}` | Extra files to mount on `/app/pythonpath` as 
secrets |
 | extraVolumeMounts | list | `[]` |  |
diff --git a/helm/superset/templates/configmap-superset.yaml 
b/helm/superset/templates/configmap-superset.yaml
index 9ca29666d2..fa0928c1fb 100644
--- a/helm/superset/templates/configmap-superset.yaml
+++ b/helm/superset/templates/configmap-superset.yaml
@@ -28,6 +28,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 data:
   {{- range $path, $config := .Values.extraConfigs }}
   {{ $path }}: |
diff --git a/helm/superset/templates/deployment-beat.yaml 
b/helm/superset/templates/deployment-beat.yaml
index df2fb1d2e9..ff298f478d 100644
--- a/helm/superset/templates/deployment-beat.yaml
+++ b/helm/superset/templates/deployment-beat.yaml
@@ -28,6 +28,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
   {{- if .Values.supersetCeleryBeat.deploymentAnnotations }}
   annotations: {{- toYaml .Values.supersetCeleryBeat.deploymentAnnotations | 
nindent 4 }}
   {{- end }}
@@ -58,6 +61,9 @@ spec:
       labels:
         app: "{{ template "superset.name" . }}-celerybeat"
         release: {{ .Release.Name }}
+        {{- if .Values.extraLabels }}
+          {{- toYaml .Values.extraLabels | nindent 8 }}
+        {{- end }}
         {{- if .Values.supersetCeleryBeat.podLabels }}
           {{- toYaml .Values.supersetCeleryBeat.podLabels | nindent 8 }}
         {{- end }}
diff --git a/helm/superset/templates/deployment-flower.yaml 
b/helm/superset/templates/deployment-flower.yaml
index c03c8a19f6..179df9309d 100644
--- a/helm/superset/templates/deployment-flower.yaml
+++ b/helm/superset/templates/deployment-flower.yaml
@@ -28,6 +28,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
   {{- if .Values.supersetCeleryFlower.deploymentAnnotations }}
   annotations: {{- toYaml .Values.supersetCeleryFlower.deploymentAnnotations | 
nindent 4 }}
   {{- end }}
@@ -47,6 +50,9 @@ spec:
       labels:
         app: "{{ template "superset.name" . }}-flower"
         release: {{ .Release.Name }}
+        {{- if .Values.extraLabels }}
+          {{- toYaml .Values.extraLabels | nindent 8 }}
+        {{- end }}
         {{- if .Values.supersetCeleryFlower.podLabels }}
           {{- toYaml .Values.supersetCeleryFlower.podLabels | nindent 8 }}
         {{- end }}
diff --git a/helm/superset/templates/deployment-worker.yaml 
b/helm/superset/templates/deployment-worker.yaml
index 214f9215f7..96ee915f29 100644
--- a/helm/superset/templates/deployment-worker.yaml
+++ b/helm/superset/templates/deployment-worker.yaml
@@ -27,6 +27,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
     {{- if .Values.supersetWorker.deploymentLabels }}
       {{- toYaml .Values.supersetWorker.deploymentLabels | nindent 4 }}
     {{- end }}
@@ -64,6 +67,9 @@ spec:
       labels:
         app: {{ template "superset.name" . }}-worker
         release: {{ .Release.Name }}
+        {{- if .Values.extraLabels }}
+          {{- toYaml .Values.extraLabels | nindent 8 }}
+        {{- end }}
         {{- if .Values.supersetWorker.podLabels }}
           {{- toYaml .Values.supersetWorker.podLabels | nindent 8 }}
         {{- end }}
diff --git a/helm/superset/templates/deployment-ws.yaml 
b/helm/superset/templates/deployment-ws.yaml
index f9ac663be9..868b84309f 100644
--- a/helm/superset/templates/deployment-ws.yaml
+++ b/helm/superset/templates/deployment-ws.yaml
@@ -28,6 +28,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
   {{- if .Values.supersetWebsockets.deploymentAnnotations }}
   annotations: {{- toYaml .Values.supersetWebsockets.deploymentAnnotations | 
nindent 4 }}
   {{- end }}
@@ -50,6 +53,9 @@ spec:
       labels:
         app: "{{ template "superset.name" . }}-ws"
         release: {{ .Release.Name }}
+        {{- if .Values.extraLabels }}
+          {{- toYaml .Values.extraLabels | nindent 8 }}
+        {{- end }}
         {{- if .Values.supersetWebsockets.podLabels }}
           {{- toYaml .Values.supersetWebsockets.podLabels | nindent 8 }}
         {{- end }}
diff --git a/helm/superset/templates/deployment.yaml 
b/helm/superset/templates/deployment.yaml
index 60eddc4165..444ec103da 100644
--- a/helm/superset/templates/deployment.yaml
+++ b/helm/superset/templates/deployment.yaml
@@ -27,6 +27,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
     {{- if .Values.supersetNode.deploymentLabels }}
       {{- toYaml .Values.supersetNode.deploymentLabels | nindent 4 }}
     {{- end }}
@@ -66,6 +69,9 @@ spec:
       labels:
         app: {{ template "superset.name" . }}
         release: {{ .Release.Name }}
+        {{- if .Values.extraLabels }}
+          {{- toYaml .Values.extraLabels | nindent 8 }}
+        {{- end }}
         {{- if .Values.supersetNode.podLabels }}
           {{- toYaml .Values.supersetNode.podLabels | nindent 8 }}
         {{- end }}
diff --git a/helm/superset/templates/hpa-node.yaml 
b/helm/superset/templates/hpa-node.yaml
index aee2d1da78..843620ea15 100644
--- a/helm/superset/templates/hpa-node.yaml
+++ b/helm/superset/templates/hpa-node.yaml
@@ -27,6 +27,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 spec:
   scaleTargetRef:
     apiVersion: apps/v1
diff --git a/helm/superset/templates/hpa-worker.yaml 
b/helm/superset/templates/hpa-worker.yaml
index f2fd2154a4..fd4f027cc6 100644
--- a/helm/superset/templates/hpa-worker.yaml
+++ b/helm/superset/templates/hpa-worker.yaml
@@ -27,6 +27,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 spec:
   scaleTargetRef:
     apiVersion: apps/v1
diff --git a/helm/superset/templates/ingress.yaml 
b/helm/superset/templates/ingress.yaml
index 749c29134e..05acb20d6f 100644
--- a/helm/superset/templates/ingress.yaml
+++ b/helm/superset/templates/ingress.yaml
@@ -29,6 +29,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
   {{- with .Values.ingress.annotations }}
   annotations: {{- toYaml . | nindent 4 }}
   {{- end }}
diff --git a/helm/superset/templates/init-job.yaml 
b/helm/superset/templates/init-job.yaml
index ecc51490ef..0cb46e816b 100644
--- a/helm/superset/templates/init-job.yaml
+++ b/helm/superset/templates/init-job.yaml
@@ -23,6 +23,10 @@ kind: Job
 metadata:
   name: {{ template "superset.fullname" . }}-init-db
   namespace: {{ .Release.Namespace }}
+  {{- if .Values.extraLabels }}
+  labels:
+    {{- toYaml .Values.extraLabels | nindent 4 }}
+  {{- end }}
   {{- if .Values.init.jobAnnotations }}
   annotations: {{- toYaml .Values.init.jobAnnotations | nindent 4 }}
   {{- end }}
diff --git a/helm/superset/templates/pdb-beat.yaml 
b/helm/superset/templates/pdb-beat.yaml
index de808b475c..91cf5ddc58 100644
--- a/helm/superset/templates/pdb-beat.yaml
+++ b/helm/superset/templates/pdb-beat.yaml
@@ -31,6 +31,9 @@ metadata:
     chart: {{ template "superset.chart" $ }}
     release: {{ $.Release.Name }}
     heritage: {{ $.Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 spec:
 {{- if .minAvailable }}
   minAvailable: {{ .minAvailable }}
diff --git a/helm/superset/templates/pdb-flower.yaml 
b/helm/superset/templates/pdb-flower.yaml
index 363ec7a42a..241de3143c 100644
--- a/helm/superset/templates/pdb-flower.yaml
+++ b/helm/superset/templates/pdb-flower.yaml
@@ -31,6 +31,9 @@ metadata:
     chart: {{ template "superset.chart" $ }}
     release: {{ $.Release.Name }}
     heritage: {{ $.Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 spec:
 {{- if .minAvailable }}
   minAvailable: {{ .minAvailable }}
diff --git a/helm/superset/templates/pdb-worker.yaml 
b/helm/superset/templates/pdb-worker.yaml
index 1636622616..d4ec768fba 100644
--- a/helm/superset/templates/pdb-worker.yaml
+++ b/helm/superset/templates/pdb-worker.yaml
@@ -31,6 +31,9 @@ metadata:
     chart: {{ template "superset.chart" $ }}
     release: {{ $.Release.Name }}
     heritage: {{ $.Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 spec:
 {{- if .minAvailable }}
   minAvailable: {{ .minAvailable }}
diff --git a/helm/superset/templates/pdb-ws.yaml 
b/helm/superset/templates/pdb-ws.yaml
index 647d6b4944..0e303880aa 100644
--- a/helm/superset/templates/pdb-ws.yaml
+++ b/helm/superset/templates/pdb-ws.yaml
@@ -31,6 +31,9 @@ metadata:
     chart: {{ template "superset.chart" $ }}
     release: {{ $.Release.Name }}
     heritage: {{ $.Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 spec:
 {{- if .minAvailable }}
   minAvailable: {{ .minAvailable }}
diff --git a/helm/superset/templates/pdb.yaml b/helm/superset/templates/pdb.yaml
index 0d825343d3..3f86836f68 100644
--- a/helm/superset/templates/pdb.yaml
+++ b/helm/superset/templates/pdb.yaml
@@ -31,6 +31,9 @@ metadata:
     chart: {{ template "superset.chart" $ }}
     release: {{ $.Release.Name }}
     heritage: {{ $.Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 spec:
 {{- if .minAvailable }}
   minAvailable: {{ .minAvailable }}
diff --git a/helm/superset/templates/secret-env.yaml 
b/helm/superset/templates/secret-env.yaml
index 6537994960..04169ad150 100644
--- a/helm/superset/templates/secret-env.yaml
+++ b/helm/superset/templates/secret-env.yaml
@@ -27,6 +27,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: "{{ .Release.Name }}"
     heritage: "{{ .Release.Service }}"
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 type: Opaque
 stringData:
     REDIS_HOST: {{ tpl .Values.supersetNode.connections.redis_host . | quote }}
diff --git a/helm/superset/templates/secret-superset-config.yaml 
b/helm/superset/templates/secret-superset-config.yaml
index 41a051fa03..c672fe900b 100644
--- a/helm/superset/templates/secret-superset-config.yaml
+++ b/helm/superset/templates/secret-superset-config.yaml
@@ -27,6 +27,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: "{{ .Release.Name }}"
     heritage: "{{ .Release.Service }}"
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 type: Opaque
 stringData:
   superset_config.py: |
diff --git a/helm/superset/templates/secret-ws.yaml 
b/helm/superset/templates/secret-ws.yaml
index aaa9a24587..a559ac0056 100644
--- a/helm/superset/templates/secret-ws.yaml
+++ b/helm/superset/templates/secret-ws.yaml
@@ -28,6 +28,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: "{{ .Release.Name }}"
     heritage: "{{ .Release.Service }}"
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
 type: Opaque
 stringData:
   config.json: |
diff --git a/helm/superset/templates/service-flower.yaml 
b/helm/superset/templates/service-flower.yaml
index 8c198891b0..c2bda0fb86 100644
--- a/helm/superset/templates/service-flower.yaml
+++ b/helm/superset/templates/service-flower.yaml
@@ -28,6 +28,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
   {{- with .Values.supersetCeleryFlower.service.annotations }}
   annotations: {{- toYaml . | nindent 4 }}
   {{- end }}
diff --git a/helm/superset/templates/service-ws.yaml 
b/helm/superset/templates/service-ws.yaml
index 3dd02b77a6..1517e2e577 100644
--- a/helm/superset/templates/service-ws.yaml
+++ b/helm/superset/templates/service-ws.yaml
@@ -28,6 +28,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
   {{- with .Values.supersetWebsockets.service.annotations }}
   annotations: {{- toYaml . | nindent 4 }}
   {{- end }}
diff --git a/helm/superset/templates/service.yaml 
b/helm/superset/templates/service.yaml
index f20c80c78d..e435961ba9 100644
--- a/helm/superset/templates/service.yaml
+++ b/helm/superset/templates/service.yaml
@@ -27,6 +27,9 @@ metadata:
     chart: {{ template "superset.chart" . }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
   {{- with .Values.service.annotations }}
   annotations: {{- toYaml . | nindent 4 }}
   {{- end }}
diff --git a/helm/superset/templates/serviceaccount.yaml 
b/helm/superset/templates/serviceaccount.yaml
index 0c2cfb30ef..e92fc6202f 100644
--- a/helm/superset/templates/serviceaccount.yaml
+++ b/helm/superset/templates/serviceaccount.yaml
@@ -32,6 +32,9 @@ metadata:
     kubernetes.io/cluster-service: "true"
     {{- end }}
     addonmanager.kubernetes.io/mode: Reconcile
+    {{- if .Values.extraLabels }}
+      {{- toYaml .Values.extraLabels | nindent 4 }}
+    {{- end }}
   {{- if .Values.serviceAccount.annotations }}
   annotations: {{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
   {{- end }}
diff --git a/helm/superset/values.yaml b/helm/superset/values.yaml
index c0fcda027e..7bd2a7b20a 100644
--- a/helm/superset/values.yaml
+++ b/helm/superset/values.yaml
@@ -27,6 +27,9 @@ nameOverride: ~
 # -- Provide a name to override the full names of resources
 fullnameOverride: ~
 
+# -- Labels to be added to all resources
+extraLabels: {}
+
 # -- User ID directive. This user must have enough permissions to run the 
bootstrap script
 # Running containers as root is not recommended in production. Change this to 
another UID - e.g. 1000 to be more secure
 runAsUser: 0

Reply via email to