README.md 7.69 KB
Newer Older
1
2
# Kured (KUbernetes REboot Daemon)

Christian Kotzbauer's avatar
Christian Kotzbauer committed
3
4
## Introduction
This chart installs the "Kubernetes Reboot Daemon" using the Helm Package Manager.
5

Christian Kotzbauer's avatar
Christian Kotzbauer committed
6
7
## Prerequisites
- Kubernetes 1.9+
8

Christian Kotzbauer's avatar
Christian Kotzbauer committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Installing the Chart
To install the chart with the release name `my-release`:
```bash
$ helm repo add kured https://weaveworks.github.io/kured
$ helm install my-release kured/kured
```

## Uninstalling the Chart
To uninstall/delete the `my-release` deployment:
```bash
$ helm delete my-release
```

The command removes all the Kubernetes components associated with the chart and deletes the release.


## Migrate from stable Helm-Chart
The following changes have been made compared to the stable chart:
- **[BREAKING CHANGE]** The `autolock` feature was removed. Use `configuration.startTime` and `configuration.endTime` instead.
- Role inconsistencies have been fixed (allowed verbs for modifying the `DaemonSet`, apiGroup of `PodSecurityPolicy`)
- Added support for affinities.
- Configuration of cli-flags can be made through a `configuration` object.
- Added optional `Service` and `ServiceMonitor` support for metrics endpoint.
32
33


Christian Kotzbauer's avatar
Christian Kotzbauer committed
34
35
## Configuration

36
37
38
| Config                  | Description                                                                 | Default                    |
| ------                  | -----------                                                                 | -------                    |
| `image.repository`      | Image repository                                                            | `weaveworks/kured` |
39
| `image.tag`             | Image tag                                                                   | `1.6.1`                    |
40
41
| `image.pullPolicy`      | Image pull policy                                                           | `IfNotPresent`             |
| `image.pullSecrets`     | Image pull secrets                                                          | `[]`                       |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
42
| `updateStrategy`        | Daemonset update strategy                                                   | `OnDelete`                 |
43
| `maxUnavailable`        | The max pods unavailable during a rolling update                            | `1`                        |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
44
| `podAnnotations`        | Annotations to apply to pods (eg to add Prometheus annotations)             | `{}`                       |
45
| `extraArgs`             | Extra arguments to pass to `/usr/bin/kured`. See below.                     | `{}`                       |
audunsolemdal's avatar
audunsolemdal committed
46
| `extraEnvVars`          | Array of environment variables to pass to the daemonset.                    | `{}`                       |
47
| `configuration.lockTtl` | cli-parameter `--lock-ttl`                                                  | `0`                       |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
48
| `configuration.alertFilterRegexp` | cli-parameter `--alert-filter-regexp`                             | `""`                       |
49
| `configuration.blockingPodSelector` | Array of selectors for multiple cli-parameters `--blocking-pod-selector` | `[]`             |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
50
51
52
53
| `configuration.endTime` | cli-parameter `--end-time`                                                  | `""`                      |
| `configuration.lockAnnotation` | cli-parameter `--lock-annotation`                                    | `""`                      |
| `configuration.period` | cli-parameter `--period`                                                     | `""`                      |
| `configuration.prometheusUrl` | cli-parameter `--prometheus-url`                                      | `""`                      |
54
| `configuration.rebootDays` | Array of days for multiple cli-parameters `--reboot-days`                | `[]`                      |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
55
56
57
58
| `configuration.rebootSentinel` | cli-parameter `--reboot-sentinel`                                    | `""`                      |
| `configuration.slackChannel` | cli-parameter `--slack-channel`                                        | `""`                      |
| `configuration.slackHookUrl` | cli-parameter `--slack-hook-url`                                       | `""`                      |
| `configuration.slackUsername` | cli-parameter `--slack-username`                                      | `""`                      |
59
60
| `configuration.messageTemplateDrain` | cli-parameter `--message-template-drain`                       | `""`                      |
| `configuration.messageTemplateReboot` | cli-parameter `--message-template-reboot`                     | `""`                      |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
61
62
| `configuration.startTime` | cli-parameter `--start-time`                                              | `""`                      |
| `configuration.timeZone` | cli-parameter `--time-zone`                                                | `""`                      |
63
| `rbac.create`           | Create RBAC roles                                                           | `true`                     |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
64
| `serviceAccount.create` | Create a service account                                                    | `true`                     |
65
| `serviceAccount.name`   | Service account name to create (or use if `serviceAccount.create` is false) | (chart fullname)           |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
66
67
| `podSecurityPolicy.create` | Create podSecurityPolicy                                                 | `false`                     |
| `resources`             | Resources requests and limits.                                              | `{}`                       |
68
69
70
71
72
73
| `metrics.create`        | Create a ServiceMonitor for prometheus-operator                             | `false`                    |
| `metrics.namespace`     | The namespace to create the ServiceMonitor in                               | `""`                    |
| `metrics.labels`        | Additional labels for the ServiceMonitor                                    | `{}`                    |
| `metrics.interval`      | Interval prometheus should scrape the endpoint                              | `60s`                   |
| `metrics.scrapeTimeout` | A custom scrapeTimeout for prometheus                                       | `""`                    |
| `service.create`        | Create a Service for the metrics endpoint                                   | `false`                    |
74
| `service.name  `        | Service name for the metrics endpoint                                       | `""`                       |
75
| `service.port`          | Port of the service to expose                                               | `8080`                     |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
76
| `service.annotations`   | Annotations to apply to the service (eg to add Prometheus annotations)      | `{}`                       |
Christian Kotzbauer's avatar
Christian Kotzbauer committed
77
| `priorityClassName`     | Priority Class to be used by the pods                                       | `""`                       |
78
| `tolerations`           | Tolerations to apply to the daemonset (eg to allow running on master)       | `[{"key": "node-role.kubernetes.io/master", "effect": "NoSchedule"}]`|
Christian Kotzbauer's avatar
Christian Kotzbauer committed
79
| `affinity`              | Affinity for the daemonset (ie, restrict which nodes kured runs on)         | `{}`                       |
80
81
| `nodeSelector`          | Node Selector for the daemonset (ie, restrict which nodes kured runs on)    | `{}`                       |

Christian Kotzbauer's avatar
Christian Kotzbauer committed
82
See https://github.com/weaveworks/kured#configuration for values (not contained in the `configuration` object) for `extraArgs`. Note that
83
84
85
86
87
88
89
```yaml
extraArgs:
  foo: 1
  bar-baz: 2
```
becomes `/usr/bin/kured ... --foo=1 --bar-baz=2`.

Christian Kotzbauer's avatar
Christian Kotzbauer committed
90

91
92
## Prometheus Metrics

93
Kured exposes a single prometheus metric indicating whether a reboot is required or not (see [kured docs](https://github.com/weaveworks/kured#prometheus-metrics)) for details.
Christian Kotzbauer's avatar
Christian Kotzbauer committed
94
95
96
97
98
99
100
101
102

#### Prometheus-Operator

```yaml
metrics:
  create: true
```

#### Prometheus Annotations
103
104

```yaml
105
106
107
108
109
service:
  annotations:
    prometheus.io/scrape: "true"
    prometheus.io/path: "/metrics"
    prometheus.io/port: "8080"
110
```