mirror of
https://gitlab.com/oecis/charts.git
synced 2024-11-19 13:19:03 +00:00
111 lines
3.9 KiB
YAML
111 lines
3.9 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "vikunja.fullname" . }}
|
|
labels:
|
|
{{- include "vikunja.labels" . | nindent 4 }}
|
|
spec:
|
|
{{- if not .Values.autoscaling.enabled }}
|
|
replicas: {{ .Values.replicaCount }}
|
|
{{- end }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "vikunja.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
{{- with .Values.podAnnotations }}
|
|
annotations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
labels:
|
|
{{- include "vikunja.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "vikunja.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
{{- if not (empty .Values.extraVolumes ) }}
|
|
volumes:
|
|
{{- toYaml .Values.extraVolumes | nindent 8 }}
|
|
{{- end }}
|
|
{{- if not (empty .Values.initContainers)}}
|
|
initContainers:
|
|
{{- toYaml .Values.initContainers | nindent 10}}
|
|
{{- end }}
|
|
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: {{ .Values.service.port }}
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /api/v1/info
|
|
port: http
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /api/v1/info
|
|
port: http
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
env:
|
|
- name: VIKUNJA_LOG_LEVEL
|
|
value: {{ .Values.config.log.level }}
|
|
{{- if .Values.config.cache.enabled }}
|
|
- name: VIKUNJA_CACHE_ENABLED
|
|
value: {{ .Values.config.cache.enabled | quote }}
|
|
- name: VIKUNJA_CACHE_TYPE
|
|
value: {{ .Values.config.cache.type }}
|
|
- name: VIKUNJA_CACHE_MAXELEMENTSIZE
|
|
value: {{ .Values.config.cache.maxElementSize | quote }}
|
|
- name: VIKUNJA_REDIS_ENABLED
|
|
value: {{ .Values.config.cache.redis.enabled | quote }}
|
|
- name: VIKUNJA_REDIS_HOST
|
|
value: {{ .Values.config.cache.redis.host }}
|
|
{{- end }}
|
|
- name: VIKUNJA_DATABASE_TYPE
|
|
value: {{ .Values.config.db.type }}
|
|
- name: VIKUNJA_DATABASE_HOST
|
|
value: {{ .Values.config.db.host }}
|
|
- name: VIKUNJA_DATABASE_DATABASE
|
|
value: {{ .Values.config.db.database }}
|
|
- name: VIKUNJA_DATABASE_PASSWORD
|
|
{{- if .Values.config.db.existingSecret }}
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Values.config.db.existingSecret }}
|
|
key: {{ .Values.config.db.secretKeys.dbPasswordKey }}
|
|
{{- else }}
|
|
value: {{ .Values.config.db.password }}
|
|
{{- end }}
|
|
- name: VIKUNJA_DATABASE_USER
|
|
value: {{ .Values.config.db.user }}
|
|
- name: VIKUNJA_SERVICE_PUBLICURL
|
|
value: {{ .Values.config.publicUrl }}
|
|
{{- if not (empty .Values.extraEnv) }}
|
|
{{- toYaml .Values.extraEnv | nindent 12 }}
|
|
{{- end }}
|
|
{{- if not (empty .Values.extraVolumeMounts) }}
|
|
volumeMounts:
|
|
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
|
|
{{- 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 }}
|