-
Notifications
You must be signed in to change notification settings - Fork 86
/
mancenter-deployment.yaml
106 lines (106 loc) · 3.96 KB
/
mancenter-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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{{- if .Values.mancenter.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "mancenter.fullname" . }}
labels:
app: {{ template "hazelcast.name" . }}
chart: {{ template "hazelcast.chart" . }}
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
spec:
replicas: 1
selector:
matchLabels:
app: {{ template "hazelcast.name" . }}
release: "{{ .Release.Name }}"
role: mancenter
template:
metadata:
labels:
app: {{ template "hazelcast.name" . }}
chart: {{ template "hazelcast.chart" . }}
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
role: mancenter
spec:
{{- if .Values.mancenter.image.pullSecrets }}
imagePullSecrets:
{{- range .Values.mancenter.image.pullSecrets }}
- name: {{ . }}
{{- end}}
{{- end}}
{{- if .Values.mancenter.nodeSelector }}
nodeSelector:
{{ toYaml .Values.mancenter.nodeSelector | indent 8 }}
{{- end }}
containers:
- name: {{ template "mancenter.fullname" . }}
image: "{{ .Values.mancenter.image.repository }}:{{ .Values.mancenter.image.tag }}"
imagePullPolicy: {{ .Values.mancenter.image.pullPolicy | quote }}
resources:
{{ toYaml .Values.mancenter.resources | indent 10 }}
ports:
- name: mancenter
containerPort: 8080
{{- if .Values.mancenter.livenessProbe.enabled }}
livenessProbe:
httpGet:
path: /hazelcast-mancenter/health
port: 8080
initialDelaySeconds: {{ .Values.mancenter.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.mancenter.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.mancenter.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.mancenter.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.mancenter.livenessProbe.failureThreshold }}
{{- end }}
{{- if .Values.mancenter.readinessProbe.enabled }}
readinessProbe:
httpGet:
path: /hazelcast-mancenter/health
port: 8080
initialDelaySeconds: {{ .Values.mancenter.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.mancenter.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.mancenter.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.mancenter.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.mancenter.readinessProbe.failureThreshold }}
{{- end }}
volumeMounts:
- name: mancenter-storage
mountPath: /data
env:
- name: MC_LICENSE_KEY
{{- if .Values.mancenter.licenseKeySecretName }}
valueFrom:
secretKeyRef:
name: {{ .Values.mancenter.licenseKeySecretName }}
key: key
{{- else }}
value: {{ .Values.mancenter.licenseKey }}
{{- end }}
- name: JAVA_OPTS
value: "{{ if or .Values.mancenter.licenseKey .Values.mancenter.licenseKeySecretName }}-Dhazelcast.mc.license=$(MC_LICENSE_KEY){{ end }} {{ .Values.mancenter.javaOpts }}"
{{- if .Values.securityContext.enabled }}
securityContext:
runAsUser: {{ .Values.securityContext.runAsUser }}
allowPrivilegeEscalation: false
{{- if .Values.securityContext.runAsUser }}
runAsNonRoot: true
{{- end }}
capabilities:
drop:
- ALL
{{- end }}
{{- if .Values.securityContext.enabled }}
securityContext:
fsGroup: {{ .Values.securityContext.fsGroup }}
{{- end }}
volumes:
- name: mancenter-storage
{{- if .Values.mancenter.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.mancenter.persistence.existingClaim | default (include "mancenter.fullname" .) }}
{{- else }}
emptyDir: {}
{{- end -}}
{{- end -}}