118 lines
3.6 KiB
YAML
118 lines
3.6 KiB
YAML
apiVersion: apps/v1beta2
|
|
kind: Deployment
|
|
metadata:
|
|
{{- with .Values.ingress.annotations }}
|
|
annotations:
|
|
{{ toYaml . | indent 4 }}
|
|
{{- end }}
|
|
name: {{ template "molgenis.fullname" . }}
|
|
labels:
|
|
app: {{ template "molgenis.name" . }}
|
|
chart: {{ template "molgenis.chart" . }}
|
|
release: {{ .Release.Name }}
|
|
heritage: {{ .Release.Service }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ template "molgenis.name" . }}
|
|
release: {{ .Release.Name }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ template "molgenis.name" . }}
|
|
release: {{ .Release.Name }}
|
|
spec:
|
|
containers:
|
|
- name: molgenis
|
|
{{- with .Values.molgenis }}
|
|
image: {{ .image.repository }}/{{ .image.name }}:{{ .image.tag }}
|
|
imagePullPolicy: {{ .image.pullPolicy }}
|
|
env:
|
|
- name: molgenis.home
|
|
value: /home/molgenis
|
|
- name: opencpu.uri.host
|
|
value: {{ .services.opencpu.host }}
|
|
- name: elasticsearch.transport.addresses
|
|
value: {{ .services.elasticsearch.transportAddresses }}
|
|
- name: elasticsearch.cluster.name
|
|
value: {{ .services.elasticsearch.clusterName }}
|
|
- name: db_uri
|
|
value: jdbc:postgresql://{{ .services.postgres.host }}/{{ .services.postgres.scheme }}
|
|
- name: db_user
|
|
value: {{ .services.postgres.user }}
|
|
- name: db_password
|
|
value: {{ .services.postgres.password }}
|
|
- name: admin.password
|
|
value: {{ .adminPassword }}
|
|
- name: CATALINA_OPTS
|
|
value: "-Xmx{{ .javaOpts.maxHeapSpace }} -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
|
|
ports:
|
|
- containerPort: 8080
|
|
{{- if .persistence.enabled }}
|
|
volumeMounts:
|
|
- name: molgenis-nfs
|
|
mountPath: /home/molgenis
|
|
{{- 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:
|
|
{{ toYaml .resources | indent 12 }}
|
|
{{- end }}
|
|
|
|
- name: elasticsearch
|
|
{{- with .Values.elasticsearch }}
|
|
image: "{{ .image.repository }}:{{ .image.tag }}"
|
|
imagePullPolicy: {{ .image.pullPolicy }}
|
|
env:
|
|
- name: cluster.name
|
|
value: {{ .clusterName }}
|
|
- name: bootstrap.memory_lock
|
|
value: "true"
|
|
- name: ES_JAVA_OPTS
|
|
value: "{{ .javaOpts }}"
|
|
- name: xpack.security.enabled
|
|
value: "false"
|
|
- name: discovery.type
|
|
value: single-node
|
|
ports:
|
|
- containerPort: 9200
|
|
- containerPort: 9300
|
|
resources:
|
|
{{ toYaml .resources | indent 12 }}
|
|
{{- end }}
|
|
|
|
{{- if .Values.molgenis.persistence.enabled }}
|
|
volumes:
|
|
- name: molgenis-nfs
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Values.molgenis.persistence.name }}
|
|
{{- 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 }}
|