1
0
molgenis-ops-docker-helm/molgenis/templates/deployment.yaml

127 lines
3.9 KiB
YAML
Raw Normal View History

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 }}
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
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
mountPath: /home/molgenis
{{- end }}
2018-09-10 15:21:10 +02:00
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 60
2018-09-10 16:53:58 +02:00
periodSeconds: 5
failureThreshold: 25
successThreshold: 1
2018-09-10 15:21:10 +02:00
readinessProbe:
httpGet:
path: /api/v2/version
port: 8080
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-10 13:51:09 +02:00
resources:
{{ toYaml .resources | indent 12 }}
{{- end }}
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-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 }}