Browse Source

Fix issue with service selector labels

master
Fábio Kaiser Rauber 4 years ago
parent
commit
a6747be8f6
  1. 12
      charts/portalmodelo/v0.5.0/templates/_helpers.tpl
  2. 4
      charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml
  3. 2
      charts/portalmodelo/v0.5.0/templates/plone-service.yaml
  4. 4
      charts/portalmodelo/v0.5.0/templates/zeoserver-deployment.yaml
  5. 2
      charts/portalmodelo/v0.5.0/templates/zeoserver-service.yaml

12
charts/portalmodelo/v0.5.0/templates/_helpers.tpl

@ -36,7 +36,8 @@ Common labels
*/}}
{{- define "portalmodelo.labels" -}}
helm.sh/chart: {{ include "portalmodelo.chart" . }}
{{ include "portalmodelo.selectorLabels" . }}
app.kubernetes.io/name: {{ include "portalmodelo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
@ -46,7 +47,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "portalmodelo.selectorLabels" -}}
{{- define "portalmodelo.ploneSelectorLabels" -}}
app.kubernetes.io/name: {{ include "portalmodelo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: plone
{{- end }}
{{- define "portalmodelo.zeoserverSelectorLabels" -}}
app.kubernetes.io/name: {{ include "portalmodelo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: zeoserver
{{- end }}

4
charts/portalmodelo/v0.5.0/templates/plone-deployment.yaml

@ -16,7 +16,7 @@ spec:
{{- end }}
selector:
matchLabels:
{{- include "portalmodelo.selectorLabels" . | nindent 6 }}
{{- include "portalmodelo.ploneSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
@ -24,7 +24,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "portalmodelo.selectorLabels" . | nindent 8 }}
{{- include "portalmodelo.zeoserverSelectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:

2
charts/portalmodelo/v0.5.0/templates/plone-service.yaml

@ -11,4 +11,4 @@ spec:
protocol: TCP
name: "8080"
selector:
{{- include "portalmodelo.selectorLabels" . | nindent 4 }}
{{- include "portalmodelo.ploneSelectorLabels" . | nindent 4 }}

4
charts/portalmodelo/v0.5.0/templates/zeoserver-deployment.yaml

@ -11,7 +11,7 @@ spec:
type: Recreate
selector:
matchLabels:
{{- include "portalmodelo.selectorLabels" . | nindent 6 }}
{{- include "portalmodelo.zeoserverSelectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
@ -19,7 +19,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "portalmodelo.selectorLabels" . | nindent 8 }}
{{- include "portalmodelo.zeoserverSelectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:

2
charts/portalmodelo/v0.5.0/templates/zeoserver-service.yaml

@ -12,6 +12,6 @@ spec:
protocol: TCP
name: "8100"
selector:
{{- include "portalmodelo.selectorLabels" . | nindent 4 }}
{{- include "portalmodelo.zeoserverSelectorLabels" . | nindent 4 }}
{{- end }}

Loading…
Cancel
Save