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" -}} {{- define "portalmodelo.labels" -}}
helm.sh/chart: {{ include "portalmodelo.chart" . }} 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 }} {{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }} {{- end }}
@ -46,7 +47,14 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/* {{/*
Selector labels 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/name: {{ include "portalmodelo.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }} app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/component: zeoserver
{{- end }} {{- end }}

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

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

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

@ -11,4 +11,4 @@ spec:
protocol: TCP protocol: TCP
name: "8080" name: "8080"
selector: 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 type: Recreate
selector: selector:
matchLabels: matchLabels:
{{- include "portalmodelo.selectorLabels" . | nindent 6 }} {{- include "portalmodelo.zeoserverSelectorLabels" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.podAnnotations }} {{- with .Values.podAnnotations }}
@ -19,7 +19,7 @@ spec:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
labels: labels:
{{- include "portalmodelo.selectorLabels" . | nindent 8 }} {{- include "portalmodelo.zeoserverSelectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:

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

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

Loading…
Cancel
Save