mirror of https://github.com/Requarks/wiki.git
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.
75 lines
2.5 KiB
75 lines
2.5 KiB
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ include "wiki.fullname" . }}
|
|
labels:
|
|
{{- include "wiki.labels" . | nindent 4 }}
|
|
spec:
|
|
replicas: {{ .Values.replicaCount }}
|
|
selector:
|
|
matchLabels:
|
|
{{- include "wiki.selectorLabels" . | nindent 6 }}
|
|
template:
|
|
metadata:
|
|
labels:
|
|
{{- include "wiki.selectorLabels" . | nindent 8 }}
|
|
spec:
|
|
{{- with .Values.imagePullSecrets }}
|
|
imagePullSecrets:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
serviceAccountName: {{ include "wiki.serviceAccountName" . }}
|
|
securityContext:
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
containers:
|
|
- name: {{ .Chart.Name }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
image: "{{ .Values.image.repository }}:{{ default "latest" .Values.image.tag }}"
|
|
imagePullPolicy: {{ default "IfNotPresent" .Values.image.imagePullPolicy }}
|
|
env:
|
|
- name: DB_TYPE
|
|
value: postgres
|
|
- name: DB_HOST
|
|
value: {{ template "wiki.postgresql.host" . }}
|
|
- name: DB_PORT
|
|
value: "{{ default "5432" .Values.postgresql.postgresqlPort }}"
|
|
- name: DB_NAME
|
|
value: {{ default "wiki" .Values.postgresql.postgresqlDatabase }}
|
|
- name: DB_USER
|
|
value: {{ default "wiki" .Values.postgresql.postgresqlUser }}
|
|
- name: DB_PASS
|
|
valueFrom:
|
|
secretKeyRef:
|
|
{{- if .Values.postgresql.existingSecret }}
|
|
name: {{ .Values.postgresql.existingSecret }}
|
|
{{- else }}
|
|
name: {{ template "wiki.postgresql.secret" . }}
|
|
{{- end }}
|
|
key: {{ template "wiki.postgresql.secretKey" . }}
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: http
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /healthz
|
|
port: http
|
|
resources:
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
|
{{- with .Values.nodeSelector }}
|
|
nodeSelector:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.affinity }}
|
|
affinity:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|
|
{{- with .Values.tolerations }}
|
|
tolerations:
|
|
{{- toYaml . | nindent 8 }}
|
|
{{- end }}
|