Skip to content

Commit

Permalink
Update selector labels
Browse files Browse the repository at this point in the history
  • Loading branch information
AnchorArray committed Dec 2, 2024
1 parent 9d524c0 commit de2f9fc
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
1 change: 0 additions & 1 deletion charts/guardrails/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion charts/guardrails/templates/configmap-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Release.Name }}-cache
name: {{ .Release.Name }}-nginx
data:
nginx.conf: |
pid /tmp/nginx.pid;
Expand Down
6 changes: 3 additions & 3 deletions charts/guardrails/templates/deployment-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion charts/guardrails/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ spec:
{{- end }}
selector:
matchLabels:
{{- include "guardrails.selectorLabels" . | nindent 6 }}
app: {{ .Release.Name }}
template:
metadata:
{{- with .Values.podAnnotations }}
Expand All @@ -23,6 +23,7 @@ spec:
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
app: {{ .Release.Name }}
spec:
{{- if gt (len .Values.imagePullSecrets) 0 }}
imagePullSecrets:
Expand Down
4 changes: 2 additions & 2 deletions charts/guardrails/templates/service-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}-cache
name: {{ .Release.Name }}-nginx
spec:
type: ClusterIP
ports:
Expand All @@ -11,5 +11,5 @@ spec:
port: 80
targetPort: 8080
selector:
app: {{ .Release.Name }}-cache
app: {{ .Release.Name }}-nginx
{{- end }}
2 changes: 1 addition & 1 deletion charts/guardrails/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ spec:
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
selector:
{{- include "guardrails.selectorLabels" . | nindent 4 }}
app: {{ .Release.Name }}

0 comments on commit de2f9fc

Please sign in to comment.