2018-09-07 09:50:03 +02:00
|
|
|
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 }}
|
2018-09-27 11:46:11 +02:00
|
|
|
strategy:
|
|
|
|
type: Recreate
|
2018-09-07 09:50:03 +02:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: {{ template "molgenis.name" . }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: molgenis
|
|
|
|
{{- with .Values.molgenis }}
|
2018-09-07 16:51:41 +02:00
|
|
|
image: {{ .image.repository }}/{{ .image.name }}:{{ .image.tag }}
|
2018-09-07 09:50:03 +02:00
|
|
|
imagePullPolicy: {{ .image.pullPolicy }}
|
|
|
|
env:
|
|
|
|
- name: molgenis.home
|
|
|
|
value: /home/molgenis
|
|
|
|
- name: opencpu.uri.host
|
2018-09-10 11:32:14 +02:00
|
|
|
value: {{ .services.opencpu.host }}
|
2018-09-07 09:50:03 +02:00
|
|
|
- name: elasticsearch.transport.addresses
|
2018-09-07 16:51:41 +02:00
|
|
|
value: {{ .services.elasticsearch.transportAddresses }}
|
2018-09-07 09:50:03 +02:00
|
|
|
- name: elasticsearch.cluster.name
|
2018-09-07 16:51:41 +02:00
|
|
|
value: {{ .services.elasticsearch.clusterName }}
|
2018-09-07 09:50:03 +02:00
|
|
|
- name: db_uri
|
2018-09-07 16:51:41 +02:00
|
|
|
value: jdbc:postgresql://{{ .services.postgres.host }}/{{ .services.postgres.scheme }}
|
2018-09-07 09:50:03 +02:00
|
|
|
- name: db_user
|
2018-09-07 16:51:41 +02:00
|
|
|
value: {{ .services.postgres.user }}
|
2018-09-07 09:50:03 +02:00
|
|
|
- name: db_password
|
2018-09-07 16:51:41 +02:00
|
|
|
value: {{ .services.postgres.password }}
|
2018-09-07 09:50:03 +02:00
|
|
|
- name: admin.password
|
|
|
|
value: {{ .adminPassword }}
|
|
|
|
- name: CATALINA_OPTS
|
2018-09-11 12:25:28 +02:00
|
|
|
value: "-Xmx{{ .javaOpts.maxHeapSpace }} -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
|
2018-09-07 09:50:03 +02:00
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
2018-09-12 08:04:59 +02:00
|
|
|
{{- if $.Values.persistence.enabled }}
|
2018-09-10 17:37:50 +02:00
|
|
|
volumeMounts:
|
|
|
|
- name: molgenis-nfs
|
2018-09-10 21:41:54 +02:00
|
|
|
mountPath: /home/molgenis
|
|
|
|
{{- end }}
|
2018-09-10 15:21:10 +02:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /
|
|
|
|
port: 8080
|
2018-09-11 12:57:40 +02:00
|
|
|
initialDelaySeconds: 60
|
2018-09-10 16:53:58 +02:00
|
|
|
periodSeconds: 5
|
2018-09-11 13:30:43 +02:00
|
|
|
failureThreshold: 25
|
2018-09-11 12:57:40 +02:00
|
|
|
successThreshold: 1
|
2018-09-10 15:21:10 +02:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
|
|
|
path: /api/v2/version
|
|
|
|
port: 8080
|
2018-09-11 12:57:40 +02:00
|
|
|
initialDelaySeconds: 120
|
|
|
|
periodSeconds: 30
|
|
|
|
failureThreshold: 3
|
|
|
|
successThreshold: 1
|
2018-09-07 09:50:03 +02:00
|
|
|
resources:
|
|
|
|
{{ toYaml .resources | indent 12 }}
|
|
|
|
{{- end }}
|
|
|
|
|
2018-09-10 13:51:09 +02:00
|
|
|
- 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
|
2018-09-12 08:04:59 +02:00
|
|
|
{{- if $.Values.persistence.enabled }}
|
|
|
|
volumeMounts:
|
2018-09-12 08:17:34 +02:00
|
|
|
- name: elasticsearch-nfs
|
2018-09-12 08:04:59 +02:00
|
|
|
mountPath: /usr/share/elasticsearch/data
|
|
|
|
{{- end }}
|
2018-09-26 16:04:22 +02:00
|
|
|
resources:
|
|
|
|
{{ toYaml .resources | indent 12 }}
|
|
|
|
{{- end }}
|
2018-09-12 08:04:59 +02:00
|
|
|
|
2018-09-26 16:04:22 +02:00
|
|
|
- name: postgres
|
|
|
|
{{- with .Values.postgres }}
|
|
|
|
image: "{{ .image.repository }}:{{ .image.tag }}"
|
|
|
|
imagePullPolicy: {{ .image.pullPolicy }}
|
|
|
|
env:
|
|
|
|
- name: POSTGRES_USER
|
|
|
|
value: {{ $.Values.molgenis.services.postgres.user }}
|
|
|
|
- name: POSTGRES_PASSWORD
|
|
|
|
value: {{ $.Values.molgenis.services.postgres.password }}
|
|
|
|
- name: POSTGRES_DB
|
|
|
|
value: {{ $.Values.molgenis.services.postgres.scheme }}
|
|
|
|
ports:
|
|
|
|
- containerPort: 5432
|
2018-09-10 13:51:09 +02:00
|
|
|
resources:
|
|
|
|
{{ toYaml .resources | indent 12 }}
|
2018-09-26 16:30:33 +02:00
|
|
|
{{- if $.Values.persistence.enabled }}
|
2018-09-26 16:04:22 +02:00
|
|
|
volumeMounts:
|
|
|
|
- name: postgres-nfs
|
|
|
|
mountPath: /var/lib/postgresql/data
|
2018-09-26 16:30:33 +02:00
|
|
|
{{- end }}
|
2018-09-10 13:51:09 +02:00
|
|
|
{{- end }}
|
|
|
|
|
2018-09-26 16:04:22 +02:00
|
|
|
|
2018-09-12 08:04:59 +02:00
|
|
|
{{- if .Values.persistence.enabled }}
|
2018-09-10 22:06:20 +02:00
|
|
|
volumes:
|
|
|
|
- name: molgenis-nfs
|
|
|
|
persistentVolumeClaim:
|
2018-09-12 08:04:59 +02:00
|
|
|
claimName: {{ .Values.molgenis.persistence.claim }}
|
|
|
|
- name: elasticsearch-nfs
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ .Values.elasticsearch.persistence.claim }}
|
2018-09-26 16:04:22 +02:00
|
|
|
- name: postgres-nfs
|
|
|
|
persistentVolumeClaim:
|
|
|
|
claimName: {{ .Values.postgres.persistence.claim }}
|
2018-09-10 22:06:20 +02:00
|
|
|
{{- end }}
|
2018-09-07 09:50:03 +02:00
|
|
|
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{ toYaml . | indent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{ toYaml . | indent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{ toYaml . | indent 8 }}
|
|
|
|
{{- end }}
|