Improve oran_oom helm charts
[it/dep.git] / smo-install / oran_oom / rappcatalogueservice / templates / deployment.yaml
index 95304c5..810c7d3 100644 (file)
 
 kind: Deployment
 apiVersion: apps/v1
-metadata:
-  name: {{ include "common.name.rappcatalogueservice" . }}
-  namespace: {{ include "common.namespace.nonrtric" . }}
-  generation: 1
-  labels:
-    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ .Release.Name }}
-    heritage: {{ .Release.Service }}
-  annotations:
-    deployment.kubernetes.io/revision: '1'
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
 spec:
   replicas: 1
-  selector:
-    matchLabels:
-      app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
-      release: {{ .Release.Name }}
+  selector: {{- include "common.selectors" . | nindent 4 }}
   template:
-    metadata:
-      labels:
-        app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
-        release: {{ .Release.Name }}
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
     spec:
-      hostname: {{ include "common.name.rappcatalogueservice" . }}
+      hostname: {{ include "common.name" . }}
       containers:
-      - name: {{ include "common.container.rappcatalogueservice" . }}
-        image: {{ .Values.rappcatalogueservice.image.registry }}/{{ .Values.rappcatalogueservice.image.name }}:{{ .Values.rappcatalogueservice.image.tag }}
-        imagePullPolicy: {{ .Values.rappcatalogueservice.imagePullPolicy }}
-        ports:
-        - containerPort: {{ .Values.rappcatalogueservice.service.targetPort1 }}
-          protocol: TCP
-        - containerPort: {{ .Values.rappcatalogueservice.service.targetPort2 }}
-          protocol: TCP
-        readinessProbe:
-          tcpSocket:
-            port: {{ .Values.rappcatalogueservice.service.targetPort1 }}
-          initialDelaySeconds: {{ .Values.rappcatalogueservice.liveness.initialDelaySeconds }}
-          periodSeconds: {{ .Values.rappcatalogueservice.liveness.periodSeconds }}
-        livenessProbe:
-          tcpSocket:
-            port: {{ .Values.rappcatalogueservice.service.targetPort1 }}
-          initialDelaySeconds: {{ .Values.rappcatalogueservice.liveness.initialDelaySeconds }}
-          periodSeconds: {{ .Values.rappcatalogueservice.liveness.periodSeconds }}
+      - name: {{ include "common.containername" . }}
+        image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+        imagePullPolicy: {{ .Values.imagePullPolicy }}
+        ports: {{- include "common.containerPorts" . | nindent 8 }}
+        {{- include "common.tcpsocketProbes" . | nindent 8 }}