Merge "change the kong-infra ingress controller nodeport to 29080 to avoid going...
[it/dep.git] / ric-platform / 50-RIC-Platform / helm / appmgr / templates / deployment.yaml
index 52e5339..ce05589 100644 (file)
 apiVersion: apps/v1
 kind: Deployment
 metadata:
-  name: {{ include "appmgr.fullname" . }}
-  namespace: {{ include "common.namespace" . }}
+  name: {{ include "common.deploymentname.appmgr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
   labels:
-    app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
     chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
     release: {{ .Release.Name }}
     heritage: {{ .Release.Service }}
 spec:
-  replicas: {{ .Values.replicaCount }}
+  replicas: {{ .Values.appmgr.replicaCount }}
   selector:
     matchLabels:
-      app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
       release: {{ .Release.Name }}
-      #app.kubernetes.io/name: {{ include "appmgr.name" . }}
-      #app.kubernetes.io/instance: {{ .Release.Name }}
   template:
     metadata:
+      {{- if .Values.appmgr.annotations }}
+      annotations:
+        {{- .Values.appmgr.annotations | nindent 8 -}}
+      {{ end }}
       labels:
-        app: {{ include "common.namespace" . }}-{{ include "common.name" . }}
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.appmgr" . }}
         release: {{ .Release.Name }}
     spec:
-      hostname: {{ .Chart.Name }}
+      hostname: {{ include "common.name.appmgr" . }}
+      serviceAccountName: {{ include "common.serviceaccountname.appmgr" . }}
       imagePullSecrets:
-        - name: {{ .Values.image.repositoryCred }}
+        - name: {{ include "common.repositoryCred" . }}
       containers:
-        - name: {{ include "common.namespace" . }}-{{ include "common.name" . }}
-          image: {{ include "common.repository" . }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+        - name: {{ include "common.containername.appmgr" . }}
+          image: {{ include "common.repository" . }}/{{ .Values.appmgr.image.name }}:{{ .Values.appmgr.image.tag }}
           imagePullPolicy: {{ include "common.pullPolicy" . }}
           ports:
             - name: http
-              containerPort: {{ .Values.containerPort }}
+              containerPort: {{ include "common.serviceport.appmgr.http" . }}
+              protocol: TCP
+            - name: rmrroute
+              containerPort: {{ include "common.serviceport.appmgr.rmr.route" . }}
+              protocol: TCP
+            - name: rmrdata
+              containerPort: {{ include "common.serviceport.appmgr.rmr.data" . }}
               protocol: TCP
           volumeMounts:
             - name: config-volume
-              mountPath: {{ .Values.appconfigpath }}
+              mountPath: {{ .Values.appmgr.appconfigpath }}/appmgr.yaml
+              subPath: appmgr.yaml
             - name: secret-volume
-              mountPath: {{ .Values.appsecretpath }}
+              mountPath: {{ .Values.appmgr.appsecretpath }}
             - name: cert-volume
-              mountPath: {{ .Values.appcertpath }}
+              mountPath: {{ .Values.appmgr.appcertpath }}
           envFrom:
             - configMapRef:
-                name: {{ include "appmgr.fullname" . }}-appenv
+                name: {{ include "common.configmapname.appmgr" . }}-env
           livenessProbe:
             #exec:
             #  command:
@@ -73,29 +83,14 @@ spec:
           #    path: /
           #    port: http
           restartPolicy: Always
-          resources:
-            {{- toYaml .Values.resources | nindent 12 }}
           securityContext:
             # ubuntu
             #runAsUser: 1000
             #allowPrivilegeEscalation: false
-      {{- with .Values.nodeSelector }}
-      nodeSelector:
-        {{- toYaml . | nindent 8 }}
-      {{- end }}
-    {{- with .Values.affinity }}
-      affinity:
-        {{- toYaml . | nindent 8 }}
-    {{- end }}
-    {{- with .Values.tolerations }}
-      tolerations:
-        {{- toYaml . | nindent 8 }}
-    {{- end }}
-
       volumes:
         - name: config-volume
           configMap:
-            name: {{ include "appmgr.fullname" . }}-appconfig
+            name: {{ include "common.configmapname.appmgr" . }}-appconfig
         - name: secret-volume
           secret:
             secretName: {{ include "common.helmrepositorycred" . }}