Sync to 1.16 k8
[it/test.git] / ric_robot_suite / helm / ric-robot / templates / deployment.yaml
index 6dea20e..871742a 100644 (file)
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-apiVersion: extensions/v1beta1
+apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: {{ include "ric-robot.fullname" . }}
@@ -24,11 +24,20 @@ metadata:
     heritage: {{ .Release.Service }}
 spec:
   replicas: {{ .Values.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "ric-robot.name" . }}
+      release: {{ .Release.Name }}
   template:
     metadata:
+      {{- if .Values.rtmgr.annotations }}
+      annotations:
+        {{- .Values.rtmgr.annotations | nindent 8 -}}
+      {{ end }}
       labels:
-        app.kubernetes.io/instance: {{ .Release.Name }}
-        app.kubernetes.io/managed-by: {{ .Release.Service }}
+        app: {{ include "ric-robot.name" . }}
+        release: {{ .Release.Name }}
+        robotImplementation: {{ .Values.robotImplementation }}
     spec:
       containers:
       - name: {{ include "ric-robot.name" . }}
@@ -38,7 +47,7 @@ spec:
           - name: RICPLT_NAMESPACE
             value:  {{ .Release.Namespace }}
           - name: RICPLT_RELEASE_NAME
-            value:  {{ .Values.Release.HelmReleaseName }}
+            value:  {{ .Release.Name }}
           - name: RICPLT_COMPONENTS
             value: {{ keys .Values.ric.platform.components | join " " }}
         ports: