Skip to content

Commit

Permalink
ui 0.4.0 : add helm release annotations (#146)
Browse files Browse the repository at this point in the history
* add common helm annotations

* fix indenting and release name

* bump chart version
  • Loading branch information
deer-wmde authored Aug 16, 2024
1 parent fc660c4 commit d90ef9b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions charts/ui/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
4 changes: 4 additions & 0 deletions charts/ui/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -18,6 +20,8 @@ spec:
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
annotations:
{{ include "ui.annotations" . | indent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
Expand Down
7 changes: 4 additions & 3 deletions charts/ui/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions charts/ui/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit d90ef9b

Please sign in to comment.