-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoes-sapor-deployment.yaml
72 lines (72 loc) · 2.17 KB
/
oes-sapor-deployment.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{{- if or (eq .Values.installationMode "OES-AP") (eq .Values.installationMode "OES") -}}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: oes
component: sapor
{{ include "oes.standard-labels" . | indent 4 }}
name: oes-sapor
spec:
replicas: 1
selector:
matchLabels:
app: oes
component: sapor
template:
metadata:
annotations:
configmap/checksum: {{ (.Files.Glob "config/oes-sapor/application.yml").AsConfig | sha256sum }}
labels:
app: oes
component: sapor
{{ include "oes.standard-labels" . | indent 8 }}
spec:
initContainers:
- name: db-check
image: busybox:1.28
command: ['sh', '-c', "sleep 60;until nslookup oes-db.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for oes-db to be up and running; sleep 2; done"]
containers:
- image: {{ template "sapor.image" . }}
name: oes-sapor
ports:
- containerPort: 8085
protocol: TCP
volumeMounts:
- name: sapor-config-volume
mountPath: /opt/opsmx/application.yml
subPath: application.yml
{{- if .Values.sapor.config.caCerts.override }}
- name: certs-volume
mountPath: /etc/pki/ca-trust/extracted/java
{{- end }}
resources:
requests:
memory: "{{ .Values.sapor.requests.memory }}"
cpu: "{{ .Values.sapor.requests.cpu }}"
limits:
memory: "{{ .Values.sapor.limits.memory }}"
cpu: "{{ .Values.sapor.limits.cpu }}"
readinessProbe:
tcpSocket:
port: 8085
initialDelaySeconds: 120
periodSeconds: 30
livenessProbe:
httpGet:
path: /mgmt/health
port: 8085
initialDelaySeconds: 180
periodSeconds: 60
imagePullSecrets:
- name: {{ .Values.imagePullSecret }}
volumes:
- configMap:
name: oes-sapor-config
name: sapor-config-volume
{{- if .Values.sapor.config.caCerts.override }}
- name: certs-volume
configMap:
name: sapor-certs
{{- end -}}
{{- end -}}