From afac9d435a3a47ede6240a25f6f16714acf9c2e1 Mon Sep 17 00:00:00 2001 From: Matt Jeanes Date: Tue, 27 Jul 2021 11:27:08 +0100 Subject: [PATCH 1/6] Add --alert-firing-only parameter to chart --- charts/kured/Chart.yaml | 2 +- charts/kured/README.md | 1 + charts/kured/templates/daemonset.yaml | 3 +++ charts/kured/values.minikube.yaml | 1 + charts/kured/values.yaml | 1 + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/charts/kured/Chart.yaml b/charts/kured/Chart.yaml index 3ba0104..3817390 100644 --- a/charts/kured/Chart.yaml +++ b/charts/kured/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.7.0" description: A Helm chart for kured name: kured -version: 2.8.0 +version: 2.9.0 home: https://github.com/weaveworks/kured maintainers: - name: ckotzbauer diff --git a/charts/kured/README.md b/charts/kured/README.md index 88b5734..4cf278d 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` | `""` | diff --git a/charts/kured/templates/daemonset.yaml b/charts/kured/templates/daemonset.yaml index 1a485f9..dfe87ba 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 }} diff --git a/charts/kured/values.minikube.yaml b/charts/kured/values.minikube.yaml index 2c7fcac..b9d195a 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 ammount 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") diff --git a/charts/kured/values.yaml b/charts/kured/values.yaml index df07310..7ad5199 100644 --- a/charts/kured/values.yaml +++ b/charts/kured/values.yaml @@ -24,6 +24,7 @@ extraEnvVars: configuration: lockTtl: 0 # force clean annotation after this ammount 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") From a3f979630539063853133bcce37f13dabba9d9c8 Mon Sep 17 00:00:00 2001 From: Andres Morey Date: Thu, 26 Aug 2021 16:26:21 +0300 Subject: [PATCH 2/6] Add reboot-delay CLI argument to docs, manifests and helm charts --- README.md | 1 + charts/kured/Chart.yaml | 2 +- charts/kured/README.md | 1 + charts/kured/templates/daemonset.yaml | 3 +++ charts/kured/values.yaml | 1 + kured-ds.yaml | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66b3c2e..41bbb25 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,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 3817390..ab0f967 100644 --- a/charts/kured/Chart.yaml +++ b/charts/kured/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.7.0" description: A Helm chart for kured name: kured -version: 2.9.0 +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 ea44db5..94f3178 100644 --- a/charts/kured/README.md +++ b/charts/kured/README.md @@ -55,6 +55,7 @@ The following changes have been made compared to the stable chart: | `configuration.rebootDays` | Array of days for multiple cli-parameters `--reboot-days` | `[]` | | `configuration.rebootSentinel` | cli-parameter `--reboot-sentinel` | `""` | | `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` | `""` | diff --git a/charts/kured/templates/daemonset.yaml b/charts/kured/templates/daemonset.yaml index 1a485f9..073bd2c 100644 --- a/charts/kured/templates/daemonset.yaml +++ b/charts/kured/templates/daemonset.yaml @@ -85,6 +85,9 @@ spec: {{- 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 }} diff --git a/charts/kured/values.yaml b/charts/kured/values.yaml index 3a10785..b53a6bd 100644 --- a/charts/kured/values.yaml +++ b/charts/kured/values.yaml @@ -32,6 +32,7 @@ configuration: 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") 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") 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 From 164183e1bc014a9f64a15a55602bd57e934a4ef3 Mon Sep 17 00:00:00 2001 From: Christian Kotzbauer Date: Fri, 8 Oct 2021 14:53:12 +0200 Subject: [PATCH 3/6] fix: correct indent ref: #447 Signed-off-by: Christian Kotzbauer --- charts/kured/templates/daemonset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/kured/templates/daemonset.yaml b/charts/kured/templates/daemonset.yaml index 2de3d57..9abe7f4 100644 --- a/charts/kured/templates/daemonset.yaml +++ b/charts/kured/templates/daemonset.yaml @@ -77,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 }} From fa28b550b2355a5c097a06ae2d562fa072414da4 Mon Sep 17 00:00:00 2001 From: Christian Kotzbauer Date: Fri, 8 Oct 2021 14:56:30 +0200 Subject: [PATCH 4/6] feat: add reboot-sentinel-command to helm-chart Signed-off-by: Christian Kotzbauer --- charts/kured/README.md | 1 + charts/kured/templates/daemonset.yaml | 3 +++ charts/kured/values.minikube.yaml | 1 + charts/kured/values.yaml | 1 + 4 files changed, 6 insertions(+) diff --git a/charts/kured/README.md b/charts/kured/README.md index d660930..954e3b2 100644 --- a/charts/kured/README.md +++ b/charts/kured/README.md @@ -59,6 +59,7 @@ 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` | `""` | diff --git a/charts/kured/templates/daemonset.yaml b/charts/kured/templates/daemonset.yaml index 9abe7f4..7554464 100644 --- a/charts/kured/templates/daemonset.yaml +++ b/charts/kured/templates/daemonset.yaml @@ -97,6 +97,9 @@ 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 }} diff --git a/charts/kured/values.minikube.yaml b/charts/kured/values.minikube.yaml index ce676b1..b06d9f7 100644 --- a/charts/kured/values.minikube.yaml +++ b/charts/kured/values.minikube.yaml @@ -17,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 f402137..10ed5cb 100644 --- a/charts/kured/values.yaml +++ b/charts/kured/values.yaml @@ -36,6 +36,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. 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 From 938cbd428c68bdac75f2a76fb600ece114ffb31f Mon Sep 17 00:00:00 2001 From: Christian Kotzbauer Date: Fri, 8 Oct 2021 15:05:18 +0200 Subject: [PATCH 5/6] feat: add also missing prefer-no-schedule-taint Signed-off-by: Christian Kotzbauer --- charts/kured/README.md | 1 + charts/kured/templates/daemonset.yaml | 3 +++ charts/kured/values.yaml | 1 + 3 files changed, 5 insertions(+) diff --git a/charts/kured/README.md b/charts/kured/README.md index 954e3b2..a88a4a8 100644 --- a/charts/kured/README.md +++ b/charts/kured/README.md @@ -71,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 7554464..00c12a4 100644 --- a/charts/kured/templates/daemonset.yaml +++ b/charts/kured/templates/daemonset.yaml @@ -133,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.yaml b/charts/kured/values.yaml index 10ed5cb..5bdc91b 100644 --- a/charts/kured/values.yaml +++ b/charts/kured/values.yaml @@ -49,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 From 8a3f486ad9b693ddf84d27053879bfd3683b2f37 Mon Sep 17 00:00:00 2001 From: Christian Kotzbauer Date: Fri, 8 Oct 2021 15:40:57 +0200 Subject: [PATCH 6/6] feat: update to 1.8.0 Signed-off-by: Christian Kotzbauer --- charts/kured/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/kured/Chart.yaml b/charts/kured/Chart.yaml index ab0f967..dd66829 100644 --- a/charts/kured/Chart.yaml +++ b/charts/kured/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -appVersion: "1.7.0" +appVersion: "1.8.0" description: A Helm chart for kured name: kured version: 2.10.0