From a3f979630539063853133bcce37f13dabba9d9c8 Mon Sep 17 00:00:00 2001 From: Andres Morey Date: Thu, 26 Aug 2021 16:26:21 +0300 Subject: [PATCH] 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