fix: make probes configurable

This commit is contained in:
2024-09-24 17:59:46 +02:00
parent 3316c53142
commit 8b9c92b6c7
2 changed files with 50 additions and 40 deletions

View File

@ -22,20 +22,21 @@ spec:
labels:
{{- include "drone.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
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 }}
{{- with .Values.livenessProbe }}
livenessProbe:
httpGet:
scheme: HTTP
path: /healthz
port: http
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: 80
@ -43,14 +44,15 @@ spec:
- name: https
containerPort: 443
protocol: TCP
{{- with .Values.readinessProbe }}
readinessProbe:
httpGet:
scheme: HTTP
path: /healthz
port: http
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3" }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
volumeMounts:
- name: data
mountPath: {{ default "/data/database.sqlite" .Values.config.DRONE_DATABASE_DATASOURCE | dir }}
@ -63,10 +65,6 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}