Skip to content

Commit

Permalink
fix(primerdriver): docs selector labels
Browse files Browse the repository at this point in the history
  • Loading branch information
kvdomingo committed Nov 7, 2024
1 parent 911383e commit 569f887
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
14 changes: 14 additions & 0 deletions primerdriver/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@ app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{- define "primerdriver-docs.labels" -}}
helm.sh/chart: {{ include "primerdriver.chart" . }}
{{ include "primerdriver-docs.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
Expand All @@ -50,6 +59,11 @@ app.kubernetes.io/name: {{ include "primerdriver.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{- define "primerdriver-docs.selectorLabels" -}}
app.kubernetes.io/name: '{{ include "primerdriver.name" . }}-docs'
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
Expand Down
6 changes: 3 additions & 3 deletions primerdriver/templates/docs-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Deployment
metadata:
name: '{{ include "primerdriver.fullname" . }}-docs'
labels:
{{- include "primerdriver.labels" . | nindent 4 }}
{{- include "primerdriver-docs.labels" . | nindent 4 }}
{{- with .Values.docs.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand All @@ -14,15 +14,15 @@ spec:
{{- end }}
selector:
matchLabels:
{{- include "primerdriver.selectorLabels" . | nindent 6 }}
{{- include "primerdriver-docs.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "primerdriver.labels" . | nindent 8 }}
{{- include "primerdriver-docs.labels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion primerdriver/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ kind: Ingress
metadata:
name: '{{ include "primerdriver.fullname" . }}-docs'
labels:
{{- include "primerdriver.labels" . | nindent 4 }}
{{- include "primerdriver-docs.labels" . | nindent 4 }}
{{- with .Values.docs.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
Expand Down
4 changes: 2 additions & 2 deletions primerdriver/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ kind: Service
metadata:
name: '{{ include "primerdriver.fullname" . }}-docs'
labels:
{{- include "primerdriver.labels" . | nindent 4 }}
{{- include "primerdriver-docs.labels" . | nindent 4 }}
spec:
type: {{ .Values.docs.service.type }}
ports:
Expand All @@ -28,4 +28,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "primerdriver.selectorLabels" . | nindent 4 }}
{{- include "primerdriver-docs.selectorLabels" . | nindent 4 }}

0 comments on commit 569f887

Please sign in to comment.