Improve oran_oom helm charts
[it/dep.git] / smo-install / oran_oom / odu-app / templates / deployment.yaml
index 7978f8f..8a2f098 100755 (executable)
 
 apiVersion: apps/v1
 kind: Deployment
-metadata:
-  name: {{ include "odu-app.fullname" . }}
-  labels:
-    {{- include "odu-app.labels" . | nindent 4 }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
   replicas: {{ .Values.replicaCount }}
-  selector:
-    matchLabels:
-      {{- include "odu-app.selectorLabels" . | nindent 6 }}
+  selector: {{- include "common.selectors" . | nindent 4 }}
   template:
-    metadata:
-      {{- with .Values.podAnnotations }}
-      annotations:
-        {{- toYaml . | nindent 8 }}
-      {{- end }}
-      labels:
-        {{- include "odu-app.selectorLabels" . | nindent 8 }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
       {{- with .Values.imagePullSecrets }}
       imagePullSecrets:
@@ -40,7 +29,7 @@ spec:
       securityContext:
         {{- toYaml .Values.podSecurityContext | nindent 8 }}
       containers:
-        - name: {{ .Chart.Name }}
+        - name: {{ include "common.containername" . }}
           securityContext:
             {{- toYaml .Values.securityContext | nindent 12 }}
           image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
@@ -58,10 +47,7 @@ spec:
             value: "{{ .Values.sdnr.password }}"
           - name: NODE_ID
             value: "{{ .Values.simulator.node }}"
-          ports:
-            - name: http
-              containerPort: 80
-              protocol: TCP
+          ports: {{- include "common.containerPorts" . | nindent 10 }}
           resources:
             {{- toYaml .Values.resources | nindent 12 }}
       {{- with .Values.nodeSelector }}