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.
221 lines
7.5 KiB
221 lines
7.5 KiB
2 years ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: {{ include "sigi.fullname" . }}
|
||
|
labels:
|
||
|
{{- include "sigi.labels" . | nindent 4 }}
|
||
|
spec:
|
||
|
{{- if not .Values.autoscaling.enabled }}
|
||
|
replicas: {{ .Values.replicaCount }}
|
||
|
{{- end }}
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
{{- include "sigi.selectorLabels" . | nindent 6 }}
|
||
|
template:
|
||
|
metadata:
|
||
|
{{- with .Values.podAnnotations }}
|
||
|
annotations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
labels:
|
||
|
{{- include "sigi.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: DEBUG
|
||
|
value: "{{ .Values.sigi.debug }}"
|
||
|
- name: TZ
|
||
|
value: "{{ .Values.sigi.timeZone }}"
|
||
|
- name: LANG
|
||
|
value: "{{ .Values.sigi.language }}"
|
||
|
- name: DATABASE_URL
|
||
|
value: {{ printf "postgresql://%s:%s@%s:5432/%s" .Values.postgresql.auth.username .Values.postgresql.auth.password (include "postgresql.fullname" .) .Values.postgresql.auth.database| quote }}
|
||
|
- name: ADMINS
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-email
|
||
|
key: ADMINS
|
||
|
- name: EMAIL_PORT
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-email
|
||
|
key: EMAIL_PORT
|
||
|
- name: EMAIL_HOST
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-email
|
||
|
key: EMAIL_HOST
|
||
|
- name: DEFAULT_FROM_EMAIL
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-email
|
||
|
key: DEFAULT_FROM_EMAIL
|
||
|
- name: AUTH_LDAP_SERVER_URI
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_SERVER_URI
|
||
|
- name: AUTH_LDAP_BIND_DN
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_BIND_DN
|
||
|
- name: AUTH_LDAP_USER
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_USER
|
||
|
- name: AUTH_LDAP_USER_SEARCH_STRING
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_USER_SEARCH_STRING
|
||
|
- name: AUTH_LDAP_GROUP
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_GROUP
|
||
|
- name: AUTH_LDAP_GROUP_SEARCH_STRING
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_GROUP_SEARCH_STRING
|
||
|
- name: AUTH_LDAP_GROUP_TYPE_STRING
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_GROUP_TYPE_STRING
|
||
|
- name: AUTH_LDAP_USER_ATTR_MAP
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_USER_ATTR_MAP
|
||
|
- name: AUTH_LDAP_PROFILE_ATTR_MAP
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_PROFILE_ATTR_MAP
|
||
|
- name: AUTH_LDAP_FIND_GROUP_PERMS
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_FIND_GROUP_PERMS
|
||
|
- name: AUTH_LDAP_MIRROR_GROUPS
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_MIRROR_GROUPS
|
||
|
- name: AUTH_LDAP_CACHE_GROUPS
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_CACHE_GROUPS
|
||
|
- name: AUTH_LDAP_GROUP_CACHE_TIMEOUT
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_LDAP_GROUP_CACHE_TIMEOUT
|
||
|
- name: AUTH_PROFILE_MODULE
|
||
|
valueFrom:
|
||
|
configMapKeyRef:
|
||
|
name: sigi-auth-ldap
|
||
|
key: AUTH_PROFILE_MODULE
|
||
|
- name: AUTH_LDAP_BIND_PASSWORD
|
||
|
valueFrom:
|
||
|
# Secret Key
|
||
|
secretKeyRef:
|
||
|
name: sigi-auth-ldap-key
|
||
|
key: AUTH_LDAP_BIND_PASSWORD
|
||
|
volumeMounts:
|
||
|
# - mountPath: /var/interlegis/sigi/data
|
||
|
# name: data
|
||
|
- mountPath: /srv/interlegis/sigi/media
|
||
|
name: {{ include "sigi.fullname" . }}-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
|
||
|
# secret:
|
||
|
# defaultMode: 440
|
||
|
# secretName: {{ include "sigi.fullname" . }}-secretkey
|
||
|
- name: {{ include "sigi.fullname" . }}-media
|
||
|
{{- if .Values.persistence.enabled }}
|
||
|
persistentVolumeClaim:
|
||
|
claimName: {{ include "sigi.fullname" . }}-media
|
||
|
{{- else }}
|
||
|
emptyDir: {}
|
||
|
{{- end }}
|
||
|
{{- with .Values.nodeSelector }}
|
||
|
nodeSelector:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
affinity:
|
||
|
podAffinity:
|
||
|
preferredDuringSchedulingIgnoredDuringExecution:
|
||
|
- weight: 100
|
||
|
podAffinityTerm:
|
||
|
labelSelector:
|
||
|
matchExpressions:
|
||
|
- key: app.kubernetes.io/name
|
||
|
operator: In
|
||
|
values:
|
||
|
- {{ include "sigi.name" . }}
|
||
|
- key: app.kubernetes.io/instance
|
||
|
operator: In
|
||
|
values:
|
||
|
- {{ .Release.Name }}
|
||
|
topologyKey: kubernetes.io/hostname
|
||
|
- weight: 50
|
||
|
podAffinityTerm:
|
||
|
labelSelector:
|
||
|
matchExpressions:
|
||
|
- key: app.kubernetes.io/name
|
||
|
operator: In
|
||
|
values:
|
||
|
- postgresql
|
||
|
- key: app.kubernetes.io/instance
|
||
|
operator: In
|
||
|
values:
|
||
|
- {{ .Release.Name }}
|
||
|
topologyKey: kubernetes.io/hostname
|
||
|
{{- with .Values.affinity }}
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|
||
|
{{- with .Values.tolerations }}
|
||
|
tolerations:
|
||
|
{{- toYaml . | nindent 8 }}
|
||
|
{{- end }}
|