Merge "[AAI] Make aai log level configurable"
[oom.git] / kubernetes / aai / components / aai-babel / templates / service.yaml
index 69892ac..86141ab 100644 (file)
@@ -1,5 +1,7 @@
+{{/*
 # Copyright © 2018 Amdocs, AT&T
 # Modifications Copyright © 2018 Bell Canada
+# Modifications Copyright (c) 2021 Orange
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+*/}}
 
-apiVersion: v1
-kind: Service
-metadata:
-  name: {{ include "common.servicename" . }}
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-spec:
-  type: {{ .Values.service.type }}
-  ports:
-  {{ if .Values.global.installSidecarSecurity }}
-      {{if eq .Values.service.type "NodePort" -}}
-      - port: {{ .Values.global.rproxy.port }}
-        nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-        name: {{ .Values.service.portName }}
-      {{- else -}}
-      - port: {{ .Values.service.externalPort }}
-        targetPort: {{ .Values.global.rproxy.port }}
-        name: {{ .Values.service.portName }}
-      {{- end}}
-  {{ else }}
-      {{if eq .Values.service.type "NodePort" -}}
-      - port: {{ .Values.service.internalPort }}
-        nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
-        name: {{ .Values.service.portName }}
-      {{- else -}}
-      - port: {{ .Values.service.externalPort }}
-        targetPort: {{ .Values.service.internalPort }}
-        name: {{ .Values.service.portName }}
-      {{- end}}
-  {{ end }}
-  selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
+{{ include "common.service" . }}