diff --git a/charts/app/Chart.yaml b/charts/app/Chart.yaml index a1128af..02a0f67 100644 --- a/charts/app/Chart.yaml +++ b/charts/app/Chart.yaml @@ -5,5 +5,5 @@ maintainers: - name: Holden Omans email: holden.omans@gmail.com # Please make sure that version and appVersion are always the same. -version: 0.1.12 -appVersion: 0.1.12 +version: 0.1.13 +appVersion: 0.1.13 diff --git a/charts/app/templates/_helpers.tpl b/charts/app/templates/_helpers.tpl index fba54bd..ffb356a 100644 --- a/charts/app/templates/_helpers.tpl +++ b/charts/app/templates/_helpers.tpl @@ -38,11 +38,19 @@ Common labels app.kubernetes.io/name: {{ include "app.name" . }} helm.sh/chart: {{ include "app.chart" . }} app.kubernetes.io/instance: {{ .Release.Name }} -kalinon.com/app: {{ .Release.Name }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} +kalinon.com/group: {{ include "app.name" . }} +kalinon.com/app: {{ .Release.Name }} +{{- if .Values.labels }} + {{- toYaml .Values.labels | nindent 0 }} +{{- end }} +{{- if .Values.istio.enabled }} +app: {{ .Release.Name }} +version: {{ .Chart.Version }} +{{- end }} {{- end -}} {{/* diff --git a/charts/app/templates/deployment.yaml b/charts/app/templates/deployment.yaml index 8bf770b..18348f6 100644 --- a/charts/app/templates/deployment.yaml +++ b/charts/app/templates/deployment.yaml @@ -4,9 +4,6 @@ metadata: name: {{ include "app.fullname" . }} labels: {{ include "app.labels" . | indent 4 }} -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} spec: replicas: {{ .Values.replicaCount }} {{- if .Values.strategy }} @@ -19,17 +16,7 @@ spec: template: metadata: labels: - {{- if .Values.istio.enabled }} - app: {{ .Release.Name }} - version: {{ .Chart.Version }} - {{- end }} - app.kubernetes.io/name: {{ include "app.name" . }} - app.kubernetes.io/instance: {{ .Release.Name }} - kalinon.com/group: {{ include "app.name" . }} - kalinon.com/app: {{ .Release.Name }} -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 8 }} -{{- end }} +{{ include "app.labels" . | indent 8 }} {{- with .Values.annotations }} annotations: {{- toYaml . | nindent 8 }} diff --git a/charts/app/templates/ingress.yaml b/charts/app/templates/ingress.yaml index fe8d118..ec7dc0c 100644 --- a/charts/app/templates/ingress.yaml +++ b/charts/app/templates/ingress.yaml @@ -14,9 +14,6 @@ kind: Ingress metadata: name: {{ $fullName }} labels: -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} {{ include "app.labels" . | indent 4 }} {{- with .Values.ingress.annotations }} annotations: diff --git a/charts/app/templates/istio.yaml b/charts/app/templates/istio.yaml index 4c17252..9dc64b5 100644 --- a/charts/app/templates/istio.yaml +++ b/charts/app/templates/istio.yaml @@ -9,9 +9,6 @@ metadata: name: {{ $fullName }}-cert namespace: {{ .Values.istio.gateway.namespace }} labels: -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} {{ include "app.labels" . | indent 4 }} {{- with .Values.ingress.annotations }} annotations: @@ -33,9 +30,6 @@ kind: Gateway metadata: name: {{ $fullName }}-gateway labels: -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} {{ include "app.labels" . | indent 4 }} {{- with .Values.ingress.annotations }} annotations: @@ -63,9 +57,7 @@ kind: VirtualService metadata: name: {{ $fullName }} labels: -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} +{{ include "app.labels" . | indent 4 }} spec: hosts: {{- range .Values.istio.hosts }} diff --git a/charts/app/templates/pv.yaml b/charts/app/templates/pv.yaml index 8a770ae..bf3022c 100644 --- a/charts/app/templates/pv.yaml +++ b/charts/app/templates/pv.yaml @@ -9,9 +9,6 @@ apiVersion: v1 kind: PersistentVolume metadata: labels: -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} {{ include "app.labels" $root | indent 4 }} {{- if hasKey . "volumeName" }} name: {{ .volumeName }} diff --git a/charts/app/templates/pvc.yaml b/charts/app/templates/pvc.yaml index aa82a22..ba7772f 100644 --- a/charts/app/templates/pvc.yaml +++ b/charts/app/templates/pvc.yaml @@ -10,9 +10,6 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: labels: -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} {{ include "app.labels" $root | indent 4 }} name: {{ $root.Release.Name }}-{{ .name | default $index }}-pvc spec: diff --git a/charts/app/templates/service.yaml b/charts/app/templates/service.yaml index df10ee0..12b0be4 100644 --- a/charts/app/templates/service.yaml +++ b/charts/app/templates/service.yaml @@ -5,9 +5,6 @@ metadata: name: {{ include "app.fullname" . }} labels: {{ include "app.labels" . | indent 4 }} -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} spec: type: {{ .Values.service.type }} ports: diff --git a/charts/app/templates/serviceaccount.yaml b/charts/app/templates/serviceaccount.yaml index 1bb4ecf..9ef76f6 100644 --- a/charts/app/templates/serviceaccount.yaml +++ b/charts/app/templates/serviceaccount.yaml @@ -5,7 +5,4 @@ metadata: name: {{ template "app.serviceAccountName" . }} labels: {{ include "app.labels" . | indent 4 }} -{{- if .Values.labels }} - {{- toYaml .Values.labels | nindent 4 }} -{{- end }} {{- end -}} diff --git a/charts/app/values.yaml b/charts/app/values.yaml index 6fa5e0c..1b49648 100644 --- a/charts/app/values.yaml +++ b/charts/app/values.yaml @@ -104,3 +104,4 @@ istio: namespace: istio-system selector: istio: ingressgateway +# labels: {}