aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/templates/service.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/aai/templates/service.yaml')
-rw-r--r--kubernetes/aai/templates/service.yaml30
1 files changed, 6 insertions, 24 deletions
diff --git a/kubernetes/aai/templates/service.yaml b/kubernetes/aai/templates/service.yaml
index b5a8cc1a0d..1509311a2b 100644
--- a/kubernetes/aai/templates/service.yaml
+++ b/kubernetes/aai/templates/service.yaml
@@ -19,12 +19,7 @@ kind: Service
metadata:
name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
ports:
- name: {{ .Values.service.portName }}
@@ -36,8 +31,7 @@ spec:
{{ end }}
{{- end }}
type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}{{ .Values.service.type }}{{ end }}
- selector:
- app: {{ include "common.name" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
---
apiVersion: v1
@@ -45,38 +39,26 @@ kind: Service
metadata:
name: {{ include "common.servicename" . }}-internal
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
ports:
- name: {{ .Values.service.portName }}
port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
type: ClusterIP
- selector:
- app: {{ include "common.name" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.servicename" . }}-metrics
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}-metrics
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
ports:
- port: {{ .Values.metricsService.externalPort }}
targetPort: {{ .Values.metricsService.internalPort }}
name: {{ .Values.metricsService.portName }}
type: {{ .Values.metricsService.type }}
- selector:
- app: {{ include "common.name" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
clusterIP: None