diff --git a/README.md b/README.md index 4f51411..32ffba0 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ Flags: --prometheus-url string Prometheus instance to probe for active alerts --reboot-command string command to run when a reboot is required by the sentinel (default "/sbin/systemctl reboot") --reboot-days strings schedule reboot on these days (default [su,mo,tu,we,th,fr,sa]) + --reboot-delay duration add a delay after drain finishes but before the reboot command is issued (default 0, no time) --reboot-sentinel string path to file whose existence signals need to reboot (default "/var/run/reboot-required") --reboot-sentinel-command string command for which a successful run signals need to reboot (default ""). If non-empty, sentinel file will be ignored. --slack-channel string slack channel for reboot notfications diff --git a/charts/kured/Chart.yaml b/charts/kured/Chart.yaml index 7a564a5..dd66829 100644 --- a/charts/kured/Chart.yaml +++ b/charts/kured/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 -appVersion: "1.7.0" +appVersion: "1.8.0" description: A Helm chart for kured name: kured -version: 2.9.1 +version: 2.10.0 home: https://github.com/weaveworks/kured maintainers: - name: ckotzbauer diff --git a/charts/kured/README.md b/charts/kured/README.md index c66d378..a88a4a8 100644 --- a/charts/kured/README.md +++ b/charts/kured/README.md @@ -47,6 +47,7 @@ The following changes have been made compared to the stable chart: | `configuration.lockTtl` | cli-parameter `--lock-ttl` | `0` | | `configuration.lockReleaseDelay` | cli-parameter `--lock-release-delay` | `0` | | `configuration.alertFilterRegexp` | cli-parameter `--alert-filter-regexp` | `""` | +| `configuration.alertFiringOnly` | cli-parameter `--alert-firing-only` | `false` | | `configuration.blockingPodSelector` | Array of selectors for multiple cli-parameters `--blocking-pod-selector` | `[]` | | `configuration.endTime` | cli-parameter `--end-time` | `""` | | `configuration.lockAnnotation` | cli-parameter `--lock-annotation` | `""` | @@ -58,7 +59,9 @@ The following changes have been made compared to the stable chart: | `configuration.prometheusUrl` | cli-parameter `--prometheus-url` | `""` | | `configuration.rebootDays` | Array of days for multiple cli-parameters `--reboot-days` | `[]` | | `configuration.rebootSentinel` | cli-parameter `--reboot-sentinel` | `""` | +| `configuration.rebootSentinelCommand` | cli-parameter `--reboot-sentinel-command` | `""` | | `configuration.rebootCommand` | cli-parameter `--reboot-command` | `""` | +| `configuration.rebootDelay` | cli-parameter `--reboot-delay` | `""` | | `configuration.slackChannel` | cli-parameter `--slack-channel` | `""` | | `configuration.slackHookUrl` | cli-parameter `--slack-hook-url` | `""` | | `configuration.slackUsername` | cli-parameter `--slack-username` | `""` | @@ -68,6 +71,7 @@ The following changes have been made compared to the stable chart: | `configuration.startTime` | cli-parameter `--start-time` | `""` | | `configuration.timeZone` | cli-parameter `--time-zone` | `""` | | `configuration.annotateNodes` | cli-parameter `--annotate-nodes` | `false` | +| `configuration.preferNoScheduleTaint` | Taint name applied during pending node reboot | `""` | | `rbac.create` | Create RBAC roles | `true` | | `serviceAccount.create` | Create a service account | `true` | | `serviceAccount.name` | Service account name to create (or use if `serviceAccount.create` is false) | (chart fullname) | diff --git a/charts/kured/templates/daemonset.yaml b/charts/kured/templates/daemonset.yaml index 3a76111..00c12a4 100644 --- a/charts/kured/templates/daemonset.yaml +++ b/charts/kured/templates/daemonset.yaml @@ -61,6 +61,9 @@ spec: {{- if .Values.configuration.alertFilterRegexp }} - --alert-filter-regexp={{ .Values.configuration.alertFilterRegexp }} {{- end }} + {{- if .Values.configuration.alertFiringOnly }} + - --alert-firing-only={{ .Values.configuration.alertFiringOnly }} + {{- end }} {{- range .Values.configuration.blockingPodSelector }} - --blocking-pod-selector={{ . }} {{- end }} @@ -74,7 +77,7 @@ spec: - --period={{ .Values.configuration.period }} {{- end }} {{- if .Values.configuration.forceReboot }} - - --force-reboot + - --force-reboot {{- end }} {{- if .Values.configuration.drainGracePeriod }} - --drain-grace-period={{ .Values.configuration.drainGracePeriod }} @@ -94,9 +97,15 @@ spec: {{- if .Values.configuration.rebootSentinel }} - --reboot-sentinel={{ .Values.configuration.rebootSentinel }} {{- end }} + {{- if .Values.configuration.rebootSentinelCommand }} + - --reboot-sentinel-command={{ .Values.configuration.rebootSentinelCommand }} + {{- end }} {{- if .Values.configuration.rebootCommand }} - --reboot-command={{ .Values.configuration.rebootCommand }} {{- end }} + {{- if .Values.configuration.rebootDelay }} + - --reboot-delay={{ .Values.configuration.rebootDelay }} + {{- end }} {{- if .Values.configuration.slackChannel }} - --slack-channel={{ .Values.configuration.slackChannel }} {{- end }} @@ -124,6 +133,9 @@ spec: {{- if .Values.configuration.annotateNodes }} - --annotate-nodes={{ .Values.configuration.annotateNodes }} {{- end }} + {{- if .Values.configuration.preferNoScheduleTaint }} + - --prefer-no-schedule-taint={{ .Values.configuration.preferNoScheduleTaint }} + {{- end }} {{- range $key, $value := .Values.extraArgs }} {{- if $value }} - --{{ $key }}={{ $value }} diff --git a/charts/kured/values.minikube.yaml b/charts/kured/values.minikube.yaml index 08efea6..b06d9f7 100644 --- a/charts/kured/values.minikube.yaml +++ b/charts/kured/values.minikube.yaml @@ -5,6 +5,7 @@ image: configuration: # annotationTtl: 0 # force clean annotation after this amount of time (default 0, disabled) # alertFilterRegexp: "" # alert names to ignore when checking for active alerts + # alertFiringOnly: false # only consider firing alerts when checking for active alerts # blockingPodSelector: [] # label selector identifying pods whose presence should prevent reboots # endTime: "" # only reboot before this time of day (default "23:59") # lockAnnotation: "" # annotation in which to record locking node (default "weave.works/kured-node-lock") @@ -16,6 +17,7 @@ configuration: # prometheusUrl: "" # Prometheus instance to probe for active alerts # rebootDays: [] # only reboot on these days (default [su,mo,tu,we,th,fr,sa]) # rebootSentinel: "" # path to file whose existence signals need to reboot (default "/var/run/reboot-required") + # rebootSentinelCommand: "" # command for which a successful run signals need to reboot (default ""). If non-empty, sentinel file will be ignored. # slackChannel: "" # slack channel for reboot notfications # slackHookUrl: "" # slack hook URL for reboot notfications # slackUsername: "" # slack username for reboot notfications (default "kured") diff --git a/charts/kured/values.yaml b/charts/kured/values.yaml index 7800dd4..5bdc91b 100644 --- a/charts/kured/values.yaml +++ b/charts/kured/values.yaml @@ -24,6 +24,7 @@ extraEnvVars: configuration: lockTtl: 0 # force clean annotation after this amount of time (default 0, disabled) alertFilterRegexp: "" # alert names to ignore when checking for active alerts + alertFiringOnly: false # only consider firing alerts when checking for active alerts blockingPodSelector: [] # label selector identifying pods whose presence should prevent reboots endTime: "" # only reboot before this time of day (default "23:59") lockAnnotation: "" # annotation in which to record locking node (default "weave.works/kured-node-lock") @@ -35,7 +36,9 @@ configuration: prometheusUrl: "" # Prometheus instance to probe for active alerts rebootDays: [] # only reboot on these days (default [su,mo,tu,we,th,fr,sa]) rebootSentinel: "" # path to file whose existence signals need to reboot (default "/var/run/reboot-required") + rebootSentinelCommand: "" # command for which a successful run signals need to reboot (default ""). If non-empty, sentinel file will be ignored. rebootCommand: "/bin/systemctl reboot" # command to run when a reboot is required by the sentinel + rebootDelay: "" # add a delay after drain finishes but before the reboot command is issued slackChannel: "" # slack channel for reboot notfications slackHookUrl: "" # slack hook URL for reboot notfications slackUsername: "" # slack username for reboot notfications (default "kured") @@ -46,6 +49,7 @@ configuration: timeZone: "" # time-zone to use (valid zones from "time" golang package) annotateNodes: false # enable 'weave.works/kured-reboot-in-progress' and 'weave.works/kured-most-recent-reboot-needed' node annotations to signify kured reboot operations lockReleaseDelay: 0 # hold lock after reboot by this amount of time (default 0, disabled) + preferNoScheduleTaint: "" # Taint name applied during pending node reboot (to prevent receiving additional pods from other rebooting nodes). Disabled by default. Set e.g. to "weave.works/kured-node-reboot" to enable tainting. rbac: create: true diff --git a/kured-ds.yaml b/kured-ds.yaml index 8acad86..26ee61e 100644 --- a/kured-ds.yaml +++ b/kured-ds.yaml @@ -69,6 +69,7 @@ spec: # - --blocking-pod-selector=name=temperamental # - --blocking-pod-selector=... # - --reboot-days=sun,mon,tue,wed,thu,fri,sat +# - --reboot-delay=90s # - --start-time=0:00 # - --end-time=23:59:59 # - --time-zone=UTC