diff --git a/charts/guardrails/templates/_helpers.tpl b/charts/guardrails/templates/_helpers.tpl index 2bfeb80..94d31ad 100644 --- a/charts/guardrails/templates/_helpers.tpl +++ b/charts/guardrails/templates/_helpers.tpl @@ -35,7 +35,6 @@ Common labels */}} {{- define "guardrails.labels" -}} helm.sh/chart: {{ include "guardrails.chart" . }} -{{ include "guardrails.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} diff --git a/charts/guardrails/templates/configmap-cache.yaml b/charts/guardrails/templates/configmap-cache.yaml index d649e30..4090d31 100644 --- a/charts/guardrails/templates/configmap-cache.yaml +++ b/charts/guardrails/templates/configmap-cache.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Release.Name }}-cache + name: {{ .Release.Name }}-nginx data: nginx.conf: | pid /tmp/nginx.pid; diff --git a/charts/guardrails/templates/deployment-cache.yaml b/charts/guardrails/templates/deployment-cache.yaml index 309b2f0..6b4cfff 100644 --- a/charts/guardrails/templates/deployment-cache.yaml +++ b/charts/guardrails/templates/deployment-cache.yaml @@ -2,14 +2,14 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }}-cache + name: {{ .Release.Name }}-nginx labels: {{- include "guardrails.labels" . | nindent 4 }} spec: replicas: {{ .Values.cache.replicaCount }} selector: matchLabels: - app: {{ .Release.Name }}-cache + app: {{ .Release.Name }}-nginx template: metadata: {{- with .Values.cache.annotations }} @@ -18,7 +18,7 @@ spec: {{- end }} labels: {{- include "guardrails.labels" . | nindent 8 }} - app: {{ .Release.Name }}-cache + app: {{ .Release.Name }}-nginx spec: serviceAccountName: {{ include "guardrails.serviceAccountName" . }} securityContext: diff --git a/charts/guardrails/templates/deployment.yaml b/charts/guardrails/templates/deployment.yaml index 56e8259..c1be3c0 100644 --- a/charts/guardrails/templates/deployment.yaml +++ b/charts/guardrails/templates/deployment.yaml @@ -11,7 +11,7 @@ spec: {{- end }} selector: matchLabels: - {{- include "guardrails.selectorLabels" . | nindent 6 }} + app: {{ .Release.Name }} template: metadata: {{- with .Values.podAnnotations }} @@ -23,6 +23,7 @@ spec: {{- with .Values.podLabels }} {{- toYaml . | nindent 8 }} {{- end }} + app: {{ .Release.Name }} spec: {{- if gt (len .Values.imagePullSecrets) 0 }} imagePullSecrets: diff --git a/charts/guardrails/templates/service-cache.yaml b/charts/guardrails/templates/service-cache.yaml index 4965a64..d6a835e 100644 --- a/charts/guardrails/templates/service-cache.yaml +++ b/charts/guardrails/templates/service-cache.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: Service metadata: - name: {{ .Release.Name }}-cache + name: {{ .Release.Name }}-nginx spec: type: ClusterIP ports: @@ -11,5 +11,5 @@ spec: port: 80 targetPort: 8080 selector: - app: {{ .Release.Name }}-cache + app: {{ .Release.Name }}-nginx {{- end }} diff --git a/charts/guardrails/templates/service.yaml b/charts/guardrails/templates/service.yaml index 085fe64..cfd0f73 100644 --- a/charts/guardrails/templates/service.yaml +++ b/charts/guardrails/templates/service.yaml @@ -16,4 +16,4 @@ spec: port: {{ .Values.service.port }} targetPort: {{ .Values.service.targetPort }} selector: - {{- include "guardrails.selectorLabels" . | nindent 4 }} + app: {{ .Release.Name }}