You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
4.0 KiB
122 lines
4.0 KiB
4 years ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ include "sapl.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "sapl.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
{{- if not .Values.autoscaling.enabled }}
|
||
|
replicas: {{ .Values.replicaCount }}
|
||
|
{{- end }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "sapl.selectorLabels" . | nindent 6 }}
|
||
|
template:
|
||
|
metadata:
|
||
|
{{- with .Values.podAnnotations }}
|
||
|
annotations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
labels:
|
||
|
{{- include "sapl.selectorLabels" . | nindent 8 }}
|
||
|
spec:
|
||
|
{{- with .Values.imagePullSecrets }}
|
||
|
imagePullSecrets:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||
|
containers:
|
||
|
- name: {{ .Chart.Name }}
|
||
|
securityContext:
|
||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||
|
ports:
|
||
|
- name: http
|
||
|
containerPort: 80
|
||
|
protocol: TCP
|
||
|
env:
|
||
|
- name: DATABASE_URL
|
||
|
value: {{ printf "postgresql://%s:%s@%s:5432/%s" .Values.postgresql.postgresqlUsername .Values.postgresql.postgresqlPassword (include "postgresql.fullname" .) .Values.postgresql.postgresqlDatabase| quote }}
|
||
|
- name: ADMIN_PASSWORD
|
||
|
value: "{{ .Values.sapl.adminPassword }}"
|
||
|
- name: ADMIN_EMAIL
|
||
|
value: "{{ .Values.sapl.adminEmail }}"
|
||
|
- name: EMAIL_SEND_USER
|
||
|
value: "{{ .Values.sapl.emailSendUser }}"
|
||
|
- name: DEBUG
|
||
|
value: "{{ .Values.sapl.debug }}"
|
||
|
- name: USE_TLS
|
||
|
value: "{{ .Values.sapl.useTls }}"
|
||
|
- name: EMAIL_PORT
|
||
|
value: "{{ .Values.sapl.emailPort }}"
|
||
|
- name: EMAIL_HOST
|
||
|
value: "{{ .Values.sapl.emailHost }}"
|
||
|
- name: TZ
|
||
|
value: "{{ .Values.sapl.timeZone }}"
|
||
|
- name: USE_SOLR
|
||
|
value: "{{ .Values.sapl.useSolr }}"
|
||
|
- name: SOLR_COLLECTION
|
||
|
value: "{{ .Values.sapl.solrCollection }}"
|
||
|
- name: SOLR_URL
|
||
|
value: "{{ .Values.sapl.solrUrl }}"
|
||
|
- name: NUM_SHARDS
|
||
|
value: "{{ .Values.sapl.solrNumShards }}"
|
||
|
- name: RF
|
||
|
value: "{{ .Values.sapl.solrReplFactor }}"
|
||
|
- name: MAX_SHARDS_PER_NODE
|
||
|
value: "{{ .Values.sapl.solrMaxShardsPerNode }}"
|
||
|
volumeMounts:
|
||
|
- mountPath: /var/interlegis/sapl/data
|
||
|
name: data
|
||
|
- mountPath: /var/interlegis/sapl/media
|
||
|
name: media
|
||
|
livenessProbe:
|
||
|
httpGet:
|
||
|
path: /
|
||
|
port: http
|
||
|
initialDelaySeconds: 60
|
||
|
failureThreshold: 3
|
||
|
periodSeconds: 60
|
||
|
successThreshold: 1
|
||
|
timeoutSeconds: 5
|
||
|
readinessProbe:
|
||
|
httpGet:
|
||
|
path: /
|
||
|
port: http
|
||
|
initialDelaySeconds: 60
|
||
|
failureThreshold: 3
|
||
|
periodSeconds: 30
|
||
|
successThreshold: 1
|
||
|
timeoutSeconds: 5
|
||
|
resources:
|
||
|
{{- toYaml .Values.resources | nindent 12 }}
|
||
|
volumes:
|
||
|
- name: data
|
||
|
{{- if .Values.persistence.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: data
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
|
{{- end }}
|
||
|
- name: media
|
||
|
{{- if .Values.persistence.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: media
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
|
{{- end }}
|
||
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.affinity }}
|
||
|
affinity:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|