Skip to content

Commit

Permalink
fix: review improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Kotzbauer <[email protected]>
  • Loading branch information
ckotzbauer committed Aug 12, 2023
1 parent 17b6d6c commit 72961b3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion charts/kured/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The following changes have been made compared to the stable chart:
| `extraArgs` | Extra arguments to pass to `/usr/bin/kured`. See below. | `{}` |
| `extraEnvVars` | Array of environment variables to pass to the daemonset. | `{}` |
| `metricsPort` | Port to expose the metrics endpoint. | `8080` |
| `configuration.useRebootSentinelHostPath` | Not actually a flag, indicates if the sentinel should be mounted | `true` |
| `useRebootSentinelHostPath` | Controls whether the chart uses a hostPath to read the sentinel file. | `true` |
| `configuration.lockTtl` | cli-parameter `--lock-ttl` | `0` |
| `configuration.lockReleaseDelay` | cli-parameter `--lock-release-delay` | `0` |
| `configuration.alertFilterRegexp` | cli-parameter `--alert-filter-regexp` | `""` |
Expand Down
13 changes: 7 additions & 6 deletions charts/kured/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ spec:
- --post-reboot-node-labels={{ . }}
{{- end }}
{{- if .Values.configuration.rebootSentinel }}
{{- if .Values.configuration.useRebootSentinelHostPath }}
{{- if .Values.useRebootSentinelHostPath }}
- --reboot-sentinel=/sentinel/{{ base .Values.configuration.rebootSentinel }}
{{ else }}
- --reboot-sentinel={{ .Values.configuration.rebootSentinel }}
{{- end }}
{{- end }}
{{- if and .Values.configuration.rebootSentinelCommand (not .Values.configuration.useRebootSentinelHostPath) }}
{{- if and .Values.configuration.rebootSentinelCommand (not .Values.useRebootSentinelHostPath) }}
- --reboot-sentinel-command={{ .Values.configuration.rebootSentinelCommand }}
{{- end }}
{{- if .Values.configuration.rebootCommand }}
Expand Down Expand Up @@ -176,10 +176,10 @@ spec:
- --{{ $key }}
{{- end }}
{{- end }}
{{- if or .Values.volumeMounts .Values.configuration.useRebootSentinelHostPath }}
{{- if or .Values.volumeMounts .Values.useRebootSentinelHostPath }}
volumeMounts:
{{- end }}
{{- if .Values.configuration.useRebootSentinelHostPath }}
{{- if .Values.useRebootSentinelHostPath }}
- mountPath: /sentinel
name: sentinel
readOnly: true
Expand Down Expand Up @@ -225,13 +225,14 @@ spec:
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- if or .Values.volumes .Values.configuration.useRebootSentinelHostPath }}
{{- if or .Values.volumes .Values.useRebootSentinelHostPath }}
volumes:
{{- end }}
{{- if .Values.configuration.useRebootSentinelHostPath }}
{{- if .Values.useRebootSentinelHostPath }}
- name: sentinel
hostPath:
path: {{ dir .Values.configuration.rebootSentinel }}
type: Directory
{{- end }}
{{- if .Values.volumes }}
{{- toYaml .Values.volumes | nindent 8 }}
Expand Down
6 changes: 4 additions & 2 deletions charts/kured/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ extraEnvVars:
# - name: regularEnvVariable
# value: 123

configuration:
useRebootSentinelHostPath: true # not actually a flag, indicates if the sentinel should be mounted

# Controls whether the chart uses a hostPath to read the sentinel file
useRebootSentinelHostPath: true

configuration:
metricsPort: 8080 # port number where metrics will listen
lockTtl: 0 # force clean annotation after this amount of time (default 0, disabled)
alertFilterRegexp: "" # alert names to ignore when checking for active alerts
Expand Down

0 comments on commit 72961b3

Please sign in to comment.