From b504d781858e9195a5ec45886e5de8198a662339 Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Wed, 9 Dec 2020 22:37:19 +0100 Subject: [PATCH] Use commons labels on the other charts --- charts/commento/Chart.lock | 7 +- charts/commento/Chart.yaml | 5 +- charts/commento/templates/_helpers.tpl | 32 --------- charts/commento/templates/deployment.yaml | 13 ++-- .../templates/horizontal-pod-autoscaler.yaml | 2 +- charts/commento/templates/ingress.yaml | 7 +- .../templates/pod-disruption-budget.yaml | 5 +- charts/commento/templates/service.yaml | 10 +-- .../templates/tests/test-connection.yaml | 9 +-- charts/default-backend/Chart.lock | 7 +- charts/default-backend/Chart.yaml | 5 +- charts/default-backend/templates/_helpers.tpl | 56 ---------------- .../templates/cronjob-role-binding.yaml | 11 ++- .../templates/cronjob-role.yaml | 7 +- .../templates/cronjob-service-account.yaml | 8 +-- charts/default-backend/templates/cronjob.yaml | 2 +- .../default-backend/templates/deployment.yaml | 19 ++---- .../templates/horizontal-pod-autoscaler.yaml | 2 +- charts/default-backend/templates/ingress.yaml | 8 +-- .../templates/pod-disruption-budget.yaml | 5 +- charts/default-backend/templates/service.yaml | 12 +--- .../test-default-backend-connection.yaml | 4 +- .../tests/test-metrics-connection.yaml | 4 +- charts/docker-hub-exporter/Chart.lock | 6 ++ charts/docker-hub-exporter/Chart.yaml | 6 +- .../docker-hub-exporter/templates/NOTES.txt | 2 +- .../templates/_helpers.tpl | 67 ------------------- .../templates/deployment.yaml | 16 ++--- .../templates/pod-disruption-budget.yaml | 5 +- .../templates/service.yaml | 6 +- .../templates/tests/test-connection.yaml | 6 +- charts/pi-hole-exporter/Chart.lock | 6 ++ charts/pi-hole-exporter/Chart.yaml | 6 +- charts/pi-hole-exporter/templates/NOTES.txt | 2 +- .../pi-hole-exporter/templates/_helpers.tpl | 67 ------------------- .../templates/deployment.yaml | 16 ++--- .../templates/pod-disruption-budget.yaml | 5 +- .../pi-hole-exporter/templates/service.yaml | 6 +- .../templates/tests/test-connection.yaml | 6 +- charts/redirect/Chart.lock | 7 +- charts/redirect/Chart.yaml | 5 +- charts/redirect/templates/_helpers.tpl | 64 ++---------------- charts/redirect/templates/config.yaml | 4 +- .../templates/cronjob-role-binding.yaml | 11 ++- charts/redirect/templates/cronjob-role.yaml | 7 +- .../templates/cronjob-service-account.yaml | 8 +-- charts/redirect/templates/cronjob.yaml | 2 +- charts/redirect/templates/deployment.yaml | 26 +++---- .../templates/grafana-influxdb-dashboard.yaml | 3 +- .../grafana-prometheus-dashboard.yaml | 3 +- .../templates/horizontal-pod-autoscaler.yaml | 2 +- charts/redirect/templates/ingress.yaml | 12 ++-- .../templates/pod-disruption-budget.yaml | 5 +- .../redirect/templates/service-account.yaml | 4 +- charts/redirect/templates/service.yaml | 6 +- .../tests/test-metrics-connection.yaml | 6 +- .../tests/test-redirect-connection.yaml | 6 +- .../redis-db-assignment-operator/Chart.lock | 6 ++ .../redis-db-assignment-operator/Chart.yaml | 6 +- .../templates/_helpers.tpl | 60 +---------------- .../templates/cluster-role-binding.yaml | 12 ++-- .../templates/cluster-role.yaml | 8 +-- .../templates/deployment.yaml | 16 ++--- .../templates/service-account.yaml | 10 +-- 64 files changed, 194 insertions(+), 573 deletions(-) delete mode 100644 charts/commento/templates/_helpers.tpl delete mode 100644 charts/default-backend/templates/_helpers.tpl create mode 100644 charts/docker-hub-exporter/Chart.lock delete mode 100644 charts/docker-hub-exporter/templates/_helpers.tpl create mode 100644 charts/pi-hole-exporter/Chart.lock delete mode 100644 charts/pi-hole-exporter/templates/_helpers.tpl create mode 100644 charts/redis-db-assignment-operator/Chart.lock diff --git a/charts/commento/Chart.lock b/charts/commento/Chart.lock index cd6b7ca..7463891 100644 --- a/charts/commento/Chart.lock +++ b/charts/commento/Chart.lock @@ -1,6 +1,9 @@ dependencies: +- name: commons + repository: https://helm.wyrihaximus.net/ + version: 0.1.0 - name: horizontal-pod-autoscalers repository: https://helm.wyrihaximus.net/ version: 0.2.0 -digest: sha256:c24acf3aaf1d76d5b431e2d608ee5162acf6e5bb0ad764b2a3cf81e37bb499bf -generated: "2020-11-13T22:49:13.62060267+01:00" +digest: sha256:05017e6af7c52308e69f1e7769366c66e1e8194661b08792b1d1bb24b2ba49de +generated: "2020-12-09T22:30:21.6534143+01:00" diff --git a/charts/commento/Chart.yaml b/charts/commento/Chart.yaml index 3ff19a1..3ed2794 100644 --- a/charts/commento/Chart.yaml +++ b/charts/commento/Chart.yaml @@ -4,11 +4,14 @@ description: Helm chart to install commento on a kubernetes cluster home: https://commento.io/ icon: https://cdn.commento.io/images/logo.svg name: commento -version: 0.1.1 +version: 0.1.2 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net dependencies: + - name: commons + version: ^0.1 + repository: https://helm.wyrihaximus.net/ - name: horizontal-pod-autoscalers version: ^0.2 repository: https://helm.wyrihaximus.net/ diff --git a/charts/commento/templates/_helpers.tpl b/charts/commento/templates/_helpers.tpl deleted file mode 100644 index bfb129b..0000000 --- a/charts/commento/templates/_helpers.tpl +++ /dev/null @@ -1,32 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "commento.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "commento.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "commento.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/commento/templates/deployment.yaml b/charts/commento/templates/deployment.yaml index 5b9252d..2a4b1f9 100644 --- a/charts/commento/templates/deployment.yaml +++ b/charts/commento/templates/deployment.yaml @@ -1,23 +1,18 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ template "commento.fullname" . }} + name: {{ template "commons.fullname" . }} labels: - app: {{ template "commento.name" . }} - chart: {{ template "commento.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + {{- include "commons.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicas }} selector: matchLabels: - app: {{ template "commento.name" . }} - release: {{ .Release.Name }} + {{- include "commons.selectorLabels" . | nindent 6 }} template: metadata: labels: - app: {{ template "commento.name" . }} - release: {{ .Release.Name }} + {{- include "commons.labels" . | nindent 8 }} spec: containers: - name: commento diff --git a/charts/commento/templates/horizontal-pod-autoscaler.yaml b/charts/commento/templates/horizontal-pod-autoscaler.yaml index 4c7e31f..070787a 100644 --- a/charts/commento/templates/horizontal-pod-autoscaler.yaml +++ b/charts/commento/templates/horizontal-pod-autoscaler.yaml @@ -1,3 +1,3 @@ {{- if .Values.hpa.enable -}} -{{- include "horizontal-pod-autoscalers.hpa" (dict "name" (include "commento.fullname" .) "replicas" (dict "min" .Values.replicas "max" .Values.hpa.maxReplicas)) -}} +{{- include "horizontal-pod-autoscalers.hpa" (dict "name" (include "commons.fullname" .) "replicas" (dict "min" .Values.replicas "max" .Values.hpa.maxReplicas)) -}} {{ end }} diff --git a/charts/commento/templates/ingress.yaml b/charts/commento/templates/ingress.yaml index 432fbdb..f5377ea 100644 --- a/charts/commento/templates/ingress.yaml +++ b/charts/commento/templates/ingress.yaml @@ -1,15 +1,12 @@ {{- if eq (eq .Values.ingress.host "comments.YOURDOMAIN.TLD") false }} {{- $chartName := .Chart.Name -}} -{{- $fullName := include "commento.fullname" . -}} +{{- $fullName := include "commons.fullname" . -}} apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: {{ $fullName }} labels: - app: {{ template "commento.name" . }} - chart: {{ template "commento.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + {{- include "commons.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{ toYaml . | indent 4 }} diff --git a/charts/commento/templates/pod-disruption-budget.yaml b/charts/commento/templates/pod-disruption-budget.yaml index 5b5b84f..4f7eb1f 100644 --- a/charts/commento/templates/pod-disruption-budget.yaml +++ b/charts/commento/templates/pod-disruption-budget.yaml @@ -2,11 +2,10 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: - name: {{ template "commento.fullname" . }}-pdb + name: {{ template "commons.fullname" . }} spec: maxUnavailable: 1 selector: matchLabels: - app: {{ include "commento.fullname" . }} - release: {{ include "commento.fullname" . }} + {{- include "commons.selectorLabels" . | nindent 6 }} {{ end }} \ No newline at end of file diff --git a/charts/commento/templates/service.yaml b/charts/commento/templates/service.yaml index e8766af..78ad033 100644 --- a/charts/commento/templates/service.yaml +++ b/charts/commento/templates/service.yaml @@ -1,12 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "commento.fullname" . }} + name: {{ template "commons.fullname" . }} labels: - app: {{ template "commento.name" . }} - chart: {{ template "commento.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + {{- include "commons.labels" . | nindent 4 }} spec: type: ClusterIP ports: @@ -15,5 +12,4 @@ spec: protocol: TCP name: commento selector: - app: {{ template "commento.name" . }} - release: {{ .Release.Name }} + {{- include "commons.selectorLabels" . | nindent 6 }} diff --git a/charts/commento/templates/tests/test-connection.yaml b/charts/commento/templates/tests/test-connection.yaml index 634ce23..7566800 100644 --- a/charts/commento/templates/tests/test-connection.yaml +++ b/charts/commento/templates/tests/test-connection.yaml @@ -1,12 +1,9 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include "commento.fullname" . }}-test-connection" + name: "{{ include "commons.fullname" . }}-test-connection" labels: - app: {{ template "commento.name" . }} - chart: {{ template "commento.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + {{- include "commons.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success spec: @@ -14,5 +11,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include "commento.fullname" . }}:8967/login'] + args: ['{{ include "commons.fullname" . }}:8967/login'] restartPolicy: Never diff --git a/charts/default-backend/Chart.lock b/charts/default-backend/Chart.lock index 09e1cf4..ac2ef23 100644 --- a/charts/default-backend/Chart.lock +++ b/charts/default-backend/Chart.lock @@ -1,9 +1,12 @@ dependencies: +- name: commons + repository: https://helm.wyrihaximus.net/ + version: 0.1.0 - name: cron-jobs repository: https://helm.wyrihaximus.net/ version: 0.1.2 - name: horizontal-pod-autoscalers repository: https://helm.wyrihaximus.net/ version: 0.2.0 -digest: sha256:da3cabd092499f75f425706a7faae76bdefe5a54d805628ea48a3b769e8cbf2b -generated: "2020-10-21T20:34:40.497024599+02:00" +digest: sha256:9311081e2d53beca7cf5d1bf74a8f755085bbaafec6c1ae2efee4afd6c1b30a5 +generated: "2020-12-09T23:59:39.5032794+01:00" diff --git a/charts/default-backend/Chart.yaml b/charts/default-backend/Chart.yaml index c05d1e6..6508466 100644 --- a/charts/default-backend/Chart.yaml +++ b/charts/default-backend/Chart.yaml @@ -4,13 +4,16 @@ description: A Helm chart for Kubernetes home: https://github.com/wyrihaximusnet/docker-default-backend icon: https://helm.wyrihaximus.net/images/charts/default-backend.png type: application -version: 0.4.2 +version: 0.4.3 kubeVersion: ^1.18 appVersion: random maintainers: - name: WyriHaximus email: helm@wyrihaximus.net dependencies: + - name: commons + version: ^0.1 + repository: https://helm.wyrihaximus.net/ - name: cron-jobs version: ^0.1 repository: https://helm.wyrihaximus.net/ diff --git a/charts/default-backend/templates/_helpers.tpl b/charts/default-backend/templates/_helpers.tpl deleted file mode 100644 index 5ad7450..0000000 --- a/charts/default-backend/templates/_helpers.tpl +++ /dev/null @@ -1,56 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "default-backend.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "default-backend.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define "default-backend.labels" -}} -helm.sh/chart: {{ include "default-backend.chart" . }} -{{ include "default-backend.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define "default-backend.selectorLabels" -}} -app.kubernetes.io/name: {{ include "default-backend.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{- define "default-backend.nameRevision" -}} -{{ template "default-backend.name" . }}___{{ .Release.Revision }} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "default-backend.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/default-backend/templates/cronjob-role-binding.yaml b/charts/default-backend/templates/cronjob-role-binding.yaml index 95ff32e..2b12adf 100644 --- a/charts/default-backend/templates/cronjob-role-binding.yaml +++ b/charts/default-backend/templates/cronjob-role-binding.yaml @@ -2,19 +2,16 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include "default-backend.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob namespace: {{ .Release.Namespace }} labels: - app: {{ include "default-backend.fullname" . }} - appRevision: {{ template "default-backend.nameRevision" . }} - release: {{ include "default-backend.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} + {{- include "commons.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: {{ include "default-backend.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob subjects: - kind: ServiceAccount - name: {{ include "default-backend.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob namespace: {{ .Release.Namespace }} {{ end }} diff --git a/charts/default-backend/templates/cronjob-role.yaml b/charts/default-backend/templates/cronjob-role.yaml index cd2f3b2..c73ffad 100644 --- a/charts/default-backend/templates/cronjob-role.yaml +++ b/charts/default-backend/templates/cronjob-role.yaml @@ -2,13 +2,10 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ include "default-backend.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob namespace: {{ .Release.Namespace }} labels: - app: {{ include "default-backend.fullname" . }} - appRevision: {{ template "default-backend.nameRevision" . }} - release: {{ include "default-backend.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} + {{- include "commons.labels" . | nindent 4 }} rules: - apiGroups: [""] resources: ["pods"] diff --git a/charts/default-backend/templates/cronjob-service-account.yaml b/charts/default-backend/templates/cronjob-service-account.yaml index ef379d2..1654541 100644 --- a/charts/default-backend/templates/cronjob-service-account.yaml +++ b/charts/default-backend/templates/cronjob-service-account.yaml @@ -2,12 +2,8 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include "default-backend.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob namespace: {{ .Release.Namespace }} labels: - app: {{ include "default-backend.fullname" . }} - appRevision: {{ template "default-backend.nameRevision" . }} - release: {{ include "default-backend.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} - {{- include "default-backend.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} {{ end }} diff --git a/charts/default-backend/templates/cronjob.yaml b/charts/default-backend/templates/cronjob.yaml index 095a9ac..36ef0f1 100644 --- a/charts/default-backend/templates/cronjob.yaml +++ b/charts/default-backend/templates/cronjob.yaml @@ -1,3 +1,3 @@ {{- if .Values.cron.replaceOldestPodHourly -}} -{{- include "cron-jobs.cronjob" (fromYaml (.Files.Get "values/cronjob.yaml" | replace "[[fullname]]" (include "default-backend.fullname" .) | replace "[[app]]" (include "default-backend.name" .) | replace "[[release]]" .Release.Name | replace "[[namespace]]" .Release.Namespace)) -}} +{{- include "cron-jobs.cronjob" (fromYaml (.Files.Get "values/cronjob.yaml" | replace "[[fullname]]" (include "commons.fullname" .) | replace "[[app]]" (include "commons.name" .) | replace "[[release]]" .Release.Name | replace "[[namespace]]" .Release.Namespace)) -}} {{ end }} diff --git a/charts/default-backend/templates/deployment.yaml b/charts/default-backend/templates/deployment.yaml index 3cc648e..765713a 100644 --- a/charts/default-backend/templates/deployment.yaml +++ b/charts/default-backend/templates/deployment.yaml @@ -1,20 +1,14 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ template "default-backend.fullname" . }} + name: {{ template "commons.fullname" . }} labels: - app: {{ template "default-backend.name" . }} - appRevision: {{ template "default-backend.nameRevision" . }} - chart: {{ template "default-backend.chart" . }} - release: {{ .Release.Name }} - releaseRevision: {{ .Release.Revision | quote }} - heritage: {{ .Release.Service }} + {{- include "commons.labels" . | nindent 4 }} app.kubernetes.io/component: controller spec: selector: matchLabels: - app: {{ template "default-backend.name" . }} - release: {{ .Release.Name }} + {{- include "commons.selectorLabels" . | nindent 6 }} replicas: {{ .Values.replicas }} template: metadata: @@ -22,10 +16,7 @@ spec: prometheus.io/scrape: "true" prometheus.io/port: "9696" labels: - app: {{ template "default-backend.name" . }} - appRevision: {{ template "default-backend.nameRevision" . }} - release: {{ .Release.Name }} - releaseRevision: {{ .Release.Revision | quote }} + {{- include "commons.labels" . | nindent 8 }} spec: containers: - name: default-backend @@ -64,5 +55,5 @@ spec: - key: appRevision operator: In values: - - {{ template "default-backend.nameRevision" . }} + - {{ template "commons.nameRevision" . }} topologyKey: "kubernetes.io/hostname" diff --git a/charts/default-backend/templates/horizontal-pod-autoscaler.yaml b/charts/default-backend/templates/horizontal-pod-autoscaler.yaml index bc60494..070787a 100644 --- a/charts/default-backend/templates/horizontal-pod-autoscaler.yaml +++ b/charts/default-backend/templates/horizontal-pod-autoscaler.yaml @@ -1,3 +1,3 @@ {{- if .Values.hpa.enable -}} -{{- include "horizontal-pod-autoscalers.hpa" (dict "name" (include "default-backend.fullname" .) "replicas" (dict "min" .Values.replicas "max" .Values.hpa.maxReplicas)) -}} +{{- include "horizontal-pod-autoscalers.hpa" (dict "name" (include "commons.fullname" .) "replicas" (dict "min" .Values.replicas "max" .Values.hpa.maxReplicas)) -}} {{ end }} diff --git a/charts/default-backend/templates/ingress.yaml b/charts/default-backend/templates/ingress.yaml index d8f0fa5..6842f6f 100644 --- a/charts/default-backend/templates/ingress.yaml +++ b/charts/default-backend/templates/ingress.yaml @@ -1,16 +1,12 @@ {{- if not (empty .Values.ingress.hosts) -}} {{- $chartName := .Chart.Name -}} -{{- $fullName := include "default-backend.fullname" . -}} +{{- $fullName := include "commons.fullname" . -}} apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: {{ $fullName }} labels: - app: {{ template "default-backend.name" . }} - chart: {{ template "default-backend.chart" . }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - releaseRevision: {{ .Release.Revision | quote }} + {{- include "commons.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{ toYaml . | indent 4 }} diff --git a/charts/default-backend/templates/pod-disruption-budget.yaml b/charts/default-backend/templates/pod-disruption-budget.yaml index 4d9182b..4625472 100644 --- a/charts/default-backend/templates/pod-disruption-budget.yaml +++ b/charts/default-backend/templates/pod-disruption-budget.yaml @@ -2,11 +2,10 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: - name: {{ template "default-backend.fullname" . }} + name: {{ template "commons.fullname" . }} spec: maxUnavailable: 1 selector: matchLabels: - app: {{ include "default-backend.fullname" . }} - release: {{ include "default-backend.fullname" . }} + {{- include "commons.selectorLabels" . | nindent 6 }} {{ end }} diff --git a/charts/default-backend/templates/service.yaml b/charts/default-backend/templates/service.yaml index 3e05f42..e378434 100644 --- a/charts/default-backend/templates/service.yaml +++ b/charts/default-backend/templates/service.yaml @@ -1,14 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ template "default-backend.fullname" . }} + name: {{ template "commons.fullname" . }} labels: - app: {{ template "default-backend.name" . }} - appRevision: {{ template "default-backend.nameRevision" . }} - chart: {{ template "default-backend.chart" . }} - release: {{ .Release.Name }} - releaseRevision: {{ .Release.Revision | quote }} - heritage: {{ .Release.Service }} + {{- include "commons.labels" . | nindent 4 }} spec: type: ClusterIP ports: @@ -21,5 +16,4 @@ spec: protocol: TCP name: metrics selector: - app: {{ template "default-backend.name" . }} - release: {{ .Release.Name }} + {{- include "commons.selectorLabels" . | nindent 6 }} diff --git a/charts/default-backend/templates/tests/test-default-backend-connection.yaml b/charts/default-backend/templates/tests/test-default-backend-connection.yaml index 87ead39..fb607b2 100644 --- a/charts/default-backend/templates/tests/test-default-backend-connection.yaml +++ b/charts/default-backend/templates/tests/test-default-backend-connection.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include "default-backend.fullname" . }}-test-default-backend-connection" + name: {{ include "commons.fullname" . }}-test-default-backend-connection annotations: "helm.sh/hook": test-success spec: @@ -9,5 +9,5 @@ spec: - name: wget image: alpine command: ['nc'] - args: ['-zv','{{ include "default-backend.fullname" . }}:6969'] + args: ['-zv','{{ include "commons.fullname" . }}:6969'] restartPolicy: Never diff --git a/charts/default-backend/templates/tests/test-metrics-connection.yaml b/charts/default-backend/templates/tests/test-metrics-connection.yaml index 96589a3..ba3129c 100644 --- a/charts/default-backend/templates/tests/test-metrics-connection.yaml +++ b/charts/default-backend/templates/tests/test-metrics-connection.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include "default-backend.fullname" . }}-test-metrics-connection" + name: {{ include "commons.fullname" . }}-test-metrics-connection annotations: "helm.sh/hook": test-success spec: @@ -9,5 +9,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include "default-backend.fullname" . }}:9696'] + args: ['{{ include "commons.fullname" . }}:9696'] restartPolicy: Never diff --git a/charts/docker-hub-exporter/Chart.lock b/charts/docker-hub-exporter/Chart.lock new file mode 100644 index 0000000..59ce3e9 --- /dev/null +++ b/charts/docker-hub-exporter/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: commons + repository: https://helm.wyrihaximus.net/ + version: 0.1.0 +digest: sha256:efd30fea39b80df7317aac63d028ff031778f475f23460a62ccbc554c2e4e264 +generated: "2020-12-11T00:01:07.4091571+01:00" diff --git a/charts/docker-hub-exporter/Chart.yaml b/charts/docker-hub-exporter/Chart.yaml index 93b72df..9a6e4f2 100644 --- a/charts/docker-hub-exporter/Chart.yaml +++ b/charts/docker-hub-exporter/Chart.yaml @@ -4,8 +4,12 @@ description: Docker Hub Exporter home: https://github.com/jessestuart/docker-hub-exporter icon: https://helm.wyrihaximus.net/images/charts/docker-hub-exporter.png type: application -version: 0.5.2 +version: 0.5.3 appVersion: d05df48 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net +dependencies: + - name: commons + version: ^0.1 + repository: https://helm.wyrihaximus.net/ diff --git a/charts/docker-hub-exporter/templates/NOTES.txt b/charts/docker-hub-exporter/templates/NOTES.txt index a279e47..5eae751 100644 --- a/charts/docker-hub-exporter/templates/NOTES.txt +++ b/charts/docker-hub-exporter/templates/NOTES.txt @@ -1,7 +1,7 @@ Congratulations, your prometheus compatible scraped Docker hub metrics are now available for scraping. You can access them by using a port forward: -kubectl port-forward svc/{{ include ".helm.fullname" . }} 9170:9170 -n {{ .Release.Namespace }} +kubectl port-forward svc/{{ include "commons.fullname" . }} 9170:9170 -n {{ .Release.Namespace }} And then point your browser to: http://localhost:9170/ \ No newline at end of file diff --git a/charts/docker-hub-exporter/templates/_helpers.tpl b/charts/docker-hub-exporter/templates/_helpers.tpl deleted file mode 100644 index cf725e2..0000000 --- a/charts/docker-hub-exporter/templates/_helpers.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define ".helm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define ".helm.nameRevision" -}} -{{ template ".helm.name" . }}___{{ .Release.Revision }} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define ".helm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define ".helm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define ".helm.labels" -}} -helm.sh/chart: {{ include ".helm.chart" . }} -{{ include ".helm.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define ".helm.selectorLabels" -}} -app.kubernetes.io/name: {{ include ".helm.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define ".helm.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include ".helm.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/docker-hub-exporter/templates/deployment.yaml b/charts/docker-hub-exporter/templates/deployment.yaml index d3ae9e8..bdca351 100644 --- a/charts/docker-hub-exporter/templates/deployment.yaml +++ b/charts/docker-hub-exporter/templates/deployment.yaml @@ -1,27 +1,21 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicas }} selector: matchLabels: - {{- include ".helm.selectorLabels" . | nindent 6 }} + {{- include "commons.selectorLabels" . | nindent 6 }} template: metadata: annotations: prometheus.io/scrape: "true" prometheus.io/port: "9170" labels: - app: {{ include ".helm.fullname" . }} - release: {{ include ".helm.fullname" . }} - {{- include ".helm.selectorLabels" . | nindent 8 }} + {{- include "commons.labels" . | nindent 8 }} spec: containers: - name: docker-hub-exporter @@ -64,5 +58,5 @@ spec: - key: app operator: In values: - - {{ template ".helm.nameRevision" . }} + - {{ template "commons.nameRevision" . }} topologyKey: "kubernetes.io/hostname" diff --git a/charts/docker-hub-exporter/templates/pod-disruption-budget.yaml b/charts/docker-hub-exporter/templates/pod-disruption-budget.yaml index d26a726..2b87410 100644 --- a/charts/docker-hub-exporter/templates/pod-disruption-budget.yaml +++ b/charts/docker-hub-exporter/templates/pod-disruption-budget.yaml @@ -2,11 +2,10 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} spec: minAvailable: 1 selector: matchLabels: - app: {{ include ".helm.fullname" . }} - release: {{ include ".helm.fullname" . }} + {{- include "commons.selectorLabels" . | nindent 6 }} {{ end }} \ No newline at end of file diff --git a/charts/docker-hub-exporter/templates/service.yaml b/charts/docker-hub-exporter/templates/service.yaml index 9387b67..920aed7 100644 --- a/charts/docker-hub-exporter/templates/service.yaml +++ b/charts/docker-hub-exporter/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} labels: - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} spec: type: ClusterIP ports: @@ -12,4 +12,4 @@ spec: protocol: TCP name: metrics selector: - {{- include ".helm.selectorLabels" . | nindent 4 }} + {{- include "commons.selectorLabels" . | nindent 4 }} diff --git a/charts/docker-hub-exporter/templates/tests/test-connection.yaml b/charts/docker-hub-exporter/templates/tests/test-connection.yaml index cacfe6c..9fd7d01 100644 --- a/charts/docker-hub-exporter/templates/tests/test-connection.yaml +++ b/charts/docker-hub-exporter/templates/tests/test-connection.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include ".helm.fullname" . }}-test-connection" + name: "{{ include "commons.fullname" . }}-test-connection" labels: -{{ include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success spec: @@ -11,5 +11,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include ".helm.fullname" . }}:9170'] + args: ['{{ include "commons.fullname" . }}:9170'] restartPolicy: Never diff --git a/charts/pi-hole-exporter/Chart.lock b/charts/pi-hole-exporter/Chart.lock new file mode 100644 index 0000000..ca5a7df --- /dev/null +++ b/charts/pi-hole-exporter/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: commons + repository: https://helm.wyrihaximus.net/ + version: 0.1.0 +digest: sha256:efd30fea39b80df7317aac63d028ff031778f475f23460a62ccbc554c2e4e264 +generated: "2020-12-11T00:09:10.5038491+01:00" diff --git a/charts/pi-hole-exporter/Chart.yaml b/charts/pi-hole-exporter/Chart.yaml index d10570c..3b71a4b 100644 --- a/charts/pi-hole-exporter/Chart.yaml +++ b/charts/pi-hole-exporter/Chart.yaml @@ -4,8 +4,12 @@ description: Pi-Hole Exporter home: https://github.com/eko/pihole-exporter icon: https://helm.wyrihaximus.net/images/charts/pi-hole-exporter.png type: application -version: 0.1.0 +version: 0.1.1 appVersion: d05df48 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net +dependencies: + - name: commons + version: ^0.1 + repository: https://helm.wyrihaximus.net/ diff --git a/charts/pi-hole-exporter/templates/NOTES.txt b/charts/pi-hole-exporter/templates/NOTES.txt index f7a558e..a3782e4 100644 --- a/charts/pi-hole-exporter/templates/NOTES.txt +++ b/charts/pi-hole-exporter/templates/NOTES.txt @@ -1,7 +1,7 @@ Congratulations, your prometheus compatible scraped Pi-Hole metrics are now available for scraping. You can access them by using a port forward: -kubectl port-forward svc/{{ include ".helm.fullname" . }} 9617:9617 -n {{ .Release.Namespace }} +kubectl port-forward svc/{{ include "commons.fullname" . }} 9617:9617 -n {{ .Release.Namespace }} And then point your browser to: http://localhost:9617/metrics \ No newline at end of file diff --git a/charts/pi-hole-exporter/templates/_helpers.tpl b/charts/pi-hole-exporter/templates/_helpers.tpl deleted file mode 100644 index cf725e2..0000000 --- a/charts/pi-hole-exporter/templates/_helpers.tpl +++ /dev/null @@ -1,67 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define ".helm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define ".helm.nameRevision" -}} -{{ template ".helm.name" . }}___{{ .Release.Revision }} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define ".helm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define ".helm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define ".helm.labels" -}} -helm.sh/chart: {{ include ".helm.chart" . }} -{{ include ".helm.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define ".helm.selectorLabels" -}} -app.kubernetes.io/name: {{ include ".helm.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define ".helm.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include ".helm.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} diff --git a/charts/pi-hole-exporter/templates/deployment.yaml b/charts/pi-hole-exporter/templates/deployment.yaml index a24b135..07ed9b0 100644 --- a/charts/pi-hole-exporter/templates/deployment.yaml +++ b/charts/pi-hole-exporter/templates/deployment.yaml @@ -1,27 +1,21 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicas }} selector: matchLabels: - {{- include ".helm.selectorLabels" . | nindent 6 }} + {{- include "commons.selectorLabels" . | nindent 6 }} template: metadata: annotations: prometheus.io/scrape: "true" prometheus.io/port: "9617" labels: - app: {{ include ".helm.fullname" . }} - release: {{ include ".helm.fullname" . }} - {{- include ".helm.selectorLabels" . | nindent 8 }} + {{- include "commons.labels" . | nindent 8 }} spec: containers: - name: pi-hole-exporter @@ -63,5 +57,5 @@ spec: - key: app operator: In values: - - {{ template ".helm.nameRevision" . }} + - {{ template "commons.nameRevision" . }} topologyKey: "kubernetes.io/hostname" diff --git a/charts/pi-hole-exporter/templates/pod-disruption-budget.yaml b/charts/pi-hole-exporter/templates/pod-disruption-budget.yaml index 5b99007..490ea82 100644 --- a/charts/pi-hole-exporter/templates/pod-disruption-budget.yaml +++ b/charts/pi-hole-exporter/templates/pod-disruption-budget.yaml @@ -2,11 +2,10 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} spec: minAvailable: 1 selector: matchLabels: - app: {{ include ".helm.fullname" . }} - release: {{ include ".helm.fullname" . }} + {{- include "commons.selectorLabels" . | nindent 6 }} {{ end }} diff --git a/charts/pi-hole-exporter/templates/service.yaml b/charts/pi-hole-exporter/templates/service.yaml index 72f3cb5..8e8deaa 100644 --- a/charts/pi-hole-exporter/templates/service.yaml +++ b/charts/pi-hole-exporter/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} labels: - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} spec: type: ClusterIP ports: @@ -12,4 +12,4 @@ spec: protocol: TCP name: metrics selector: - {{- include ".helm.selectorLabels" . | nindent 4 }} + {{- include "commons.selectorLabels" . | nindent 4 }} diff --git a/charts/pi-hole-exporter/templates/tests/test-connection.yaml b/charts/pi-hole-exporter/templates/tests/test-connection.yaml index f371620..6c7f033 100644 --- a/charts/pi-hole-exporter/templates/tests/test-connection.yaml +++ b/charts/pi-hole-exporter/templates/tests/test-connection.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include ".helm.fullname" . }}-test-connection" + name: "{{ include "commons.fullname" . }}-test-connection" labels: -{{ include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} annotations: "helm.sh/hook": test-success spec: @@ -11,5 +11,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include ".helm.fullname" . }}:9617/metrics'] + args: ['{{ include "commons.fullname" . }}:9617/metrics'] restartPolicy: Never diff --git a/charts/redirect/Chart.lock b/charts/redirect/Chart.lock index fe79ab2..8ce597f 100644 --- a/charts/redirect/Chart.lock +++ b/charts/redirect/Chart.lock @@ -1,9 +1,12 @@ dependencies: +- name: commons + repository: https://helm.wyrihaximus.net/ + version: 0.1.0 - name: cron-jobs repository: https://helm.wyrihaximus.net/ version: 0.1.2 - name: horizontal-pod-autoscalers repository: https://helm.wyrihaximus.net/ version: 0.2.0 -digest: sha256:da3cabd092499f75f425706a7faae76bdefe5a54d805628ea48a3b769e8cbf2b -generated: "2020-10-23T17:11:42.5637418+02:00" +digest: sha256:9311081e2d53beca7cf5d1bf74a8f755085bbaafec6c1ae2efee4afd6c1b30a5 +generated: "2020-12-11T00:18:29.908368+01:00" diff --git a/charts/redirect/Chart.yaml b/charts/redirect/Chart.yaml index 1d61310..536dfcb 100644 --- a/charts/redirect/Chart.yaml +++ b/charts/redirect/Chart.yaml @@ -4,13 +4,16 @@ description: Redirect home: https://github.com/wyrihaximusnet/docker-redirect icon: https://helm.wyrihaximus.net/images/charts/redirect.png type: application -version: 0.9.2 +version: 0.9.3 kubeVersion: ^1.18 appVersion: random maintainers: - name: WyriHaximus email: helm@wyrihaximus.net dependencies: + - name: commons + version: ^0.1 + repository: https://helm.wyrihaximus.net/ - name: cron-jobs version: ^0.1 repository: https://helm.wyrihaximus.net/ diff --git a/charts/redirect/templates/_helpers.tpl b/charts/redirect/templates/_helpers.tpl index 54e7d71..6e35490 100644 --- a/charts/redirect/templates/_helpers.tpl +++ b/charts/redirect/templates/_helpers.tpl @@ -1,66 +1,10 @@ {{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define ".helm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define ".helm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define ".helm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define ".helm.labels" -}} -helm.sh/chart: {{ include ".helm.chart" . }} -{{ include ".helm.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define ".helm.selectorLabels" -}} -app.kubernetes.io/name: {{ include ".helm.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - -{{- define ".helm.nameRevision" -}} -{{ template ".helm.name" . }}___{{ .Release.Revision }} -{{- end -}} - {{/* Create the name of the service account to use */}} -{{- define ".helm.serviceAccountName" -}} +{{- define "redirect.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include ".helm.fullname" .) .Values.serviceAccount.name }} + {{ default (include "commons.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} @@ -69,7 +13,7 @@ Create the name of the service account to use {{/* Host rule */}} -{{- define ".helm.hostRule" -}} +{{- define "redirect.hostRule" -}} - host: {{ .Host | quote }} http: paths: @@ -82,7 +26,7 @@ Host rule {{/* Host TLS config */}} -{{- define ".helm.hostTLS" -}} +{{- define "redirect.hostTLS" -}} - hosts: - {{ .Host | quote }} secretName: tls-{{ .Host | replace "." "-" }} diff --git a/charts/redirect/templates/config.yaml b/charts/redirect/templates/config.yaml index 6188672..1603bde 100644 --- a/charts/redirect/templates/config.yaml +++ b/charts/redirect/templates/config.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} labels: - app: {{ include ".helm.fullname" . }} + {{- include "commons.labels" . | nindent 4 }} data: config.yaml: | defaultFallbackTarget: {{ .Values.redirect.defaultFallbackTarget }} diff --git a/charts/redirect/templates/cronjob-role-binding.yaml b/charts/redirect/templates/cronjob-role-binding.yaml index 0a2b07f..3262dcf 100644 --- a/charts/redirect/templates/cronjob-role-binding.yaml +++ b/charts/redirect/templates/cronjob-role-binding.yaml @@ -2,19 +2,16 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ include ".helm.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob namespace: {{ .Release.Namespace }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} + {{- include "commons.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: {{ include ".helm.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob subjects: - kind: ServiceAccount - name: {{ include ".helm.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob namespace: {{ .Release.Namespace }} {{ end }} diff --git a/charts/redirect/templates/cronjob-role.yaml b/charts/redirect/templates/cronjob-role.yaml index 5749377..47eb4e7 100644 --- a/charts/redirect/templates/cronjob-role.yaml +++ b/charts/redirect/templates/cronjob-role.yaml @@ -2,13 +2,10 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ include ".helm.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob namespace: {{ .Release.Namespace }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} + {{- include "commons.labels" . | nindent 4 }} rules: - apiGroups: [""] resources: ["pods"] diff --git a/charts/redirect/templates/cronjob-service-account.yaml b/charts/redirect/templates/cronjob-service-account.yaml index 9e2ea12..0631b0c 100644 --- a/charts/redirect/templates/cronjob-service-account.yaml +++ b/charts/redirect/templates/cronjob-service-account.yaml @@ -2,12 +2,8 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include ".helm.fullname" . }}-recycle-cronjob + name: {{ include "commons.fullname" . }}-recycle-cronjob namespace: {{ .Release.Namespace }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} {{ end }} diff --git a/charts/redirect/templates/cronjob.yaml b/charts/redirect/templates/cronjob.yaml index bae504f..f82fed3 100644 --- a/charts/redirect/templates/cronjob.yaml +++ b/charts/redirect/templates/cronjob.yaml @@ -1,3 +1,3 @@ {{- if .Values.cron.replaceOldestPodWeekly -}} -{{- include "cron-jobs.cronjob" (fromYaml (.Files.Get "values/cronjob.yaml" | replace "[[fullname]]" (include ".helm.fullname" .) | replace "[[app]]" (include ".helm.name" .) | replace "[[release]]" .Release.Name | replace "[[namespace]]" .Release.Namespace)) -}} +{{- include "cron-jobs.cronjob" (fromYaml (.Files.Get "values/cronjob.yaml" | replace "[[fullname]]" (include "commons.fullname" .) | replace "[[app]]" (include "commons.name" .) | replace "[[release]]" .Release.Name | replace "[[namespace]]" .Release.Namespace)) -}} {{ end }} diff --git a/charts/redirect/templates/deployment.yaml b/charts/redirect/templates/deployment.yaml index 365a8d3..e79ffa1 100644 --- a/charts/redirect/templates/deployment.yaml +++ b/charts/redirect/templates/deployment.yaml @@ -1,35 +1,29 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} {{- toYaml .Values.labels | nindent 4 }} spec: replicas: {{ .Values.replicas }} selector: matchLabels: - {{- include ".helm.selectorLabels" . | nindent 6 }} + {{- include "commons.selectorLabels" . | nindent 6 }} template: metadata: annotations: prometheus.io/scrape: "true" prometheus.io/port: "7133" labels: - app: {{ include ".helm.fullname" . }} - release: {{ include ".helm.fullname" . }} - {{- include ".helm.selectorLabels" . | nindent 8 }} + {{- include "commons.labels" . | nindent 8 }} {{- toYaml .Values.labels | nindent 8 }} spec: {{- with .Values.imagePullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ include ".helm.serviceAccountName" . }} + serviceAccountName: {{ include "redirect.serviceAccountName" . }} securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} containers: @@ -60,21 +54,21 @@ spec: path: /ping port: http-metrics volumeMounts: - - name: {{ include ".helm.fullname" . }}-volume + - name: {{ include "commons.fullname" . }}-volume mountPath: /etc/redirect/ resources: {{- toYaml .Values.resources | nindent 12 }} volumes: - - name: {{ include ".helm.fullname" . }}-volume + - name: {{ include "commons.fullname" . }}-volume configMap: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} affinity: podAntiAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - - key: app + - key: appRevision operator: In values: - - {{ template ".helm.nameRevision" . }} + - {{ template "commons.nameRevision" . }} topologyKey: "kubernetes.io/hostname" diff --git a/charts/redirect/templates/grafana-influxdb-dashboard.yaml b/charts/redirect/templates/grafana-influxdb-dashboard.yaml index fcb99e4..940d3dd 100644 --- a/charts/redirect/templates/grafana-influxdb-dashboard.yaml +++ b/charts/redirect/templates/grafana-influxdb-dashboard.yaml @@ -2,8 +2,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include ".helm.fullname" . }}-influxdb-grafana-dashboard + name: {{ include "commons.fullname" . }}-influxdb-grafana-dashboard labels: + {{- include "commons.labels" . | nindent 4 }} grafana_dashboard: redirects data: redirects.json: | diff --git a/charts/redirect/templates/grafana-prometheus-dashboard.yaml b/charts/redirect/templates/grafana-prometheus-dashboard.yaml index 0603763..492c04d 100644 --- a/charts/redirect/templates/grafana-prometheus-dashboard.yaml +++ b/charts/redirect/templates/grafana-prometheus-dashboard.yaml @@ -2,8 +2,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include ".helm.fullname" . }}-prometheus-grafana-dashboard + name: {{ include "commons.fullname" . }}-prometheus-grafana-dashboard labels: + {{- include "commons.labels" . | nindent 4 }} grafana_dashboard: redirects data: redirects.json: | diff --git a/charts/redirect/templates/horizontal-pod-autoscaler.yaml b/charts/redirect/templates/horizontal-pod-autoscaler.yaml index eabeb64..070787a 100644 --- a/charts/redirect/templates/horizontal-pod-autoscaler.yaml +++ b/charts/redirect/templates/horizontal-pod-autoscaler.yaml @@ -1,3 +1,3 @@ {{- if .Values.hpa.enable -}} -{{- include "horizontal-pod-autoscalers.hpa" (dict "name" (include ".helm.fullname" .) "replicas" (dict "min" .Values.replicas "max" .Values.hpa.maxReplicas)) -}} +{{- include "horizontal-pod-autoscalers.hpa" (dict "name" (include "commons.fullname" .) "replicas" (dict "min" .Values.replicas "max" .Values.hpa.maxReplicas)) -}} {{ end }} diff --git a/charts/redirect/templates/ingress.yaml b/charts/redirect/templates/ingress.yaml index 1dc96b0..d4f9272 100644 --- a/charts/redirect/templates/ingress.yaml +++ b/charts/redirect/templates/ingress.yaml @@ -1,4 +1,4 @@ -{{- $fullName := include ".helm.fullname" . -}} +{{- $fullName := include "commons.fullname" . -}} {{- $hosts := .Values.redirect.hosts -}} {{- $ingressHosts := .Values.redirect.ingressHosts -}} apiVersion: networking.k8s.io/v1beta1 @@ -6,7 +6,7 @@ kind: Ingress metadata: name: {{ $fullName }} labels: - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} {{- with .Values.ingress.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -16,14 +16,14 @@ spec: {{- if $hosts -}} {{- range $hostFrom, $hostTo := $hosts }} {{- $host := dict "Host" $hostFrom -}} - {{ include ".helm.hostTLS" $host | nindent 4 }} + {{ include "redirect.hostTLS" $host | nindent 4 }} {{- end }} {{- end }} {{- if $ingressHosts -}} {{- range $host := $ingressHosts }} {{- if eq (hasKey $hosts $host) false -}} {{- $host := dict "Host" $host -}} - {{ include ".helm.hostTLS" $host | nindent 4 }} + {{ include "redirect.hostTLS" $host | nindent 4 }} {{- end }} {{- end }} {{- end }} @@ -31,14 +31,14 @@ spec: {{- if $hosts -}} {{- range $hostFrom, $hostTo := $hosts }} {{- $host := dict "Host" $hostFrom "FullName" $fullName "SvcPort" 7132 -}} - {{ include ".helm.hostRule" $host | nindent 4 }} + {{ include "redirect.hostRule" $host | nindent 4 }} {{- end }} {{- end }} {{- if $ingressHosts -}} {{- range $host := $ingressHosts }} {{- if eq (hasKey $hosts $host) false -}} {{- $host := dict "Host" $host "FullName" $fullName "SvcPort" 7132 -}} - {{ include ".helm.hostRule" $host | nindent 4 }} + {{ include "redirect.hostRule" $host | nindent 4 }} {{- end }} {{- end }} {{- end }} diff --git a/charts/redirect/templates/pod-disruption-budget.yaml b/charts/redirect/templates/pod-disruption-budget.yaml index d26a726..2b87410 100644 --- a/charts/redirect/templates/pod-disruption-budget.yaml +++ b/charts/redirect/templates/pod-disruption-budget.yaml @@ -2,11 +2,10 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} spec: minAvailable: 1 selector: matchLabels: - app: {{ include ".helm.fullname" . }} - release: {{ include ".helm.fullname" . }} + {{- include "commons.selectorLabels" . | nindent 6 }} {{ end }} \ No newline at end of file diff --git a/charts/redirect/templates/service-account.yaml b/charts/redirect/templates/service-account.yaml index 2353a79..33c2b14 100644 --- a/charts/redirect/templates/service-account.yaml +++ b/charts/redirect/templates/service-account.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include ".helm.serviceAccountName" . }} + name: {{ include "redirect.serviceAccountName" . }} labels: -{{ include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} {{- end -}} diff --git a/charts/redirect/templates/service.yaml b/charts/redirect/templates/service.yaml index 8382548..262ff4f 100644 --- a/charts/redirect/templates/service.yaml +++ b/charts/redirect/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} labels: - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} ports: @@ -16,4 +16,4 @@ spec: protocol: TCP name: http-metrics selector: - {{- include ".helm.selectorLabels" . | nindent 4 }} + {{- include "commons.selectorLabels" . | nindent 4 }} diff --git a/charts/redirect/templates/tests/test-metrics-connection.yaml b/charts/redirect/templates/tests/test-metrics-connection.yaml index f03c292..4064bce 100644 --- a/charts/redirect/templates/tests/test-metrics-connection.yaml +++ b/charts/redirect/templates/tests/test-metrics-connection.yaml @@ -1,9 +1,7 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include ".helm.fullname" . }}-test-metrics-connection" - labels: -{{ include ".helm.labels" . | nindent 4 }} + name: "{{ include "commons.fullname" . }}-test-metrics-connection" annotations: "helm.sh/hook": test-success spec: @@ -11,5 +9,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include ".helm.fullname" . }}:7133'] + args: ['{{ include "commons.fullname" . }}:7133'] restartPolicy: Never diff --git a/charts/redirect/templates/tests/test-redirect-connection.yaml b/charts/redirect/templates/tests/test-redirect-connection.yaml index b8e0329..b140b54 100644 --- a/charts/redirect/templates/tests/test-redirect-connection.yaml +++ b/charts/redirect/templates/tests/test-redirect-connection.yaml @@ -1,9 +1,7 @@ apiVersion: v1 kind: Pod metadata: - name: "{{ include ".helm.fullname" . }}-test-redirect-connection" - labels: -{{ include ".helm.labels" . | nindent 4 }} + name: "{{ include "commons.fullname" . }}-test-redirect-connection" annotations: "helm.sh/hook": test-success spec: @@ -11,5 +9,5 @@ spec: - name: wget image: busybox command: ['wget'] - args: ['{{ include ".helm.fullname" . }}:7132'] + args: ['{{ include "commons.fullname" . }}:7132'] restartPolicy: Never diff --git a/charts/redis-db-assignment-operator/Chart.lock b/charts/redis-db-assignment-operator/Chart.lock new file mode 100644 index 0000000..b368b76 --- /dev/null +++ b/charts/redis-db-assignment-operator/Chart.lock @@ -0,0 +1,6 @@ +dependencies: +- name: commons + repository: https://helm.wyrihaximus.net/ + version: 0.1.0 +digest: sha256:efd30fea39b80df7317aac63d028ff031778f475f23460a62ccbc554c2e4e264 +generated: "2020-12-11T00:31:16.9755869+01:00" diff --git a/charts/redis-db-assignment-operator/Chart.yaml b/charts/redis-db-assignment-operator/Chart.yaml index 04d5db2..0e0701e 100644 --- a/charts/redis-db-assignment-operator/Chart.yaml +++ b/charts/redis-db-assignment-operator/Chart.yaml @@ -4,8 +4,12 @@ description: Redis Database Assignment Operator home: https://github.com/WyriHaximusNet/docker-kubernetes-redis-db-assignment-operator icon: https://helm.wyrihaximus.net/images/charts/redis-db-assignment-operator.png type: application -version: 1.0.2 +version: 1.0.3 appVersion: v1.0.1 maintainers: - name: WyriHaximus email: helm@wyrihaximus.net +dependencies: + - name: commons + version: ^0.1 + repository: https://helm.wyrihaximus.net/ diff --git a/charts/redis-db-assignment-operator/templates/_helpers.tpl b/charts/redis-db-assignment-operator/templates/_helpers.tpl index cf725e2..4f3839c 100644 --- a/charts/redis-db-assignment-operator/templates/_helpers.tpl +++ b/charts/redis-db-assignment-operator/templates/_helpers.tpl @@ -1,66 +1,10 @@ {{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define ".helm.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define ".helm.nameRevision" -}} -{{ template ".helm.name" . }}___{{ .Release.Revision }} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define ".helm.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define ".helm.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Common labels -*/}} -{{- define ".helm.labels" -}} -helm.sh/chart: {{ include ".helm.chart" . }} -{{ include ".helm.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Selector labels -*/}} -{{- define ".helm.selectorLabels" -}} -app.kubernetes.io/name: {{ include ".helm.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} - {{/* Create the name of the service account to use */}} -{{- define ".helm.serviceAccountName" -}} +{{- define "redis-db-assignment-operator.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include ".helm.fullname" .) .Values.serviceAccount.name }} + {{ default (include "commons.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/charts/redis-db-assignment-operator/templates/cluster-role-binding.yaml b/charts/redis-db-assignment-operator/templates/cluster-role-binding.yaml index 3d9f8e8..d216af4 100644 --- a/charts/redis-db-assignment-operator/templates/cluster-role-binding.yaml +++ b/charts/redis-db-assignment-operator/templates/cluster-role-binding.yaml @@ -1,19 +1,15 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} subjects: - kind: ServiceAccount - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} namespace: {{ .Release.Namespace }} diff --git a/charts/redis-db-assignment-operator/templates/cluster-role.yaml b/charts/redis-db-assignment-operator/templates/cluster-role.yaml index 4af5e00..a6ee5d7 100644 --- a/charts/redis-db-assignment-operator/templates/cluster-role.yaml +++ b/charts/redis-db-assignment-operator/templates/cluster-role.yaml @@ -2,14 +2,10 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} rules: - apiGroups: ["wyrihaximus.net"] resources: ["redis-databases"] diff --git a/charts/redis-db-assignment-operator/templates/deployment.yaml b/charts/redis-db-assignment-operator/templates/deployment.yaml index b5a5208..7a28916 100644 --- a/charts/redis-db-assignment-operator/templates/deployment.yaml +++ b/charts/redis-db-assignment-operator/templates/deployment.yaml @@ -1,31 +1,25 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} - releaseRevision: {{ .Release.Revision | quote }} - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: - {{- include ".helm.selectorLabels" . | nindent 6 }} + {{- include "commons.selectorLabels" . | nindent 6 }} template: metadata: annotations: prometheus.io/scrape: "true" prometheus.io/port: "9115" labels: - app: {{ include ".helm.fullname" . }} - release: {{ include ".helm.fullname" . }} - {{- include ".helm.selectorLabels" . | nindent 8 }} + {{- include "commons.selectorLabels" . | nindent 8 }} spec: - serviceAccountName: {{ include ".helm.fullname" . }} + serviceAccountName: {{ include "commons.fullname" . }} containers: - name: redis-database-assignment-operator image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/charts/redis-db-assignment-operator/templates/service-account.yaml b/charts/redis-db-assignment-operator/templates/service-account.yaml index d237c2d..b8ef095 100644 --- a/charts/redis-db-assignment-operator/templates/service-account.yaml +++ b/charts/redis-db-assignment-operator/templates/service-account.yaml @@ -1,11 +1,11 @@ apiVersion: v1 kind: ServiceAccount metadata: - name: {{ include ".helm.fullname" . }} + name: {{ include "commons.fullname" . }} namespace: {{ .Release.Namespace }} labels: - app: {{ include ".helm.fullname" . }} - appRevision: {{ template ".helm.nameRevision" . }} - release: {{ include ".helm.fullname" . }} + app: {{ include "commons.fullname" . }} + appRevision: {{ template "commons.nameRevision" . }} + release: {{ include "commons.fullname" . }} releaseRevision: {{ .Release.Revision | quote }} - {{- include ".helm.labels" . | nindent 4 }} + {{- include "commons.labels" . | nindent 4 }}