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.
176 lines
6.6 KiB
176 lines
6.6 KiB
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
|
|
value: "{{ .Values.sigi.emailAdmins }}"
|
|
- name: EMAIL_PORT
|
|
value: "{{ .Values.sigi.emailPort }}"
|
|
- name: EMAIL_HOST
|
|
value: "{{ .Values.sigi.emailHost }}"
|
|
- name: DEFAULT_FROM_EMAIL
|
|
value: "{{ .Values.sigi.defaultFromEmail }}"
|
|
- name: AUTH_LDAP_SERVER_URI
|
|
value: "{{ .Values.sigi.auth.ldap.serverURI }}"
|
|
- name: AUTH_LDAP_BIND_DN
|
|
value: "{{ .Values.sigi.auth.ldap.bindDN }}"
|
|
- name: AUTH_LDAP_USER
|
|
value: "{{ .Values.sigi.auth.ldap.user }}"
|
|
- name: AUTH_LDAP_BIND_PASSWORD
|
|
value: "{{ .Values.sigi.auth.ldap.bindPwd }}"
|
|
# valueFrom:
|
|
# # Secret Key
|
|
# secretKeyRef:
|
|
# name: {{ include "sigi.fullname" . }}-auth-ldap-key
|
|
# key: AUTH_LDAP_BIND_PASSWORD
|
|
- name: AUTH_LDAP_USER_SEARCH_STRING
|
|
value: "{{ .Values.sigi.auth.ldap.userSearchString }}"
|
|
- name: AUTH_LDAP_USER_ATTR_MAP
|
|
value: {{ .Values.sigi.auth.ldap.userAttrMap | quote }}
|
|
- name: AUTH_LDAP_GROUP
|
|
value: "{{ .Values.sigi.auth.ldap.group }}"
|
|
- name: AUTH_LDAP_GROUP_SEARCH_STRING
|
|
value: "{{ .Values.sigi.auth.ldap.groupSearchString }}"
|
|
- name: AUTH_LDAP_GROUP_TYPE_STRING
|
|
value: "{{ .Values.sigi.auth.ldap.groupTypeString }}"
|
|
- name: AUTH_LDAP_FIND_GROUP_PERMS
|
|
value: "{{ .Values.sigi.auth.ldap.findGroupPerms }}"
|
|
- name: AUTH_LDAP_MIRROR_GROUPS
|
|
value: "{{ .Values.sigi.auth.ldap.mirrorGroups }}"
|
|
- name: AUTH_LDAP_CACHE_GROUPS
|
|
value: "{{ .Values.sigi.auth.ldap.cacheGroups }}"
|
|
- name: AUTH_LDAP_GROUP_CACHE_TIMEOUT
|
|
value: "{{ .Values.sigi.auth.ldap.groupCacheTimeout }}"
|
|
- name: AUTH_LDAP_PROFILE_ATTR_MAP
|
|
value: {{ .Values.sigi.auth.ldap.profileAttrMap | quote }}
|
|
- name: AUTH_PROFILE_MODULE
|
|
value: "{{ .Values.sigi.auth.profileModule }}"
|
|
- name: MOODLE_BASE_URL
|
|
value: "{{ .Values.sigi.saberes.moodleUrl }}"
|
|
- name: MOODLE_API_TOKEN
|
|
value: "{{ .Values.sigi.saberes.moodleToken }}"
|
|
# valueFrom:
|
|
# # Secret Key
|
|
# secretKeyRef:
|
|
# name: {{ include "sigi.fullname" . }}-saberes-tkn
|
|
# key: MOODLE_API_TOKEN
|
|
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 }}
|
|
|