[CDS-BP-PROC] Move to use strimzi kafka template
[oom.git] / kubernetes / cds / components / cds-blueprints-processor / templates / service.yaml
index 153740c..84ccfc5 100755 (executable)
@@ -1,5 +1,6 @@
 {{/*
 # Copyright (c) 2019 IBM, Bell Canada
+# Modification Copyright © 2023 Nordix Foundation
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -30,13 +31,10 @@ spec:
   ports:
     - port: {{ .Values.service.http.externalPort }}
       targetPort: {{ .Values.service.http.internalPort }}
-      {{- if eq .Values.service.http.type "NodePort"}}
-      nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.http.nodePort }}
-      {{- end}}
-      name: {{ .Values.service.http.portName | default "http" }}{{ (eq "true" (include "common.needTLS" .)) | ternary "s" "" }}
+      name: {{ .Values.service.http.portName | default "http" }}
   selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
+    app.kubernetes.io/instance: {{ include "common.release" . }}
+    app.kubernetes.io/name: {{ include "common.name" . }}
 ---
 apiVersion: v1
 kind: Service
@@ -56,8 +54,8 @@ spec:
       targetPort: {{ .Values.service.grpc.internalPort }}
       name: {{ .Values.service.grpc.portName | default "grpc" }}
   selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
+    app.kubernetes.io/instance: {{ include "common.release" . }}
+    app.kubernetes.io/name: {{ include "common.name" . }}
 ---
 apiVersion: v1
 kind: Service
@@ -75,10 +73,7 @@ spec:
   ports:
     - port: {{ .Values.service.cluster.externalPort }}
       targetPort: {{ .Values.service.cluster.internalPort }}
-      {{- if eq .Values.service.cluster.type "NodePort"}}
-      nodePort: {{ .Values.global.nodePortPrefixExt | default .Values.nodePortPrefixExt }}{{ .Values.service.cluster.nodePort }}
-      {{- end}}
       name: {{ .Values.service.cluster.portName | default "cluster" }}
   selector:
-    app: {{ include "common.name" . }}
-    release: {{ include "common.release" . }}
+    app.kubernetes.io/instance: {{ include "common.release" . }}
+    app.kubernetes.io/name: {{ include "common.name" . }}