2021-07-21 20:17:38 +00:00
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: {{ include "drone.fullname" . }}
|
|
|
|
labels:
|
|
|
|
{{- include "drone.labels" . | nindent 4 }}
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
{{- include "drone.selectorLabels" . | nindent 6 }}
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
{{- with .Values.podAnnotations }}
|
|
|
|
annotations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
labels:
|
|
|
|
{{- include "drone.selectorLabels" . | nindent 8 }}
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: {{ .Chart.Name }}
|
|
|
|
envFrom:
|
|
|
|
- secretRef:
|
|
|
|
name: {{ include "drone.fullname" . }}
|
|
|
|
securityContext:
|
|
|
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
|
|
|
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
|
|
|
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
2022-04-21 21:13:14 +00:00
|
|
|
livenessProbe:
|
|
|
|
httpGet:
|
2022-05-16 18:38:45 +00:00
|
|
|
scheme: HTTP
|
2022-04-21 21:13:14 +00:00
|
|
|
path: /healthz
|
2022-05-16 18:38:45 +00:00
|
|
|
port: http
|
2021-07-21 20:17:38 +00:00
|
|
|
ports:
|
2022-04-21 20:37:56 +00:00
|
|
|
- name: http
|
|
|
|
containerPort: 80
|
|
|
|
protocol: TCP
|
|
|
|
- name: https
|
|
|
|
containerPort: 443
|
|
|
|
protocol: TCP
|
2022-04-21 21:13:14 +00:00
|
|
|
readinessProbe:
|
|
|
|
httpGet:
|
2022-05-16 18:38:45 +00:00
|
|
|
scheme: HTTP
|
2022-04-21 21:13:14 +00:00
|
|
|
path: /healthz
|
2022-05-16 18:38:45 +00:00
|
|
|
port: http
|
2021-08-08 10:18:57 +00:00
|
|
|
resources:
|
|
|
|
{{- toYaml .Values.resources | nindent 12 }}
|
2021-08-08 20:29:21 +00:00
|
|
|
{{- if .Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3" }}
|
2021-08-08 17:39:12 +00:00
|
|
|
volumeMounts:
|
|
|
|
- name: data
|
|
|
|
mountPath: {{ default "/data/database.sqlite" .Values.config.DRONE_DATABASE_DATASOURCE | dir }}
|
2022-04-21 20:37:56 +00:00
|
|
|
{{- with .Values.extraVolumeMounts }}
|
|
|
|
{{- toYaml . | nindent 10 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- else }}
|
|
|
|
{{- with .Values.extraVolumeMounts }}
|
|
|
|
volumeMounts:
|
|
|
|
{{- toYaml . | nindent 10 }}
|
|
|
|
{{- end }}
|
2021-08-08 17:39:12 +00:00
|
|
|
{{- end }}
|
2021-09-26 14:43:43 +00:00
|
|
|
{{- with .Values.affinity }}
|
|
|
|
affinity:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.imagePullSecrets }}
|
|
|
|
imagePullSecrets:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- with .Values.nodeSelector }}
|
|
|
|
nodeSelector:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2022-04-18 08:44:20 +00:00
|
|
|
{{- if .Values.podPriorityClassName }}
|
|
|
|
priorityClassName: {{ .Values.podPriorityClassName }}
|
|
|
|
{{- end }}
|
2021-09-26 14:43:43 +00:00
|
|
|
securityContext:
|
|
|
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
|
|
|
serviceAccountName: {{ include "drone.fullname" . }}
|
|
|
|
{{- with .Values.tolerations }}
|
|
|
|
tolerations:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2021-08-08 20:29:21 +00:00
|
|
|
{{- if and (.Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3") .Values.persistence.existingClaim }}
|
2021-08-08 17:39:12 +00:00
|
|
|
volumes:
|
|
|
|
- name: data
|
|
|
|
persistentVolumeClaim:
|
|
|
|
{{- with .Values.persistence.existingClaim }}
|
|
|
|
claimName: {{ tpl . $ }}
|
|
|
|
{{- end }}
|
2022-04-21 20:37:56 +00:00
|
|
|
{{- with .Values.extraVolumes }}
|
|
|
|
{{- toYaml . | nindent 6 }}
|
|
|
|
{{- end }}
|
2021-08-08 17:39:12 +00:00
|
|
|
{{- else if and (.Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3") (not .Values.persistence.existingClaim) }}
|
|
|
|
volumes:
|
|
|
|
- name: data
|
|
|
|
persistentVolumeClaim:
|
2021-09-26 14:48:26 +00:00
|
|
|
claimName: {{ include "drone.fullname" . }}
|
2022-04-21 20:37:56 +00:00
|
|
|
{{- with .Values.extraVolumes }}
|
|
|
|
{{- toYaml . | nindent 6 }}
|
|
|
|
{{- end }}
|
|
|
|
{{- else }}
|
|
|
|
{{- with .Values.extraVolumes }}
|
|
|
|
volumes:
|
|
|
|
{{- toYaml . | nindent 8 }}
|
|
|
|
{{- end }}
|
2021-07-21 20:17:38 +00:00
|
|
|
{{- end }}
|