Skip to content

Commit

Permalink
Fix podLabels and chaoskube.metrics.port, add ability to unset args
Browse files Browse the repository at this point in the history
  • Loading branch information
multimac committed Jul 3, 2021
1 parent ea64e94 commit f9070af
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
11 changes: 6 additions & 5 deletions chart/chaoskube/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ spec:
{{- end }}
labels:
{{- include "chaoskube.selectorLabels" . | nindent 8 }}
{{- with .Values.podAnnotations }}
{{- toYaml . | indent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
{{- with .Values.image.pullSecrets }}
Expand All @@ -43,14 +43,15 @@ spec:
{{- end }}
args:
{{- range $key, $value := .Values.chaoskube.args }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
{{- end }}
{{- range $key, $value := .Values.chaoskube.flags }}
{{- if $value }}
- --{{ $key }}
{{- end }}
{{- end }}
{{- if .Values.chaoskube.metrics.enabled }}
- --metrics-address={{ .Values.chaoskube.metrics.port }}
- --metrics-address=:{{ .Values.chaoskube.metrics.port }}
{{- end }}
{{- if .Values.chaoskube.metrics.enabled }}
ports:
Expand Down
9 changes: 7 additions & 2 deletions chart/chaoskube/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ image:
chaoskube:
env: {}

flags:
# terminate pods for real: this disables dry-run mode which is on by default
no-dry-run: true

args:
# kill a pod every 10 minutes
interval: "10m"
Expand All @@ -39,8 +43,9 @@ chaoskube:
timezone: "UTC"
# exclude all pods that haven't been running for at least one hour
minimum-age: "1h"
# terminate pods for real: this disables dry-run mode which is on by default
no-dry-run: ""
# sets the annotation prefix to use when looking for configuration overrides in pod annotations
# eg. termination frequency will look for the annotation "chaos.alpha.kubernetes.io/frequency"
config-annotation-prefix: "chaos.alpha.kubernetes.io"

metrics:
enabled: true
Expand Down

0 comments on commit f9070af

Please sign in to comment.