updating helm/docker files and database config files
[it/otf.git] / a1-mediator-vth / helm / a1-mediator-vth / templates / deployment.yaml
1 apiVersion: extensions/v1beta1\r
2 kind: Deployment\r
3 metadata:\r
4   name: {{ .Values.appName}}\r
5   namespace: {{.Values.namespace}}\r
6   labels:\r
7     app: {{ .Values.appName}}\r
8     version: {{.Values.version}}\r
9 spec:\r
10   revisionHistoryLimit: 1\r
11   minReadySeconds: 10\r
12   strategy:\r
13   # indicate which strategy we want for rolling update\r
14     type: RollingUpdate\r
15     rollingUpdate:\r
16       maxSurge: 0\r
17       maxUnavailable: 1\r
18   replicas: {{ .Values.replicas}}\r
19   selector:\r
20     matchLabels:\r
21       app: {{ .Values.appName}}\r
22       version: {{.Values.version}}\r
23   template:\r
24     metadata:\r
25       labels:\r
26         app: {{ .Values.appName}}\r
27         version: {{.Values.version}}\r
28     spec:\r
29       {{ if .Values.pullSecret }}\r
30       imagePullSecrets:\r
31         - name: {{ .Values.pullSecret }}\r
32       {{ end }}    \r
33       serviceAccount: default\r
34       volumes:\r
35       - name: {{ .Values.appName}}-cert-volume\r
36         secret:\r
37           secretName: {{.Values.sharedCert}}\r
38           optional: true\r
39           items:\r
40           - key: PEM_CERT\r
41             path: otf.pem\r
42           - key: PEM_KEY\r
43             path: privateKey.pem\r
44 #      {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}} TODO UNCOMMENT WHEN PUSHING TO ORAN\r
45 #      {{else}}\r
46 #      - name: logging-pvc\r
47 #        persistentVolumeClaim:\r
48 #          {{if eq .Values.env "prod"}}\r
49 #          claimName: {{ .Values.pvc.prod | quote }}\r
50 #          {{ else }}\r
51 #          claimName: {{ .Values.pvc.dev | quote }}\r
52 #          {{ end }}\r
53 #      {{end}}\r
54       containers:\r
55       - name: {{ .Values.appName}}\r
56         image: {{ .Values.image}}\r
57         imagePullPolicy: Always\r
58         ports:\r
59         - name: http\r
60           containerPort: 5000\r
61 #          nodePort: {{.Values.nodePort}}\r
62           protocol: TCP\r
63 #        {{ if eq .Values.env "st"}} TODO UNCOMMENT FOR ORAN?\r
64 #        resources:\r
65 #          limits:\r
66 #            memory: "512Mi"\r
67 #            cpu: "500m"\r
68 #          requests:\r
69 #            memory: "256Mi"\r
70 #            cpu: "100m"\r
71 #        {{else}}\r
72 #        resources:\r
73 #          limits:\r
74 #            memory: "1Gi"\r
75 #            cpu: "1"\r
76 #          requests:\r
77 #            memory: "1Gi"\r
78 #            cpu: "1"\r
79 #        {{end}}\r
80         env:\r
81         - name: NAMESPACE\r
82           value: {{.Values.namespace}}\r
83         - name: APP_NAME\r
84           value: {{ .Values.appName}}\r
85         - name: APP_VERSION\r
86           value: {{.Values.version}}\r
87         volumeMounts:\r
88         - name: {{.Values.appName}}-cert-volume\r
89           mountPath: /opt/cert\r
90 #        {{ if or (eq .Values.env "st") (eq .Values.env "prod-dr")}}\r
91 #        {{else}}\r
92 #        - name: logging-pvc\r
93 #          mountPath: "/otf/logs"\r
94 #        {{end}}\r
95         livenessProbe:\r
96           httpGet:\r
97             path: {{.Values.health}}\r
98             port: http\r
99             scheme: HTTP\r
100             httpHeaders:\r
101               - name: X-Custom-Header\r
102                 value: Alive\r
103           initialDelaySeconds: 30\r
104           timeoutSeconds: 30\r
105           periodSeconds: 30\r
106         readinessProbe:\r
107           httpGet:\r
108             path: {{.Values.health}}\r
109             port: http\r
110             scheme: HTTP\r
111             httpHeaders:\r
112               - name: X-Custom-Header\r
113                 value: Ready\r
114           initialDelaySeconds: 30\r
115           timeoutSeconds: 30\r
116           periodSeconds: 30\r
117       restartPolicy: Always\r