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-chart): Add extraLabels to all resources #30710

Merged
merged 5 commits into from
Oct 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 3 additions & 0 deletions helm/superset/templates/configmap-superset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
data:
{{- range $path, $config := .Values.extraConfigs }}
{{ $path }}: |
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/deployment-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- if .Values.supersetCeleryBeat.deploymentAnnotations }}
annotations: {{- toYaml .Values.supersetCeleryBeat.deploymentAnnotations | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/deployment-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- if .Values.supersetCeleryFlower.deploymentAnnotations }}
annotations: {{- toYaml .Values.supersetCeleryFlower.deploymentAnnotations | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/deployment-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- if .Values.supersetWorker.deploymentLabels }}
{{- toYaml .Values.supersetWorker.deploymentLabels | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/deployment-ws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- if .Values.supersetWebsockets.deploymentAnnotations }}
annotations: {{- toYaml .Values.supersetWebsockets.deploymentAnnotations | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- if .Values.supersetNode.deploymentLabels }}
{{- toYaml .Values.supersetNode.deploymentLabels | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/hpa-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: apps/v1
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/hpa-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
spec:
scaleTargetRef:
apiVersion: apps/v1
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- with .Values.ingress.annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
4 changes: 4 additions & 0 deletions helm/superset/templates/init-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ kind: Job
metadata:
name: {{ template "superset.fullname" . }}-init-db
namespace: {{ .Release.Namespace }}
{{- if .Values.superset.global.extraLabels }}
labels:
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- if .Values.init.jobAnnotations }}
annotations: {{- toYaml .Values.init.jobAnnotations | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/pdb-beat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ metadata:
chart: {{ template "superset.chart" $ }}
release: {{ $.Release.Name }}
heritage: {{ $.Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
spec:
{{- if .minAvailable }}
minAvailable: {{ .minAvailable }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/pdb-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ metadata:
chart: {{ template "superset.chart" $ }}
release: {{ $.Release.Name }}
heritage: {{ $.Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
spec:
{{- if .minAvailable }}
minAvailable: {{ .minAvailable }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/pdb-worker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ metadata:
chart: {{ template "superset.chart" $ }}
release: {{ $.Release.Name }}
heritage: {{ $.Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
spec:
{{- if .minAvailable }}
minAvailable: {{ .minAvailable }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/pdb-ws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ metadata:
chart: {{ template "superset.chart" $ }}
release: {{ $.Release.Name }}
heritage: {{ $.Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
spec:
{{- if .minAvailable }}
minAvailable: {{ .minAvailable }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ metadata:
chart: {{ template "superset.chart" $ }}
release: {{ $.Release.Name }}
heritage: {{ $.Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
spec:
{{- if .minAvailable }}
minAvailable: {{ .minAvailable }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/secret-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
type: Opaque
stringData:
REDIS_HOST: {{ tpl .Values.supersetNode.connections.redis_host . | quote }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/secret-superset-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
type: Opaque
stringData:
superset_config.py: |
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/secret-ws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
type: Opaque
stringData:
config.json: |
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/service-flower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- with .Values.supersetCeleryFlower.service.annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/service-ws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- with .Values.supersetWebsockets.service.annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ metadata:
chart: {{ template "superset.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations: {{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
3 changes: 3 additions & 0 deletions helm/superset/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ metadata:
kubernetes.io/cluster-service: "true"
{{- end }}
addonmanager.kubernetes.io/mode: Reconcile
{{- if .Values.superset.global.extraLabels }}
{{- toYaml .Values.superset.global.extraLabels | nindent 4 }}
{{- end }}
{{- if .Values.serviceAccount.annotations }}
annotations: {{- toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions helm/superset/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ nameOverride: ~
# -- Provide a name to override the full names of resources
fullnameOverride: ~

# -- Global values for the Superset chart
global:
# -- Labels to be added to all resources
extraLabels: {}

maxforasteiro marked this conversation as resolved.
Show resolved Hide resolved
# -- 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
Expand Down