Skip to content

Commit 3e7ffd3

Browse files
committed
chore(charts): add diagnostic mode
1 parent cb2addb commit 3e7ffd3

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

charts/builder/templates/builder-deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,18 @@ spec:
4242
- name: drycc-builder
4343
image: {{.Values.imageRegistry}}/{{.Values.imageOrg}}/builder:{{.Values.imageTag}}
4444
imagePullPolicy: {{.Values.imagePullPolicy}}
45+
{{- if .Values.diagnosticMode.enabled }}
46+
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 10 }}
47+
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 10 }}
48+
{{- end }}
4549
ports:
4650
- containerPort: 2223
4751
name: ssh
4852
- containerPort: 8092
4953
name: healthsrv
5054
{{- include "builder.envs" . | indent 8 }}
5155
{{- include "builder.limits" . | indent 8 }}
56+
{{- if not .Values.diagnosticMode.enabled }}
5257
livenessProbe:
5358
httpGet:
5459
path: /healthz
@@ -61,6 +66,7 @@ spec:
6166
port: 8092
6267
initialDelaySeconds: 30
6368
timeoutSeconds: 1
69+
{{- end }}
6470
volumeMounts:
6571
- name: builder-key-auth
6672
mountPath: /var/run/secrets/api/auth

charts/builder/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ imageRegistry: "registry.drycc.cc"
55

66
replicas: 1
77

8+
## Enable diagnostic mode
9+
##
10+
diagnosticMode:
11+
## @param diagnosticMode.enabled Enable diagnostic mode (all probes will be disabled and the command will be overridden)
12+
##
13+
enabled: false
14+
## @param diagnosticMode.command Command to override all containers
15+
##
16+
command:
17+
- sleep
18+
## @param diagnosticMode.args Args to override all containers
19+
##
20+
args:
21+
- infinity
22+
823
service:
924
# Provide any additional service annotations
1025
annotations: {}

0 commit comments

Comments
 (0)