104 lines
3.1 KiB
YAML
104 lines
3.1 KiB
YAML
|
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:
|
||
|
- name: opal.home
|
||
|
value: /home/opal
|
||
|
- name: db_uri
|
||
|
value: jdbc:postgresql://localhost/opal
|
||
|
- name: db_user
|
||
|
value: opal
|
||
|
- name: db_password
|
||
|
value: opal
|
||
|
- name: admin.password
|
||
|
value: "{{ .adminPassword }}"
|
||
|
- name: CATALINA_OPTS
|
||
|
{{- if eq .type.kind "small" }}
|
||
|
value: "-Xmx{{ .type.small.javaOpts.maxHeapSpace }} -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
|
||
|
{{- else if eq .type.kind "medium"}}
|
||
|
value: "-Xmx{{ .type.medium.javaOpts.maxHeapSpace }} -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
|
||
|
{{- else }}
|
||
|
value: "-Xmx{{ .type.large.javaOpts.maxHeapSpace }} -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
|
||
|
{{- end }}
|
||
|
ports:
|
||
|
- containerPort: 8080
|
||
|
{{- if $.Values.persistence.enabled }}
|
||
|
volumeMounts:
|
||
|
- name: opal-nfs
|
||
|
mountPath: /home/opal
|
||
|
{{- end }}
|
||
|
livenessProbe:
|
||
|
httpGet:
|
||
|
path: /
|
||
|
port: 8080
|
||
|
initialDelaySeconds: 60
|
||
|
periodSeconds: 5
|
||
|
failureThreshold: 25
|
||
|
successThreshold: 1
|
||
|
readinessProbe:
|
||
|
httpGet:
|
||
|
path: /api/v2/version
|
||
|
port: 8080
|
||
|
initialDelaySeconds: 120
|
||
|
periodSeconds: 30
|
||
|
failureThreshold: 3
|
||
|
successThreshold: 1
|
||
|
resources:
|
||
|
{{- if eq .type.kind "small" }}
|
||
|
{{ toYaml .type.small.resources | indent 12 }}
|
||
|
{{- else if eq .type.kind "medium" }}
|
||
|
{{ toYaml .type.medium.resources | indent 12 }}
|
||
|
{{- else }}
|
||
|
{{ toYaml .type.large.resources | indent 12 }}
|
||
|
{{- end }}
|
||
|
{{- end }}
|
||
|
|
||
|
{{- if .Values.persistence.enabled }}
|
||
|
volumes:
|
||
|
- name: opal-nfs
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ .Values.opal.persistence.claim }}
|
||
|
{{- 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 }}
|