-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoes-visibility-deployment.yaml
65 lines (65 loc) · 2 KB
/
oes-visibility-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
{{- if or (eq .Values.installationMode "OES-AP") (eq .Values.installationMode "AP") (eq .Values.installationMode "OES") -}}
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: oes
component: visibility
{{ include "oes.standard-labels" . | indent 4 }}
name: oes-visibility
spec:
replicas: 1
selector:
matchLabels:
app: oes
component: visibility
strategy: {}
template:
metadata:
annotations:
configmap/checksum: {{ (.Files.Glob "config/oes-visibility/visibility-local.yml").AsConfig | sha256sum }}
labels:
app: oes
component: visibility
{{ 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 "visibility.image" . }}
name: oes-visibility
ports:
- containerPort: 8096
protocol: TCP
env:
volumeMounts:
- mountPath: /opsmx/conf/visibility-local.yml
name: visibility-config
subPath: visibility-local.yml
resources:
requests:
memory: "{{ .Values.visibility.requests.memory }}"
cpu: "{{ .Values.visibility.requests.cpu }}"
limits:
memory: "{{ .Values.visibility.limits.memory }}"
cpu: "{{ .Values.visibility.limits.cpu }}"
readinessProbe:
tcpSocket:
port: 8096
initialDelaySeconds: 10
periodSeconds: 5
livenessProbe:
httpGet:
path: /mgmt/health
port: 8096
initialDelaySeconds: 30
periodSeconds: 60
imagePullSecrets:
- name: {{ .Values.imagePullSecret}}
volumes:
- name: visibility-config
configMap:
name: oes-visibility-config
{{- end -}}