Skip to content

Commit 2569406

Browse files
committed
chore(charts): add diagnostic mode
1 parent b616188 commit 2569406

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

charts/redis/templates/redis-statefulset.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,15 @@ spec:
3636
memory: {{.Values.limitsMemory}}
3737
{{- end}}
3838
{{- end}}
39+
{{- if .Values.diagnosticMode.enabled }}
40+
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 10 }}
41+
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 10 }}
42+
{{- else }}
3943
args:
4044
- "/bin/boot"
4145
- "--port"
4246
- "6379"
47+
{{- end }}
4348
ports:
4449
- containerPort: 6379
4550
env:

charts/redis/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
# limitsCpu: "100m"
66
# limitsMemory: "50Mi"
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
nodeAffinityPreset:
924
key: "drycc.cc/node"
1025
type: "soft"

0 commit comments

Comments
 (0)