2018-10-23 21:22:53 +02:00
|
|
|
apiVersion: apps/v1beta2
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
{{- with .Values.ingress.annotations }}
|
|
|
|
annotations:
|
|
|
|
{{ toYaml . | indent 4 }}
|
|
|
|
{{- end }}
|
|
|
|
name: {{ template "opal.fullname" . }}
|
|
|
|
labels:
|
|
|
|
app: {{ template "opal.name" . }}
|
|
|
|
chart: {{ template "opal.chart" . }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
spec:
|
|
|
|
replicas: {{ .Values.replicaCount }}
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: {{ template "opal.name" . }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
strategy:
|
|
|
|
type: Recreate
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: {{ template "opal.name" . }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: opal
|
|
|
|
{{- with .Values.opal }}
|
|
|
|
image: {{ .image.repository }}/{{ .image.name }}:{{ .image.tag }}
|
|
|
|
imagePullPolicy: {{ .image.pullPolicy }}
|
|
|
|
env:
|
2018-11-06 13:09:12 +01:00
|
|
|
- name: OPAL_ADMINISTRATOR_PASSWORD
|
2018-10-23 21:22:53 +02:00
|
|
|
value: "{{ .adminPassword }}"
|
|
|
|
ports:
|
2018-11-06 13:09:12 +01:00
|
|
|
- containerPort: {{ $.Values.service.port }}
|
2018-10-23 21:22:53 +02:00
|
|
|
{{- if $.Values.persistence.enabled }}
|
|
|
|
volumeMounts:
|
|
|
|
- name: opal-nfs
|
|
|
|
mountPath: /home/opal
|
|
|
|
{{- end }}
|
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /
|
2018-11-06 13:09:12 +01:00
|
|
|
port: {{ $.Values.service.port }}
|
2018-10-23 21:22:53 +02:00
|
|
|
initialDelaySeconds: 60
|
|
|
|
periodSeconds: 5
|
|
|
|
failureThreshold: 25
|
|
|
|
successThreshold: 1
|
2018-11-06 13:09:12 +01:00
|
|
|
resources:
|
|
|
|
{{ toYaml .resources | indent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
- name: rserver
|
|
|
|
{{- with .Values.rserver }}
|
|
|
|
image: {{ .image.repository }}/{{ .image.name }}:{{ .image.tag }}
|
|
|
|
imagePullPolicy: {{ .image.pullPolicy }}
|
|
|
|
ports:
|
|
|
|
- containerPort: 6612
|
|
|
|
- containerPort: 6311
|
2018-10-23 21:22:53 +02:00
|
|
|
resources:
|
2018-11-06 06:42:18 +01:00
|
|
|
{{ toYaml .resources | indent 12 }}
|
2018-10-23 21:22:53 +02:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- if .Values.persistence.enabled }}
|
|
|
|
volumes:
|
|
|
|
- name: opal-nfs
|
|
|
|
persistentVolumeClaim:
|
2018-11-06 09:26:27 +01:00
|
|
|
claimName: {{ .Release.Name }}-{{ .Values.opal.persistence.claim }}
|
2018-10-23 21:22:53 +02:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{ toYaml . | indent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{ toYaml . | indent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{ toYaml . | indent 8 }}
|
|
|
|
{{- end }}
|