diff --git a/charts/ui/Chart.yaml b/charts/ui/Chart.yaml index 7b51bcf..7040924 100644 --- a/charts/ui/Chart.yaml +++ b/charts/ui/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "3.0" description: A Helm chart for Kubernetes name: ui -version: 0.3.1 +version: 0.4.0 home: https://github.com/wbstack maintainers: - name: WBstack diff --git a/charts/ui/templates/_helpers.tpl b/charts/ui/templates/_helpers.tpl index d5a8b43..68e468a 100644 --- a/charts/ui/templates/_helpers.tpl +++ b/charts/ui/templates/_helpers.tpl @@ -43,3 +43,11 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} + +{{/* +Common annotations +*/}} +{{- define "ui.annotations" -}} +meta.helm.sh/release-name: {{ include "ui.name" . }} +meta.helm.sh/release-namespace: {{ .Release.Namespace }} +{{- end -}} diff --git a/charts/ui/templates/deployment.yaml b/charts/ui/templates/deployment.yaml index 001c98f..97c1570 100644 --- a/charts/ui/templates/deployment.yaml +++ b/charts/ui/templates/deployment.yaml @@ -4,6 +4,8 @@ metadata: name: {{ include "ui.fullname" . }} labels: {{ include "ui.labels" . | indent 4 }} + annotations: +{{ include "ui.annotations" . | indent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: @@ -18,6 +20,8 @@ spec: {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} + annotations: +{{ include "ui.annotations" . | indent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: diff --git a/charts/ui/templates/ingress.yaml b/charts/ui/templates/ingress.yaml index 52a0491..3edf10e 100644 --- a/charts/ui/templates/ingress.yaml +++ b/charts/ui/templates/ingress.yaml @@ -6,10 +6,11 @@ metadata: name: {{ $fullName }} labels: {{ include "ui.labels" . | indent 4 }} - {{- with .Values.ingress.annotations }} annotations: - {{- toYaml . | nindent 4 }} - {{- end }} +{{ include "ui.annotations" . | indent 4 }} + {{- with .Values.ingress.annotations }} + {{- toYaml . | nindent 4 }} + {{- end }} spec: {{- if .Values.ingress.tls }} tls: diff --git a/charts/ui/templates/service.yaml b/charts/ui/templates/service.yaml index 1a1cc78..9a1bcd5 100644 --- a/charts/ui/templates/service.yaml +++ b/charts/ui/templates/service.yaml @@ -4,6 +4,8 @@ metadata: name: {{ include "ui.fullname" . }} labels: {{ include "ui.labels" . | indent 4 }} + annotations: +{{ include "ui.annotations" . | indent 4 }} spec: type: {{ .Values.service.type }} ports: