fix: make probes configurable

This commit is contained in:
Markus Pesch 2024-09-24 17:59:46 +02:00
parent 3316c53142
commit 8b9c92b6c7
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982
2 changed files with 50 additions and 40 deletions

View File

@ -22,20 +22,21 @@ spec:
labels: labels:
{{- include "drone.selectorLabels" . | nindent 8 }} {{- include "drone.selectorLabels" . | nindent 8 }}
spec: spec:
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
containers: containers:
- name: {{ .Chart.Name }} - name: {{ .Chart.Name }}
envFrom: envFrom:
- secretRef: - secretRef:
name: {{ include "drone.fullname" . }} name: {{ include "drone.fullname" . }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- with .Values.livenessProbe }}
livenessProbe: livenessProbe:
httpGet: {{- toYaml . | nindent 12 }}
scheme: HTTP {{- end }}
path: /healthz
port: http
ports: ports:
- name: http - name: http
containerPort: 80 containerPort: 80
@ -43,14 +44,15 @@ spec:
- name: https - name: https
containerPort: 443 containerPort: 443
protocol: TCP protocol: TCP
{{- with .Values.readinessProbe }}
readinessProbe: readinessProbe:
httpGet: {{- toYaml . | nindent 12 }}
scheme: HTTP {{- end }}
path: /healthz
port: http
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3" }} {{- if .Values.config.DRONE_DATABASE_DRIVER | default "sqlite3" | eq "sqlite3" }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
volumeMounts: volumeMounts:
- name: data - name: data
mountPath: {{ default "/data/database.sqlite" .Values.config.DRONE_DATABASE_DATASOURCE | dir }} mountPath: {{ default "/data/database.sqlite" .Values.config.DRONE_DATABASE_DATASOURCE | dir }}
@ -63,10 +65,6 @@ spec:
{{- toYaml . | nindent 10 }} {{- toYaml . | nindent 10 }}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.imagePullSecrets }} {{- with .Values.imagePullSecrets }}
imagePullSecrets: imagePullSecrets:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}

View File

@ -23,13 +23,7 @@ podSecurityContext: {}
# is set to sqlite3. # is set to sqlite3.
replicas: 1 replicas: 1
securityContext: {} affinity: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
config: {} config: {}
# DRONE_BITBUCKET_CLIENT_ID # DRONE_BITBUCKET_CLIENT_ID
@ -524,22 +518,6 @@ config: {}
# https://docs.drone.io/server/reference/drone-webhook-skip-verify/ # https://docs.drone.io/server/reference/drone-webhook-skip-verify/
# DRONE_WEBHOOK_SKIP_VERIFY: "" # DRONE_WEBHOOK_SKIP_VERIFY: ""
serviceAccount:
annotations: {}
service:
annotations: {}
# externalIPs: []
# externalTrafficPolicy: "Cluster"
# loadBalancerClass: ""
# loadBalancerIP: ""
# loadBalancerSourceRanges: []
# internalTrafficPolicy: "Cluster"
name: http
targetPort: 80
type: ClusterIP
port: 80
ingress: ingress:
enabled: false enabled: false
className: "nginx" className: "nginx"
@ -557,6 +535,20 @@ ingress:
hosts: hosts:
- "your-hostname" - "your-hostname"
livenessProbe:
httpGet:
scheme: HTTP
path: /healthz
port: http
nodeSelector: {}
readinessProbe:
httpGet:
scheme: HTTP
path: /healthz
port: http
resources: {} resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious # We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little # choice for the user. This also increases chances charts run on environments with little
@ -569,12 +561,32 @@ resources: {}
# cpu: 100m # cpu: 100m
# memory: 128Mi # memory: 128Mi
nodeSelector: {} securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
serviceAccount:
annotations: {}
service:
annotations: {}
# externalIPs: []
# externalTrafficPolicy: "Cluster"
# loadBalancerClass: ""
# loadBalancerIP: ""
# loadBalancerSourceRanges: []
# internalTrafficPolicy: "Cluster"
name: http
targetPort: 80
type: ClusterIP
port: 80
tolerations: [] tolerations: []
affinity: {}
# persistence is only required when config.DATABASE_DRIVER is sqlite3 or # persistence is only required when config.DATABASE_DRIVER is sqlite3 or
# undefined. # undefined.
persistence: persistence: