Compare commits

...

890 Commits

Author SHA1 Message Date
Christian Kotzbauer
0df1059d66 feat: change manifest for 1.14.0 (#820)
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-21 17:56:10 +02:00
Christian Kotzbauer
14d887e9d0 build: confirm cosign prompt
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-19 10:28:28 +02:00
Jack Francis
8bc66c937d fix: don’t hold node lock if reboot is blocked (#819)
Signed-off-by: Jack Francis <jackfrancis@gmail.com>
2023-08-17 06:15:09 +02:00
Christian Kotzbauer
3639080851 feat: use go@1.20, k8s@0.27.4, test k8s 1.26-1.28 (#818)
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-17 06:11:28 +02:00
Christian Kotzbauer
fb51a566da cleanup: updated build-tools (#809)
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-15 18:07:03 +02:00
Jim
9a4b8fdb32 add argument to invert the behavior of alert-filter-regexp (#786)
* add argument to invert the behavior of alert-filter-regexp

Signed-off-by: Jim Liming <james.k.liming@gmail.com>

* feat: small code-improvements

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

---------

Signed-off-by: Jim Liming <james.k.liming@gmail.com>
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
Co-authored-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-14 18:52:12 +02:00
Thomas Stringer
3b9b190422 Add multiple concurrent node reboot feature (#660)
* Add ability to have multiple nodes get a lock

Currently in kured a single node can get a lock with Acquire. There
could be situations where multiple nodes might want a lock in the event
that a cluster can handle multiple nodes being rebooted. This adds the
side-by-side implementation for a multiple node lock situation.

Signed-off-by: Thomas Stringer <thomas@trstringer.com>

* Refactor to use the same code path for a single lock and a multilock

Signed-off-by: Thomas Stringer <thomas@trstringer.com>

* test: force rebuild

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* build: log pod-logs

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: change condition

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* build: fix test-script

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* build: add concurrent test

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: final changes

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

---------

Signed-off-by: Thomas Stringer <thomas@trstringer.com>
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
Co-authored-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-14 18:33:18 +02:00
Daniel Holbach
f22b1abd17 Merge pull request #815 from kubereboot/dependabot/docker/alpine-3.18.3
build(deps): bump alpine from 3.18.2 to 3.18.3
2023-08-08 19:41:22 +02:00
dependabot[bot]
c159b37fcc build(deps): bump alpine from 3.18.2 to 3.18.3
Bumps alpine from 3.18.2 to 3.18.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-08 17:08:31 +00:00
nkinkade
351ca71787 Adds new flag --metrics-host (#811)
* Replaces flag --metrics-port with --metrics-addresss

Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>

* Revert "Replaces flag --metrics-port with --metrics-addresss"

This reverts commit 528c7bb14b.

Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>

* Adds new --metrics-host flag

The flag --metrics-port already exists. While not as clean, to avoid
introducing a backward incompatible change to flags, this commit adds a
new --metrics-host flag, which in combination with the existing
--metrics-port flag can define a complete listen address for the metrics
server as "<metrics-host>:<metrics-port>"

Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>

* Adds new, commented flags --metrics-{port,host}

Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>

---------

Signed-off-by: Nathan Kinkade <kinkade@measurementlab.net>
2023-08-08 08:50:41 +02:00
Christian Kotzbauer
16dc5e30d9 fix: log on unusual sentinel-command exit code (#806)
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-02 19:04:52 +02:00
Christian Kotzbauer
aa971697ff feat: use readOnlyRootFilesystem (#805)
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-02 19:04:38 +02:00
Boris Prüßmann
d019e7a50a Support pod-selector for drain command (#788)
Signed-off-by: Boris Pruessmann <boris@pruessmann.org>
2023-08-02 11:33:29 +02:00
Christian Kotzbauer
ee81617645 chore: update manifest version
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-08-02 11:08:35 +02:00
Daniel Holbach
d7adcf6e1e Merge pull request #803 from dholbach/update-k8s
update k8s components/images
2023-07-30 11:24:14 +02:00
Daniel Holbach
409ff0a3e6 update k8s components/images
Signed-off-by: Daniel Holbach <daniel.holbach@gmail.com>
2023-07-28 12:26:02 +02:00
dependabot[bot]
3be3cd46b5 build(deps): bump guyarb/golang-test-annoations from 0.6.0 to 0.7.0 (#801)
Bumps [guyarb/golang-test-annoations](https://github.com/guyarb/golang-test-annoations) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/guyarb/golang-test-annoations/releases)
- [Commits](https://github.com/guyarb/golang-test-annoations/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: guyarb/golang-test-annoations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-22 08:53:06 +02:00
Daniel Holbach
e8202c602c Merge pull request #790 from kubereboot/dependabot/github_actions/helm/kind-action-1.8.0
build(deps): bump helm/kind-action from 1.7.0 to 1.8.0
2023-07-12 08:18:19 +02:00
dependabot[bot]
752176d16b build(deps): bump helm/kind-action from 1.7.0 to 1.8.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 17:34:09 +00:00
dependabot[bot]
d30a71e1d3 build(deps): bump gotest.tools/v3 from 3.4.0 to 3.5.0 (#789)
Bumps [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) from 3.4.0 to 3.5.0.
- [Release notes](https://github.com/gotestyourself/gotest.tools/releases)
- [Commits](https://github.com/gotestyourself/gotest.tools/compare/v3.4.0...v3.5.0)

---
updated-dependencies:
- dependency-name: gotest.tools/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-01 09:35:34 +02:00
Daniel Holbach
815df5e1e9 Merge pull request #783 from kubereboot/dependabot/go_modules/github.com/prometheus/client_golang-1.16.0
build(deps): bump github.com/prometheus/client_golang from 1.15.1 to 1.16.0
2023-06-16 09:56:03 +02:00
Daniel Holbach
77327b3915 Merge pull request #784 from kubereboot/dependabot/docker/alpine-3.18.2
build(deps): bump alpine from 3.18.0 to 3.18.2
2023-06-15 20:46:45 +02:00
dependabot[bot]
ec328e33d6 build(deps): bump alpine from 3.18.0 to 3.18.2
Bumps alpine from 3.18.0 to 3.18.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 18:01:15 +00:00
dependabot[bot]
54e127c2ad build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.1 to 1.16.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.1...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-15 18:01:01 +00:00
Daniel Holbach
1867c3253e Merge pull request #782 from kubereboot/dependabot/github_actions/docker/metadata-action-4.6.0
build(deps): bump docker/metadata-action from 4.5.0 to 4.6.0
2023-06-14 08:36:39 +02:00
dependabot[bot]
05a3ff85a3 build(deps): bump docker/metadata-action from 4.5.0 to 4.6.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](2c0bd771b4...818d4b7b91)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-13 18:00:35 +00:00
Daniel Holbach
19846c73f2 Merge pull request #781 from kubereboot/dependabot/github_actions/aquasecurity/trivy-action-0.11.2
build(deps): bump aquasecurity/trivy-action from 0.11.0 to 0.11.2
2023-06-13 10:20:25 +02:00
dependabot[bot]
ba62c32cbf build(deps): bump aquasecurity/trivy-action from 0.11.0 to 0.11.2
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.11.0 to 0.11.2.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](b43daad0c3...41f05d9ecf)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-12 18:03:52 +00:00
Maxime Leroy
4c75199b41 feat: metrics port command (#780)
Signed-off-by: Maxime Leroy <19607336+maxime1907@users.noreply.github.com>
2023-06-09 21:33:17 +02:00
Daniel Holbach
91eb403942 release 1.13.1 (#779)
Signed-off-by: Daniel Holbach <daniel.holbach@gmail.com>
2023-06-08 10:30:05 +02:00
Daniel Holbach
a27c755260 Merge pull request #778 from kubereboot/dependabot/github_actions/docker/metadata-action-4.5.0
build(deps): bump docker/metadata-action from 4.4.0 to 4.5.0
2023-06-07 21:15:02 +02:00
Daniel Holbach
2a6d119b3b Merge pull request #777 from dholbach/update-k8s
update k8s deps
2023-06-07 21:12:18 +02:00
dependabot[bot]
b17224addc build(deps): bump docker/metadata-action from 4.4.0 to 4.5.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](c4ee3adeed...2c0bd771b4)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-07 18:01:19 +00:00
Daniel Holbach
a2f21ebe49 update k8s deps
Signed-off-by: Daniel Holbach <daniel.holbach@gmail.com>
2023-06-07 11:09:53 +02:00
Daniel Holbach
4d2f26f483 Merge pull request #776 from kubereboot/dependabot/github_actions/aquasecurity/trivy-action-0.11.0
build(deps): bump aquasecurity/trivy-action from 0.10.0 to 0.11.0
2023-06-07 02:05:05 +02:00
dependabot[bot]
b358be7617 build(deps): bump aquasecurity/trivy-action from 0.10.0 to 0.11.0
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.10.0 to 0.11.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](e5f43133f6...b43daad0c3)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-06 18:01:07 +00:00
Daniel Holbach
e88434b619 Merge pull request #774 from kubereboot/dependabot/go_modules/github.com/sirupsen/logrus-1.9.3
build(deps): bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3
2023-06-05 21:33:36 +02:00
dependabot[bot]
1b12e52434 build(deps): bump github.com/sirupsen/logrus from 1.9.2 to 1.9.3
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.2 to 1.9.3.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.2...v1.9.3)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-05 18:02:43 +00:00
Daniel Holbach
64e40a62b0 Merge pull request #772 from kubereboot/dependabot/go_modules/github.com/stretchr/testify-1.8.4
build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4
2023-05-31 06:46:25 +02:00
dependabot[bot]
6690396679 build(deps): bump github.com/stretchr/testify from 1.8.3 to 1.8.4
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.3...v1.8.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-31 04:17:07 +00:00
dependabot[bot]
9acb2450ea build(deps): bump github.com/spf13/viper from 1.15.0 to 1.16.0 (#773)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.15.0 to 1.16.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.15.0...v1.16.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-31 06:16:13 +02:00
Daniel Holbach
e1a5b7d705 Merge pull request #771 from kubereboot/dependabot/go_modules/github.com/prometheus/common-0.44.0
build(deps): bump github.com/prometheus/common from 0.43.0 to 0.44.0
2023-05-22 21:54:23 +02:00
dependabot[bot]
72f52f2c6f build(deps): bump github.com/prometheus/common from 0.43.0 to 0.44.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.43.0 to 0.44.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.43.0...v0.44.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 18:05:46 +00:00
Daniel Holbach
6df454c0eb Merge pull request #770 from kubereboot/dependabot/go_modules/github.com/stretchr/testify-1.8.3
build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3
2023-05-20 00:46:26 +02:00
dependabot[bot]
c09e65eab1 build(deps): bump github.com/stretchr/testify from 1.8.2 to 1.8.3
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.2...v1.8.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 18:01:29 +00:00
Daniel Holbach
a34c994f4b Merge pull request #769 from kubereboot/dependabot/go_modules/github.com/sirupsen/logrus-1.9.2
build(deps): bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2
2023-05-18 22:27:01 +02:00
dependabot[bot]
60c54bef31 build(deps): bump github.com/sirupsen/logrus from 1.9.0 to 1.9.2
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.9.0 to 1.9.2.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.9.0...v1.9.2)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-18 18:01:57 +00:00
dependabot[bot]
8afa302680 build(deps): bump helm/kind-action from 1.6.0 to 1.7.0 (#767)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 20:41:46 +02:00
dependabot[bot]
de42273849 build(deps): bump helm/kind-action from 1.5.0 to 1.6.0 (#766)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 17:03:35 +02:00
Daniel Holbach
d3e2c9af95 Merge pull request #765 from kubereboot/dependabot/github_actions/lycheeverse/lychee-action-1.8.0
build(deps): bump lycheeverse/lychee-action from 1.7.0 to 1.8.0
2023-05-15 21:36:12 +02:00
dependabot[bot]
00648786b7 build(deps): bump lycheeverse/lychee-action from 1.7.0 to 1.8.0
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](97189f2c0a...ec3ed119d4)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-15 18:01:50 +00:00
Daniel Holbach
c7f4380847 Merge pull request #763 from kubereboot/dependabot/docker/alpine-3.18.0
build(deps): bump alpine from 3.17.3 to 3.18.0
2023-05-10 21:45:28 +02:00
Daniel Holbach
c659c25b94 Merge pull request #764 from dholbach/update-daniel
update Daniel's entry
2023-05-10 21:43:37 +02:00
dependabot[bot]
f44ced2d04 build(deps): bump alpine from 3.17.3 to 3.18.0
Bumps alpine from 3.17.3 to 3.18.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-10 18:11:22 +00:00
Daniel Holbach
e7d24bfff0 update Daniel's entry
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-05-10 15:22:55 +02:00
dependabot[bot]
0378c8a8c5 build(deps): bump github.com/prometheus/common from 0.42.0 to 0.43.0 (#762)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.42.0 to 0.43.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.42.0...v0.43.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-06 09:05:12 +02:00
Daniel Holbach
2cfeb34c03 Merge pull request #761 from kubereboot/dependabot/go_modules/github.com/prometheus/client_golang-1.15.1
build(deps): bump github.com/prometheus/client_golang from 1.15.0 to 1.15.1
2023-05-05 21:01:32 +02:00
dependabot[bot]
3bfacca254 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.15.0 to 1.15.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.15.0...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 18:00:59 +00:00
Christian Kotzbauer
46e1b9616b Update go-restful and prepare 1.13.0 (#760)
* feat: update go-restful

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* feat: prepare 1.13.0

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

---------

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-04-29 09:49:15 +02:00
Daniel Holbach
fe95f17503 Merge pull request #759 from dholbach/update-deps
update to new k8s releases
2023-04-24 19:44:12 +02:00
Daniel Holbach
462a063b6e update to new k8s releases
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-04-24 16:09:01 +02:00
Daniel Holbach
e664de6c6f update docs location (#758)
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-04-23 15:59:56 +02:00
Daniel Holbach
b666474cf1 Merge pull request #756 from kubereboot/dependabot/github_actions/lycheeverse/lychee-action-1.7.0
build(deps): bump lycheeverse/lychee-action from 1.6.1 to 1.7.0
2023-04-19 22:13:47 +02:00
Daniel Holbach
64313f82ef Merge pull request #755 from kubereboot/dependabot/github_actions/docker/metadata-action-4.4.0
build(deps): bump docker/metadata-action from 4.3.0 to 4.4.0
2023-04-19 21:50:56 +02:00
Daniel Holbach
59ba53584e Merge pull request #757 from kubereboot/dependabot/github_actions/aquasecurity/trivy-action-0.10.0
build(deps): bump aquasecurity/trivy-action from 0.9.2 to 0.10.0
2023-04-19 21:49:50 +02:00
dependabot[bot]
b2ffc0d154 build(deps): bump aquasecurity/trivy-action from 0.9.2 to 0.10.0
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.9.2 to 0.10.0.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](1f0aa582c8...e5f43133f6)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-19 18:01:23 +00:00
dependabot[bot]
b7edf8b345 build(deps): bump lycheeverse/lychee-action from 1.6.1 to 1.7.0
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](9ace499fe6...97189f2c0a)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-19 18:01:19 +00:00
dependabot[bot]
4e01e607cc build(deps): bump docker/metadata-action from 4.3.0 to 4.4.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](507c2f2dc5...c4ee3adeed)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-19 18:01:15 +00:00
Jack Francis
1929c11297 fix: annotate nodes for reboot before aborting due to blocked (#749)
Signed-off-by: Jack Francis <jackfrancis@gmail.com>
2023-04-14 10:29:22 +02:00
Daniel Holbach
28832f5cfb Merge pull request #753 from kubereboot/dependabot/go_modules/github.com/prometheus/client_golang-1.15.0
build(deps): bump github.com/prometheus/client_golang from 1.14.0 to 1.15.0
2023-04-14 00:13:32 +02:00
dependabot[bot]
3c79c750e1 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-13 18:01:18 +00:00
Daniel Holbach
58afedd842 update k8s dependencies and test images for k8s release (#747)
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-04-12 10:05:38 +02:00
Daniel Holbach
57783966db Merge pull request #752 from kubereboot/dependabot/go_modules/github.com/spf13/cobra-1.7.0
build(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0
2023-04-05 09:45:53 +02:00
dependabot[bot]
316a0ef4a3 build(deps): bump github.com/spf13/cobra from 1.6.1 to 1.7.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.1 to 1.7.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.6.1...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-04 18:02:39 +00:00
Daniel Holbach
7a86e65c69 Merge pull request #751 from kubereboot/dependabot/docker/alpine-3.17.3
build(deps): bump alpine from 3.17.2 to 3.17.3
2023-03-29 20:31:54 +02:00
dependabot[bot]
efa0fe808d build(deps): bump alpine from 3.17.2 to 3.17.3
Bumps alpine from 3.17.2 to 3.17.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 18:02:03 +00:00
dependabot[bot]
c2f97614dd build(deps): bump actions/stale from 7 to 8 (#748)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-25 09:55:15 +01:00
Daniel Holbach
e710e05658 Merge pull request #746 from kubereboot/dependabot/github_actions/actions/setup-go-4
build(deps): bump actions/setup-go from 3 to 4
2023-03-16 09:23:08 +01:00
dependabot[bot]
4ff3378df5 build(deps): bump actions/setup-go from 3 to 4
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 3 to 4.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-15 17:40:40 +00:00
Christian Kotzbauer
002f331486 chore: prepare release 1.12.2
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2023-03-15 17:50:20 +01:00
Daniel Paulus
2993afb329 Add ports config to DaemonSet yaml. Closes #741 (#742)
Signed-off-by: Daniel Paulus <d.paulus@gmail.com>
2023-03-14 07:46:38 +01:00
Daniel Holbach
97e1f56008 Merge pull request #743 from kubereboot/dependabot/github_actions/aquasecurity/trivy-action-0.9.2
build(deps): bump aquasecurity/trivy-action from 0.9.1 to 0.9.2
2023-03-08 21:50:17 +01:00
Daniel Holbach
4c9ed478d4 Merge pull request #744 from kubereboot/dependabot/go_modules/github.com/prometheus/common-0.42.0
build(deps): bump github.com/prometheus/common from 0.41.0 to 0.42.0
2023-03-08 21:50:04 +01:00
dependabot[bot]
6e0af2f320 build(deps): bump github.com/prometheus/common from 0.41.0 to 0.42.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.41.0 to 0.42.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.41.0...v0.42.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 18:04:10 +00:00
dependabot[bot]
1ea3823069 build(deps): bump aquasecurity/trivy-action from 0.9.1 to 0.9.2
Bumps [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) from 0.9.1 to 0.9.2.
- [Release notes](https://github.com/aquasecurity/trivy-action/releases)
- [Commits](8bd2f9fbda...1f0aa582c8)

---
updated-dependencies:
- dependency-name: aquasecurity/trivy-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-08 18:04:03 +00:00
Daniel Holbach
0063141b89 Merge pull request #739 from kubereboot/dependabot/go_modules/github.com/prometheus/common-0.41.0
build(deps): bump github.com/prometheus/common from 0.40.0 to 0.41.0
2023-03-01 23:51:53 +01:00
dependabot[bot]
3a1cfe395e build(deps): bump github.com/prometheus/common from 0.40.0 to 0.41.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.40.0 to 0.41.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.40.0...v0.41.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-01 18:08:49 +00:00
Daniel Holbach
ae3ab9f3e1 Merge pull request #732 from dholbach/728
Drop the golang.org/x/text replacement
2023-03-01 18:16:30 +01:00
Daniel Holbach
0b27a7ea80 Merge pull request #738 from dholbach/go-1.19
update Go to 1.19
2023-03-01 18:16:15 +01:00
Daniel Holbach
2596dcdcab Merge pull request #735 from kubereboot/dependabot/github_actions/lycheeverse/lychee-action-1.6.1
build(deps): bump lycheeverse/lychee-action from 1.5.4 to 1.6.1
2023-03-01 08:43:08 +01:00
Daniel Holbach
00c8b5254b update Go to 1.19, it's used in k8s 1.24 as well
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-03-01 07:27:06 +01:00
Daniel Holbach
6aa6a96b46 lychee: exclude slack:// and teams:// urls as well
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-03-01 07:01:32 +01:00
Daniel Holbach
a7b155a78f Try to dropping golang.org/x/text replacement
Ref: #728

Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-02-28 08:20:58 +01:00
Daniel Holbach
031ceed1f1 Merge pull request #736 from kubereboot/dependabot/go_modules/github.com/stretchr/testify-1.8.2
build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2
2023-02-28 07:29:46 +01:00
dependabot[bot]
0ceb062a47 build(deps): bump github.com/stretchr/testify from 1.8.1 to 1.8.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.1 to 1.8.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.1...v1.8.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-27 18:15:51 +00:00
dependabot[bot]
a4fba5a5bc build(deps): bump lycheeverse/lychee-action from 1.5.4 to 1.6.1
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.5.4 to 1.6.1.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](4dcb8bee2a...9ace499fe6)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-24 18:04:47 +00:00
Daniel Holbach
942f9d7eed Merge pull request #734 from kubereboot/dependabot/go_modules/github.com/prometheus/common-0.40.0
build(deps): bump github.com/prometheus/common from 0.39.0 to 0.40.0
2023-02-21 07:39:44 +01:00
dependabot[bot]
fd58b79413 build(deps): bump github.com/prometheus/common from 0.39.0 to 0.40.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.39.0 to 0.40.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.39.0...v0.40.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-20 18:11:42 +00:00
Daniel Holbach
132215ee97 Merge pull request #730 from dholbach/update-deps
update relevant deps
2023-02-15 12:46:18 +01:00
Daniel Holbach
25662304c2 Merge pull request #731 from dholbach/fix-701
Move to aquasecurity/trivy-action instead
2023-02-15 12:25:27 +01:00
Daniel Holbach
887b2e2427 Move to aquasecurity/trivy-action instead
Fixes: #701

Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-02-15 11:28:20 +01:00
Daniel Holbach
6afa8513c8 update relevant deps
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-02-15 11:16:42 +01:00
Daniel Holbach
94a4387407 Merge pull request #729 from kubereboot/dependabot/docker/alpine-3.17.2
build(deps): bump alpine from 3.17.1 to 3.17.2
2023-02-13 22:56:39 +01:00
dependabot[bot]
9ab71c894f build(deps): bump alpine from 3.17.1 to 3.17.2
Bumps alpine from 3.17.1 to 3.17.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-13 18:15:01 +00:00
Daniel Holbach
72eda8a7c3 Merge pull request #724 from dholbach/prepare-1.12.1
prepare for 1.12.1 release
2023-02-07 15:36:29 +01:00
Daniel Holbach
7bb9b75e2a prepare for 1.12.1 release
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-02-07 12:56:28 +01:00
Daniel Holbach
dfb8441078 Merge pull request #723 from dholbach/drop-replace
drop unnecessary replacement for go-restful CVE
2023-02-07 12:21:27 +01:00
Daniel Holbach
0e0cf7fac1 drop unnecessary replacement for go-restful CVE
Signed-off-by: Daniel Holbach <daniel@weave.works>
2023-02-07 09:39:32 +01:00
Daniel Holbach
06af12114d Merge pull request #721 from kubereboot/dependabot/github_actions/docker/build-push-action-4
build(deps): bump docker/build-push-action from 3 to 4
2023-02-07 09:31:59 +01:00
dependabot[bot]
477f356571 build(deps): bump docker/build-push-action from 3 to 4
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 3 to 4.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-31 17:09:01 +00:00
Daniel Holbach
ad1e9b8401 Merge pull request #720 from kubereboot/dependabot/go_modules/github.com/containrrr/shoutrrr-0.7.1
build(deps): bump github.com/containrrr/shoutrrr from 0.7.0 to 0.7.1
2023-01-31 10:10:14 +01:00
dependabot[bot]
80628b1b79 build(deps): bump github.com/containrrr/shoutrrr from 0.7.0 to 0.7.1
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.7.0 to 0.7.1.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.7.0...v0.7.1)

---
updated-dependencies:
- dependency-name: github.com/containrrr/shoutrrr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-30 17:20:38 +00:00
Daniel Holbach
30673c0391 Merge pull request #719 from kubereboot/dependabot/go_modules/github.com/containrrr/shoutrrr-0.7.0
build(deps): bump github.com/containrrr/shoutrrr from 0.6.1 to 0.7.0
2023-01-27 09:04:24 +01:00
dependabot[bot]
35e7bf9897 build(deps): bump github.com/containrrr/shoutrrr from 0.6.1 to 0.7.0
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.6.1 to 0.7.0.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.6.1...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/containrrr/shoutrrr
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-26 17:09:14 +00:00
Daniel Holbach
f8551b6714 Merge pull request #718 from kubereboot/dependabot/go_modules/github.com/spf13/viper-1.15.0
build(deps): bump github.com/spf13/viper from 1.14.0 to 1.15.0
2023-01-20 20:51:38 +01:00
dependabot[bot]
d87d585b9c build(deps): bump github.com/spf13/viper from 1.14.0 to 1.15.0
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-19 17:10:43 +00:00
Daniel Holbach
6ff57552c7 Merge pull request #717 from kubereboot/dependabot/github_actions/docker/metadata-action-4.3.0
build(deps): bump docker/metadata-action from 4.2.0 to 4.3.0
2023-01-14 07:27:15 +01:00
dependabot[bot]
36c78d94ce build(deps): bump docker/metadata-action from 4.2.0 to 4.3.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.2.0 to 4.3.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](05d22bf317...507c2f2dc5)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-13 17:07:52 +00:00
dependabot[bot]
0bc867cf11 build(deps): bump docker/metadata-action from 4.1.1 to 4.2.0 (#716)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.1.1 to 4.2.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](57396166ad...05d22bf317)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-11 19:24:46 +01:00
dependabot[bot]
c6d9bf07e6 build(deps): bump alpine from 3.17.0 to 3.17.1 (#714)
Bumps alpine from 3.17.0 to 3.17.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 17:21:57 +01:00
Daniel Holbach
fb84fa8253 Merge pull request #712 from kubereboot/dependabot/github_actions/actions/stale-7
build(deps): bump actions/stale from 6 to 7
2023-01-05 20:54:12 +01:00
Daniel Holbach
05414fb9d0 Merge pull request #713 from kubereboot/dependabot/github_actions/nick-invision/retry-2.8.3
build(deps): bump nick-invision/retry from 2.8.2 to 2.8.3
2022-12-31 04:42:54 +01:00
dependabot[bot]
230fa45461 build(deps): bump nick-invision/retry from 2.8.2 to 2.8.3
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.8.2 to 2.8.3.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-fields/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.8.2...v2.8.3)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-30 17:09:09 +00:00
dependabot[bot]
6aca815125 build(deps): bump actions/stale from 6 to 7
Bumps [actions/stale](https://github.com/actions/stale) from 6 to 7.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-21 17:17:14 +00:00
Daniel Holbach
eed2df6493 Merge pull request #711 from dholbach/update-x-net
update golang.org/x/net dep
2022-12-15 08:27:36 +01:00
Daniel Holbach
ff773d96bd update golang.org/x/net dep
Signed-off-by: Daniel Holbach <daniel@holba.ch>
2022-12-14 23:23:47 +01:00
Christian Kotzbauer
dd7081d58a chore: updated image
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-12-14 18:30:57 +01:00
dependabot[bot]
504708e5cd build(deps): bump github.com/prometheus/common from 0.38.0 to 0.39.0 (#710)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.38.0 to 0.39.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.38.0...v0.39.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 18:28:57 +01:00
Daniel Holbach
77a57089f0 Merge pull request #709 from kubereboot/dependabot/github_actions/helm/kind-action-1.5.0
build(deps): bump helm/kind-action from 1.4.0 to 1.5.0
2022-12-14 11:45:16 +01:00
dependabot[bot]
185761c024 build(deps): bump helm/kind-action from 1.4.0 to 1.5.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-13 17:10:11 +00:00
Daniel Holbach
a5c051d2e5 Merge pull request #708 from dholbach/update-for-k8s-1.26
update for k8s 1.26
2022-12-12 10:15:53 +01:00
Daniel Holbach
85c4fae0a6 update for k8s 1.26
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-12-12 09:42:36 +01:00
Daniel Holbach
99cfe852ba Merge pull request #706 from kubereboot/dependabot/go_modules/github.com/prometheus/common-0.38.0
build(deps): bump github.com/prometheus/common from 0.37.0 to 0.38.0
2022-12-08 22:54:25 +01:00
dependabot[bot]
1a8eccc039 build(deps): bump github.com/prometheus/common from 0.37.0 to 0.38.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.37.0 to 0.38.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.37.0...v0.38.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 17:12:51 +00:00
Daniel Holbach
75478e8608 Merge pull request #705 from dholbach/move-docs-to-website
move documentation to kured.dev
2022-12-01 22:53:44 +01:00
Daniel Holbach
4098158c6d document where to find the invidivual repositories
Signed-off-by: Daniel Holbach <daniel@holba.ch>
2022-11-29 22:22:31 +01:00
Daniel Holbach
93bd87547a move documentation to kured.dev
Signed-off-by: Daniel Holbach <daniel@holba.ch>
2022-11-29 22:01:21 +01:00
dependabot[bot]
28a05ca941 build(deps): bump alpine from 3.16.3 to 3.17.0 (#704)
Bumps alpine from 3.16.3 to 3.17.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-25 06:25:32 +01:00
Daniel Holbach
5db3889bdc Merge pull request #688 from kubereboot/add-governance
Add governance
2022-11-23 16:15:31 +01:00
Daniel Holbach
72c3113c56 Merge pull request #703 from dholbach/website-logos
use website logos
2022-11-23 14:29:34 +01:00
Daniel Holbach
6122192232 use website logos
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-23 12:11:19 +01:00
Daniel Holbach
c8ba0d98dc Merge pull request #700 from dholbach/add-mailing-list
add mailing list
2022-11-16 04:40:34 +01:00
Daniel Holbach
80579a3a81 Merge pull request #699 from kubereboot/dependabot/docker/alpine-3.16.3
build(deps): bump alpine from 3.16.2 to 3.16.3
2022-11-15 09:56:33 +01:00
Daniel Holbach
72c234e470 make the governance ours
- update obvious pieces: project name, mailing list, etc.
- use GH issues for public voting

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-15 08:41:56 +01:00
Daniel Holbach
ae29a90f43 Import GOVERNANCE-maintainer.md template
https://github.com/cncf/project-template/blob/main/GOVERNANCE-maintainer.md
Rev 2bc4799.

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-15 08:14:44 +01:00
Daniel Holbach
1e0e1e52d8 add mailing list
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-15 08:12:17 +01:00
dependabot[bot]
3299e8ebf7 build(deps): bump alpine from 3.16.2 to 3.16.3
Bumps alpine from 3.16.2 to 3.16.3.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-15 06:18:12 +00:00
Daniel Holbach
f93a634bd1 Merge pull request #697 from dholbach/docker-location
Fix location of Dockerfile for dependabot
2022-11-15 07:17:53 +01:00
Daniel Holbach
c19045c344 Fix location of Dockerfile for dependabot
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-14 16:39:23 +01:00
Daniel Holbach
2440b32c49 Merge pull request #694 from kubereboot/dependabot/github_actions/lycheeverse/lychee-action-1.5.4
build(deps): bump lycheeverse/lychee-action from 1.5.2 to 1.5.4
2022-11-09 18:31:11 +01:00
dependabot[bot]
0fc09c6d31 build(deps): bump lycheeverse/lychee-action from 1.5.2 to 1.5.4
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.5.2 to 1.5.4.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](25f59e1bc8...4dcb8bee2a)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-09 17:07:49 +00:00
Daniel Holbach
ed8e3292f1 Merge pull request #692 from kubereboot/dependabot/go_modules/github.com/spf13/viper-1.14.0
build(deps): bump github.com/spf13/viper from 1.13.0 to 1.14.0
2022-11-08 20:02:57 +01:00
Daniel Holbach
9ec2d83476 Merge pull request #693 from kubereboot/dependabot/go_modules/github.com/prometheus/client_golang-1.14.0
build(deps): bump github.com/prometheus/client_golang from 1.13.1 to 1.14.0
2022-11-08 20:02:41 +01:00
dependabot[bot]
6456d50880 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.1 to 1.14.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.13.1...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 17:08:13 +00:00
dependabot[bot]
c9a229c02c build(deps): bump github.com/spf13/viper from 1.13.0 to 1.14.0
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.13.0...v1.14.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-08 17:08:11 +00:00
Christian Kotzbauer
d2d5ba4ee8 chore: bump to 1.11.0
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-11-04 15:17:23 +01:00
dependabot[bot]
a7e227a259 build(deps): bump lycheeverse/lychee-action from 1.5.1 to 1.5.2 (#691)
Bumps [lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/lycheeverse/lychee-action/releases)
- [Commits](4a5af7cd29...25f59e1bc8)

---
updated-dependencies:
- dependency-name: lycheeverse/lychee-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-03 19:01:39 +01:00
Daniel Holbach
67c0b9bfdb Merge pull request #689 from kubereboot/dependabot/github_actions/Jerome1337/golint-action-1.0.3
build(deps): bump Jerome1337/golint-action from 1.0.2 to 1.0.3
2022-11-03 06:59:31 +01:00
Daniel Holbach
f008edd583 Merge pull request #690 from kubereboot/dependabot/go_modules/github.com/prometheus/client_golang-1.13.1
build(deps): bump github.com/prometheus/client_golang from 1.13.0 to 1.13.1
2022-11-03 06:39:16 +01:00
dependabot[bot]
39451838aa build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.13.0 to 1.13.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.13.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.13.0...v1.13.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-02 19:39:38 +00:00
dependabot[bot]
60d0f90c80 build(deps): bump Jerome1337/golint-action from 1.0.2 to 1.0.3
Bumps [Jerome1337/golint-action](https://github.com/Jerome1337/golint-action) from 1.0.2 to 1.0.3.
- [Release notes](https://github.com/Jerome1337/golint-action/releases)
- [Commits](https://github.com/Jerome1337/golint-action/compare/v1.0.2...v1.0.3)

---
updated-dependencies:
- dependency-name: Jerome1337/golint-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-02 19:39:11 +00:00
Daniel Holbach
3005892498 Merge pull request #683 from dholbach/fix-link
adjust link to CONTRIBUTING file
2022-11-02 18:35:23 +01:00
Daniel Holbach
b74784d36a Merge pull request #687 from dholbach/follow-up-686
brown paper bag for #686
2022-11-02 17:31:50 +01:00
Daniel Holbach
f9ff4b3ac6 adjust link to CONTRIBUTING file
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-02 17:31:32 +01:00
Daniel Holbach
eb877416ae brown paper bag for #686
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-02 14:08:28 +01:00
Daniel Holbach
16fd2db8fb Merge pull request #686 from dholbach/fix-685
Replace set-output with GITHUB_OUTPUT
2022-11-02 14:03:09 +01:00
Daniel Holbach
0f2dff84cd Replace set-output with GITHUB_OUTPUT
Fixes: #685

https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-02 13:23:42 +01:00
Daniel Holbach
bdd59a72f3 Merge pull request #684 from dholbach/simplify-setup-go
simplify the setup of go in workflows
2022-11-02 11:02:07 +01:00
Daniel Holbach
09bfa18f47 simplify the setup of go in workflows
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-11-02 09:12:06 +01:00
Daniel Holbach
a713389ca5 Merge pull request #682 from dholbach/rename-dev-docs
Move DEV doc to be CONTRIBUTING.md
2022-10-31 10:52:36 +01:00
Daniel Holbach
6986342e12 Move DEV doc to be CONTRIBUTING.md
This is the standard place where folks look, including CLOMonitor
https://clomonitor.io/docs/topics/checks/#contributing

Signed-off-by: Daniel Holbach <daniel@holba.ch>
2022-10-29 08:42:39 +02:00
Daniel Holbach
064724b8f6 Merge pull request #681 from evrardjp/fix_deadlink
Remove deadlink to k8s 1.10 support branch
2022-10-27 08:41:52 +02:00
Jean-Philippe Evrard
3f8b119b39 Remove deadlink to k8s 1.10 support branch
The branch where k8s 1.10 support was developped is not listed
in github. It makes the link in DEVELOPMENT reaching a 404.
Let us point to the merged SHAs of the changes instead.

Signed-off-by: Jean-Philippe Evrard <open-source@a.spamming.party>
2022-10-26 22:19:48 +02:00
Jean-Philippe Evrard
e5dc205494 Merge pull request #679 from dholbach/clomonitor-badge
Add CLOMonitor badge
2022-10-26 19:55:58 +00:00
Jean-Philippe Evrard
c3c80834d0 Merge pull request #680 from dholbach/no-analytics
website: we don't use analytics
2022-10-26 19:55:28 +00:00
Daniel Holbach
8f96eb6688 website: we don't use analytics
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-10-26 14:07:54 +02:00
Daniel Holbach
16d33d96f7 Add CLOMonitor badge
Also make markdownlint happy again.

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-10-26 13:51:16 +02:00
Daniel Holbach
590b6b87a4 Merge pull request #677 from dholbach/add-fossa
Use lychee link checker and add Fossa badge
2022-10-26 13:47:55 +02:00
Daniel Holbach
53e17ec12a Move to lychee for checking links
- exclude fossa links

Fixes: #308

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-10-26 11:51:31 +02:00
Daniel Holbach
4485fb60b0 Merge pull request #674 from kubereboot/dependabot/go_modules/github.com/spf13/cobra-1.6.1
build(deps): bump github.com/spf13/cobra from 1.6.0 to 1.6.1
2022-10-26 09:35:39 +02:00
fossabot
4d7ba069d3 Add license scan report and status
Signed off by: fossabot <badges@fossa.com>

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-10-26 09:34:30 +02:00
dependabot[bot]
0ff6390107 build(deps): bump github.com/spf13/cobra from 1.6.0 to 1.6.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-26 05:44:59 +00:00
Daniel Holbach
42bf7c5fd9 Merge pull request #675 from kubereboot/dependabot/go_modules/github.com/stretchr/testify-1.8.1
build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1
2022-10-26 07:44:07 +02:00
dependabot[bot]
b39fa7f2b8 build(deps): bump github.com/stretchr/testify from 1.8.0 to 1.8.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-25 18:02:37 +00:00
Daniel Holbach
12a252532e Merge pull request #673 from dholbach/artifacthub-badge
Add ArtifactHub badge
2022-10-25 18:11:56 +02:00
Daniel Holbach
121b5e8a12 Add ArtifactHub badge
Remove warning about repo move.

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-10-25 17:50:27 +02:00
Daniel Holbach
e4512458de Merge pull request #671 from kubereboot/dependabot/github_actions/docker/metadata-action-4.1.1
build(deps): bump docker/metadata-action from 4.1.0 to 4.1.1
2022-10-19 11:03:59 +02:00
dependabot[bot]
d0a3031b86 build(deps): bump docker/metadata-action from 4.1.0 to 4.1.1
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](12cce9efe0...57396166ad)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-18 18:02:51 +00:00
Daniel Holbach
9db896fc6a Merge pull request #670 from dholbach/update-deps
update x/net and x/text to include security fix
2022-10-18 16:24:02 +02:00
Daniel Holbach
91139a728a update x/net and x/text to include security fix
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-10-18 10:28:22 +02:00
dependabot[bot]
b0acc1e3e4 build(deps): bump nick-invision/retry from 2.8.1 to 2.8.2 (#669)
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-fields/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 07:24:21 +02:00
Daniel Holbach
82e3c99964 Merge pull request #668 from kubereboot/dependabot/github_actions/docker/metadata-action-4.1.0
build(deps): bump docker/metadata-action from 4.0.1 to 4.1.0
2022-10-13 21:36:05 +02:00
dependabot[bot]
857eecf36d build(deps): bump docker/metadata-action from 4.0.1 to 4.1.0
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](69f6fc9d46...12cce9efe0)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-13 17:56:27 +00:00
Daniel Holbach
0189c350d0 Merge pull request #665 from kubereboot/add-codeql-cron-1
add CodeQL scan job
2022-10-13 13:43:11 +02:00
Daniel Holbach
b340cd53e9 add CodeQL cron job
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-10-12 21:02:59 +02:00
Daniel Holbach
3aad30974a Merge pull request #664 from kubereboot/dependabot/go_modules/github.com/spf13/cobra-1.6.0
build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0
2022-10-11 20:28:41 +02:00
dependabot[bot]
87ef8296b2 build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.5.0...v1.6.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-10-11 17:57:56 +00:00
dependabot[bot]
e3442b164b build(deps): bump gotest.tools/v3 from 3.3.0 to 3.4.0 (#663)
Bumps [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/gotestyourself/gotest.tools/releases)
- [Commits](https://github.com/gotestyourself/gotest.tools/compare/v3.3.0...v3.4.0)

---
updated-dependencies:
- dependency-name: gotest.tools/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-08 08:47:33 +02:00
Daniel Holbach
47f0b244fe Merge pull request #662 from dholbach/update-meeting
update meeting day
2022-10-04 07:59:05 +02:00
Daniel Holbach
6ee5fa8636 update meeting day
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-10-04 07:21:18 +02:00
Christian Kotzbauer
6b757de2ee fix: fix spdx-sbom-handling (#661)
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-10-03 18:25:45 +02:00
Christian Kotzbauer
ba1328ca12 feat: Integrate GoReleaser, Cosign and Syft (#595)
* build: integrate goreleaser, syft and cosign

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: chmod for all binaries

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: version-env

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: remove prefix

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: remove prefix

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: schellcheck

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: shellcheck

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: several script updates

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: remove main-prefix

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-10-02 15:25:17 +02:00
Daniel Holbach
8cabfb7d75 Merge pull request #629 from dholbach/fix-625
Update to k8s 1.24
2022-09-28 10:38:59 +02:00
Daniel Holbach
5ac4f7ec86 Update to latest k8s
Fixes: #625

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-09-27 17:20:49 +02:00
Daniel Holbach
beecd839c2 Merge pull request #657 from kubereboot/dependabot/github_actions/actions/stale-6
build(deps): bump actions/stale from 5 to 6
2022-09-27 09:08:11 +02:00
Daniel Holbach
e70af373fc Merge pull request #659 from kubereboot/dependabot/github_actions/helm/kind-action-1.4.0
build(deps): bump helm/kind-action from 1.3.0 to 1.4.0
2022-09-27 09:05:15 +02:00
dependabot[bot]
cb4eccb22e build(deps): bump helm/kind-action from 1.3.0 to 1.4.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-23 18:18:50 +00:00
dependabot[bot]
fe6bea8c29 build(deps): bump actions/stale from 5 to 6
Bumps [actions/stale](https://github.com/actions/stale) from 5 to 6.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-22 17:47:22 +00:00
Jean-Philippe Evrard
06fad838d4 Merge pull request #653 from kubereboot/dependabot/github_actions/docker/metadata-action-4.0.1
build(deps): bump docker/metadata-action from 3.3.0 to 4.0.1
2022-09-21 10:44:58 +02:00
dependabot[bot]
15d0492e23 build(deps): bump docker/metadata-action from 3.3.0 to 4.0.1
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 3.3.0 to 4.0.1.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](98669ae865...69f6fc9d46)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-09-20 18:53:16 +00:00
Jean-Philippe Evrard
645c768001 Merge pull request #652 from evrardjp/fix-ds
Remove reference to dockerhub image
2022-09-20 17:31:01 +02:00
Jean-Philippe Evrard
1bbcbe93b7 Remove reference to dockerhub image
Signed-off-by: Jean-Philippe Evrard <open-source@a.spamming.party>
2022-09-20 17:00:29 +02:00
Daniel Holbach
c828d27fb2 Merge pull request #650 from evrardjp/use_github_tokens
Use github token instead of bot accounts
2022-09-20 16:57:28 +02:00
Jean-Philippe Evrard
e34f1a0947 Use github token instead of bot accounts
This should be one credential less to manage.

Signed-off-by: Jean-Philippe Evrard <open-source@a.spamming.party>
2022-09-20 16:39:11 +02:00
Daniel Holbach
50d024c3f9 Merge pull request #644 from dholbach/move-to-kubereboot-org
Change organisation to kubereboot, drop Docker Hub build
2022-09-20 15:29:26 +02:00
Daniel Holbach
e36a43c57c stop publishing to Docker Hub
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-09-20 13:18:57 +02:00
Daniel Holbach
bce0bac183 Changed weaveworks to kubereboot in many places
Areas I did not touch:
- bot name, secrets
- image name
- LICENSE (would need to ask how/if that gets changed...?)
- one mention in the Dev docs that we used to do some
  pre-release smoke-testing on the Weave Dev cluster

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-09-20 13:17:55 +02:00
Daniel Holbach
d5217121ac Merge pull request #645 from evrardjp/remove_charts_from_repo
Remove charts from repo
2022-09-20 13:17:11 +02:00
Jean-Philippe Evrard
82142f4d6a Remove charts from repo
As we'll be extracting charts to the new repository, there
is no need to keep the current helm charts in this repository.

This allows us to have a cleaner code.

Signed-off-by: Jean-Philippe Evrard <open-source@a.spamming.party>
2022-09-20 12:52:33 +02:00
Daniel Holbach
796014ab80 Merge pull request #643 from dholbach/add-footer
Add footer to README
2022-09-20 10:51:19 +02:00
Daniel Holbach
e5867b9f87 Add footer to README
- Mention CNCF Sandbox status
- Mention LinuxFoundation trademark

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-09-20 09:14:40 +02:00
Jean-Philippe Evrard
8343ddd9c5 Merge pull request #638 from dholbach/add-dco
require DCO from now on
2022-09-19 13:18:30 +02:00
Daniel Holbach
92db607e89 Merge pull request #637 from weaveworks/prepare-for-move
Add a warning to inform users about move
2022-09-19 13:17:04 +02:00
Daniel Holbach
c69a2449b2 require DCO from now on
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-09-19 12:01:10 +02:00
Jean-Philippe Evrard
e3032373ab Add a warning to inform users about move
This adds clarity to avoid temporary issues related to the
migration.
2022-09-19 12:00:27 +02:00
Daniel Holbach
5fd42b0085 Merge pull request #632 from evrardjp/test
Update golang and x/net to avoid CVE in our builds
2022-09-14 18:46:27 +02:00
Jean-Philippe Evrard
9d28cac8b4 Update golang and x/net
Without this patch, we have an old version of x/net, which
is vulnerable to CVE-2022-27664.

This fixes it by bumping to the lowest golang version
(1.18.6) and module which are known to have the fix [1] in.

[1]: https://go-review.googlesource.com/c/net/+/428735/
2022-09-14 17:57:51 +02:00
Jean-Philippe Evrard
788e351a18 ci: Ignore cache to pick latest matching go ver
Instead of requiring major.minor.x, it makes sense, in our CI,
to test major.minor.<latest>.

Without this, it is possible that the CI has a cached version
which is not yet the latest version.

This is a problem, as the current cached version on some workers
is 1.18.5, which has a CVE. Forcing the latest would fix it.
2022-09-14 17:57:51 +02:00
Daniel Holbach
c20a5c2da9 Merge pull request #631 from dholbach/update-slack
Update Slack information - point to CNCF Slack.
2022-09-14 15:31:31 +02:00
Daniel Holbach
8e42373fcb Update Slack information - point to CNCF Slack.
- Also sort maintainers alphabetically.
- Make markdownlint happy.

Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-09-14 14:04:30 +02:00
Daniel Holbach
6966f628b9 Merge pull request #630 from evrardjp/fix-maintainer-email
Update maintainer email address
2022-09-14 14:02:53 +02:00
Jean-Philippe Evrard
41ae0b20a5 Update maintainer email address
My maintainer email address is outdated, and is not
redirected anymore. This should fix it.

Signed-off-by: Jean-Philippe Evrard <open-source@a.spamming.party>
2022-09-14 13:23:55 +02:00
dependabot[bot]
8f5b9abc19 build(deps): bump github.com/spf13/viper from 1.12.0 to 1.13.0 (#626)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.12.0 to 1.13.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.12.0...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-06 20:39:16 +02:00
Daniel Holbach
774dc69e3b Merge pull request #623 from weaveworks/release/1.10.2
Prepare release 1.10.2
2022-08-20 11:11:06 +02:00
Christian Kotzbauer
9377948f62 chore: prepare release 1.10.2
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-08-20 10:44:22 +02:00
dependabot[bot]
4d6cac66a6 build(deps): bump helm/chart-testing-action from 2.2.1 to 2.3.0 (#618)
Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/helm/chart-testing-action/releases)
- [Commits](https://github.com/helm/chart-testing-action/compare/v2.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: helm/chart-testing-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-11 19:37:50 +02:00
dependabot[bot]
9d4ebfc1f8 build(deps): bump alpine from 3.16.1 to 3.16.2 in /cmd/kured (#617)
Bumps alpine from 3.16.1 to 3.16.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-10 06:20:13 +02:00
dependabot[bot]
ad781ad6f0 build(deps): bump github.com/prometheus/client_golang (#616)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.2 to 1.13.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.2...v1.13.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-09 06:26:49 +02:00
dependabot[bot]
9525ce53a3 build(deps): bump nick-invision/retry from 2.8.0 to 2.8.1 (#615)
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-fields/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.8.0...v2.8.1)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-09 06:25:46 +02:00
dependabot[bot]
c5bb9ae478 build(deps): bump nick-invision/retry from 2.7.1 to 2.8.0 (#613)
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.7.1 to 2.8.0.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-fields/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.7.1...v2.8.0)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-04 19:53:30 +02:00
Daniel Holbach
8cf12fa24e Merge pull request #612 from weaveworks/dependabot/github_actions/nick-invision/retry-2.7.1
build(deps): bump nick-invision/retry from 2.7.0 to 2.7.1
2022-08-04 14:25:16 +02:00
dependabot[bot]
98fdb334aa build(deps): bump nick-invision/retry from 2.7.0 to 2.7.1
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.7.0 to 2.7.1.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-fields/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.7.0...v2.7.1)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-03 17:03:44 +00:00
dependabot[bot]
87eda823e7 build(deps): bump github.com/sirupsen/logrus from 1.8.1 to 1.9.0 (#600)
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/sirupsen/logrus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-31 15:52:14 +02:00
Kingdon Barrett
9788dba4f3 fix: helm chart, use standard labels/best practice (#605)
https://helm.sh/docs/chart_best_practices/labels/#standard-labels

Upgrade Notes

* bump Helm chart version to v3.0.0
* shorten gitops directions
* shorten the amount of text to get to why

Users will want to know why we have decided to commit this breaking
change straightaway

* better sentence flow
* even slimmer, only support uninstall/reinstall
* better language
* fixup: it isn't kube-prometheus-stack's Smon

it's our ServiceMonitor, which has to line up with
kube-prometheus-stack's ServiceMonitor Selector labels

* remove the "updateStrategy"

Signed-off-by: Kingdon Barrett <kingdon@weave.works>
2022-07-31 15:51:17 +02:00
Jack Francis
777f5b2cce update command line flags in README (#607) 2022-07-23 09:20:52 +02:00
Daniel Holbach
055de3a949 Merge pull request #593 from weaveworks/dependabot/go_modules/github.com/stretchr/testify-1.8.0
build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0
2022-07-22 17:45:48 +02:00
Daniel Holbach
7bea9d53c1 Merge pull request #602 from weaveworks/dependabot/docker/cmd/kured/alpine-3.16.1
build(deps): bump alpine from 3.16.0 to 3.16.1 in /cmd/kured
2022-07-22 17:45:38 +02:00
Daniel Holbach
aa5a3f0ba9 Merge pull request #601 from weaveworks/dependabot/go_modules/github.com/containrrr/shoutrrr-0.6.1
build(deps): bump github.com/containrrr/shoutrrr from 0.6.0 to 0.6.1
2022-07-22 17:45:27 +02:00
dependabot[bot]
8230add524 build(deps): bump github.com/prometheus/common from 0.35.0 to 0.37.0 (#599)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.35.0 to 0.37.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.35.0...v0.37.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-22 17:36:29 +02:00
dependabot[bot]
10d42b07a5 build(deps): bump alpine from 3.16.0 to 3.16.1 in /cmd/kured
Bumps alpine from 3.16.0 to 3.16.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 15:16:47 +00:00
dependabot[bot]
5a59c2f504 build(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 15:16:28 +00:00
dependabot[bot]
9c56b28282 build(deps): bump github.com/containrrr/shoutrrr from 0.6.0 to 0.6.1
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.6.0...v0.6.1)

---
updated-dependencies:
- dependency-name: github.com/containrrr/shoutrrr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 15:16:10 +00:00
Jack Francis
dd0bce41be ci: address Azure/container-scan regression (#606) 2022-07-22 17:06:00 +02:00
Christian Kotzbauer
67c50b27ab prepare release 1.10.1 (#594)
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-07-01 17:44:33 +02:00
Alexei Tighineanu
e2e6e86e0c Updated helm charts with new message template flag (#589) 2022-06-29 14:49:56 +02:00
Daniel Holbach
5aaa1e01bc Merge pull request #592 from dholbach/add-coc
add CoC file
2022-06-28 12:33:09 +02:00
Daniel Holbach
00d5b4920a add CoC file
Signed-off-by: Daniel Holbach <daniel@weave.works>
2022-06-28 12:06:57 +02:00
Alexei Tighineanu
28c5332450 added notification when uncordoning (#587)
* added notification when uncordoning

 when reboot & uncordoning is succ
 essful -> notification will be se
 nt

* added uncordon message tmpl

 added message template for
 announcing successful uncor-
 doning and reboot.

* added proper documentation about new flag

 added readme note about new flag
2022-06-25 21:08:05 +02:00
dependabot[bot]
71b3f1dd7f build(deps): bump github.com/stretchr/testify from 1.7.4 to 1.7.5 (#588)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.4 to 1.7.5.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.4...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-25 17:47:15 +02:00
dependabot[bot]
95aee6828c build(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.4 (#583)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.3 to 1.7.4.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.3...v1.7.4)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-21 20:04:29 +02:00
dependabot[bot]
66ce93ef09 build(deps): bump github.com/spf13/cobra from 1.4.0 to 1.5.0 (#584)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.4.0 to 1.5.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.4.0...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-21 20:04:00 +02:00
dependabot[bot]
1e76d65d00 build(deps): bump gotest.tools/v3 from 3.2.0 to 3.3.0 (#582)
Bumps [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) from 3.2.0 to 3.3.0.
- [Release notes](https://github.com/gotestyourself/gotest.tools/releases)
- [Commits](https://github.com/gotestyourself/gotest.tools/compare/v3.2.0...v3.3.0)

---
updated-dependencies:
- dependency-name: gotest.tools/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-06-21 08:28:50 +02:00
dependabot[bot]
f802373e0f build(deps): bump github.com/prometheus/common from 0.34.0 to 0.35.0 (#580)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.34.0 to 0.35.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-21 08:02:27 +02:00
dependabot[bot]
6c34fee96b build(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.3 (#581)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-21 08:02:19 +02:00
dependabot[bot]
8dfccdbe48 build(deps): bump helm/kind-action from 1.2.0 to 1.3.0 (#578)
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-15 06:39:01 +02:00
dependabot[bot]
db62f4aa0e build(deps): bump guyarb/golang-test-annoations from 0.5.1 to 0.6.0 (#577)
Bumps [guyarb/golang-test-annoations](https://github.com/guyarb/golang-test-annoations) from 0.5.1 to 0.6.0.
- [Release notes](https://github.com/guyarb/golang-test-annoations/releases)
- [Commits](https://github.com/guyarb/golang-test-annoations/compare/v0.5.1...v0.6.0)

---
updated-dependencies:
- dependency-name: guyarb/golang-test-annoations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-09 19:55:56 +02:00
Christian Kotzbauer
115fea9d2a Release 1.10.0 preparation (#572)
* feat: updated helm-chart for 1.10.0
close #551

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* feat: update multiarch-dockerfile to 3.16.0

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-06-08 19:32:09 +02:00
dependabot[bot]
0734e270fa build(deps): bump actions/setup-python from 3 to 4 (#576)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 3 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 19:30:25 +02:00
dependabot[bot]
08774994ad build(deps): bump docker/setup-buildx-action from 1 to 2 (#575)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 19:14:24 +02:00
dependabot[bot]
90d2d9a39b build(deps): bump docker/build-push-action from 2 to 3 (#573)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2 to 3.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 19:13:57 +02:00
dependabot[bot]
35a6b8955d build(deps): bump docker/setup-qemu-action from 1 to 2 (#574)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 1 to 2.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-08 19:13:41 +02:00
David Shay
641c319eb8 Added support for multi-arch image build (#496)
* Added support for multi-arch image build

* Requested changes to multi-arch build

* Further optimizations of multi build

* multi needs QEMU for some pieces

* change main push for all platforms

* Update Dockerfile to call Makefile

* Remove manual workflow
2022-06-07 08:23:36 +02:00
Christian Kotzbauer
bee558cd8f Downgrade kind-images for 1.22.x and 1.23.x (#569)
* some debug stuff

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* small fix

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* add namespace

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* downgrade to kind@0.12.0

* Revert "feat: update kubernetes dependencies (#552)"

This reverts commit d2d21f31c0.

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* bump kind version

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* update to k8s 0.23.6

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* update to kind 0.13.0

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* add 1.24 test

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* add toleration

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* update kind to 0.14.0

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* update docs

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* add version prefix

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* update images

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* downgrade images

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* remove debug log

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-06-07 06:45:39 +02:00
dependabot[bot]
78064e1d2c build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (#571)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 19:29:41 +02:00
dependabot[bot]
29560f15b3 build(deps): bump github.com/containrrr/shoutrrr from 0.5.3 to 0.6.0 (#570)
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.5.3 to 0.6.0.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.5.3...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/containrrr/shoutrrr
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-06 19:09:58 +02:00
Alexei Tighineanu
500a8a1bbb updated slack-related documentation (#568)
since slack has implemented their new
 way of authenticating apps, checked if
 shoutrrr did cover that and tested the
 implementation on a slack channel.
2022-06-06 19:09:14 +02:00
dependabot[bot]
9e441ebee6 build(deps): bump github.com/spf13/viper from 1.11.0 to 1.12.0 (#565)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-26 19:29:33 +02:00
Alexei Tighineanu
34f0df2605 improved documentation covering slack usage (#564)
This PR clarrifies how user can use --notify
 -url flag and respect the username by adding
 <username>@ in front of tokenA.
2022-05-26 19:28:01 +02:00
dependabot[bot]
cd7c4f8da3 build(deps): bump alpine from 3.15.4 to 3.16.0 in /cmd/kured (#560)
Bumps alpine from 3.15.4 to 3.16.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-25 06:54:04 +02:00
Jack Francis
9407c3f8f6 tolerate both 1.24+ and prior control plane taints (#562)
* tolerate both 1.24+ and prior control plane taints

* bump chart version
2022-05-25 06:51:27 +02:00
Christian Kotzbauer
da59ebff70 build: small debug commands for nightly job
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-05-23 19:22:36 +02:00
Christian Kotzbauer
d2d21f31c0 feat: update kubernetes dependencies (#552)
* feat: update kubernetes dependencies
closes #525

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: update kind

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: missed kind-update

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* build: another kind update

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: use new toleration

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* fix: use both tolerations

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* build: some debugging

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>

* revert [skip ci]

Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-05-22 10:47:14 +02:00
harbottle
6191c73a3c Use clean patch to update node labels. Fixes #553 2022-05-20 08:16:45 +02:00
harbottle
48d112ba32 Change after-reboot-node-labels flag to post-reboot-node-labels 2022-05-18 11:39:38 +02:00
harbottle
b12ae4eccd Add a note about adding multiple node labels 2022-05-18 11:39:38 +02:00
harbottle
50aac294b7 Use Errorf instead of Fatalf for node label logging 2022-05-18 11:39:38 +02:00
harbottle
c3cb2bbc6c Tidy node labelling code 2022-05-18 11:39:38 +02:00
harbottle
67e979c198 Update readme with node labelling info 2022-05-18 11:39:38 +02:00
harbottle
9be88fb878 Add verification for node labelling flags 2022-05-18 11:39:38 +02:00
harbottle
4fcf6e184b Add node labelling 2022-05-18 11:39:38 +02:00
Jack Francis
aa5c3e7783 strip unnecessary quotes for notify-url configurations 2022-05-17 19:33:35 +02:00
Jack Francis
5ab20e62d2 ci: substring suffix inside quotes 2022-05-17 06:18:16 +02:00
Jack Francis
03e8c2116a ci: always use the latest golang patch version 2022-05-16 20:48:16 +02:00
dependabot[bot]
9415f301a2 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-16 19:33:15 +02:00
elchenberg
4d4d3982c2 bump Helm chart version to v2.14.1 2022-05-12 08:57:34 +02:00
elchenberg
84fa914fe6 helm: fix tolerations on 1.24
fixes #542
2022-05-12 08:57:34 +02:00
Jack Francis
d1e8b1b1a5 Merge pull request #539 from jackfrancis/control-plane-taint.1.24
helm: ensure kured on 1.24 gets the correct toleration
2022-05-06 12:41:45 -07:00
Jack Francis
3487860e06 Merge pull request #534 from weaveworks/fix/go-mod
fix: go mod tidy
2022-05-06 12:36:21 -07:00
Jack Francis
d965e7f67e Merge pull request #486 from jackfrancis/retry-cordon-drain
retry cordon + drain if fail, keep lock
2022-05-06 12:19:31 -07:00
dependabot[bot]
4ab3bf9813 build(deps): bump docker/login-action from 1 to 2
Bumps [docker/login-action](https://github.com/docker/login-action) from 1 to 2.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-06 19:38:17 +02:00
Jack Francis
7397365c51 helm: ensure kured on 1.24 gets the correct toleration 2022-05-06 10:22:07 -07:00
dependabot[bot]
d771013cde build(deps): bump nick-invision/retry from 2.6.0 to 2.7.0
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-fields/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.6.0...v2.7.0)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-26 19:50:38 +02:00
dependabot[bot]
195f4f0bee build(deps): bump gotest.tools/v3 from 3.1.0 to 3.2.0
Bumps [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/gotestyourself/gotest.tools/releases)
- [Commits](https://github.com/gotestyourself/gotest.tools/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: gotest.tools/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-25 19:55:31 +02:00
Christian Kotzbauer
15735cd933 fix: go mod tidy
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-04-21 07:08:10 +02:00
dependabot[bot]
c44ecff3e5 build(deps): bump github.com/prometheus/common from 0.33.0 to 0.34.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.33.0 to 0.34.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-20 20:12:46 +02:00
Christian Kotzbauer
1020e7179a feat: use go@1.17
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-04-20 20:11:49 +02:00
dependabot[bot]
5ff221b5b6 build(deps): bump github.com/spf13/viper from 1.10.1 to 1.11.0
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.10.1 to 1.11.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.10.1...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 09:12:36 +02:00
dependabot[bot]
c7b5520859 build(deps): bump guyarb/golang-test-annoations from 0.5.0 to 0.5.1
Bumps [guyarb/golang-test-annoations](https://github.com/guyarb/golang-test-annoations) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/guyarb/golang-test-annoations/releases)
- [Commits](https://github.com/guyarb/golang-test-annoations/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: guyarb/golang-test-annoations
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-15 09:11:40 +02:00
dependabot[bot]
bbdce6abe5 build(deps): bump github.com/containrrr/shoutrrr from 0.5.2 to 0.5.3
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.5.2...v0.5.3)

---
updated-dependencies:
- dependency-name: github.com/containrrr/shoutrrr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-11 20:00:26 +02:00
dependabot[bot]
5b11ebcc3a build(deps): bump actions/setup-go from 2 to 3
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 19:22:17 +02:00
dependabot[bot]
8543cf25a2 build(deps): bump actions/stale from 4 to 5
Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 19:21:52 +02:00
dependabot[bot]
6691996bc0 build(deps): bump alpine from 3.15.3 to 3.15.4 in /cmd/kured
Bumps alpine from 3.15.3 to 3.15.4.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-05 21:04:41 +02:00
Silvan Loser
eb4acc69bf fixed yamllint error #521 2022-04-02 17:26:28 +02:00
Silvan Loser
302578467d updated README with additional values #521 2022-04-02 17:26:28 +02:00
Silvan Loser
99e7b71ba4 bump chart version to 2.13.0 #521 2022-04-02 17:26:28 +02:00
Silvan Loser
e38d153fe7 adding value containerSecurityContext to helm chart #521 2022-04-02 17:26:28 +02:00
Robin De Roeck
7f6d4a1846 Update README.md
Update Teams webhook
Update Shouttr documentation version to v0.5
2022-04-02 10:10:07 +02:00
dependabot[bot]
07208ef84b build(deps): bump github.com/prometheus/common from 0.32.1 to 0.33.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.32.1 to 0.33.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.32.1...v0.33.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 20:23:26 +02:00
Christian Kotzbauer
d6964180ca release 1.9.2
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-03-29 12:06:13 +02:00
Christian Kotzbauer
966698f3c6 update to alpine@3.15.3 2022-03-29 10:06:59 +02:00
dependabot[bot]
445310b9b7 build(deps): bump alpine from 3.15.1 to 3.15.2 in /cmd/kured
Bumps alpine from 3.15.1 to 3.15.2.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-24 07:08:45 +01:00
dependabot[bot]
1eec15b5dd build(deps): bump alpine from 3.15.0 to 3.15.1 in /cmd/kured
Bumps alpine from 3.15.0 to 3.15.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 18:58:10 +01:00
dependabot[bot]
238e6993f3 build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 06:58:01 +01:00
Pavel Goglov
1ca0203db2 Bump version to 2.12.0 2022-03-16 11:48:19 +01:00
Pavel Goglov
9ddad78071 Mention dynamic Slack parameters 2022-03-16 11:48:19 +01:00
Pavel Goglov
4918203ea9 Bump chart version 2022-03-16 11:48:19 +01:00
Pavel Goglov
640efa56b8 Use templating in Slack URL, channel and username 2022-03-16 11:48:19 +01:00
dependabot[bot]
67232f00d9 build(deps): bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-15 06:48:57 +01:00
dependabot[bot]
ce32f9dc05 build(deps): bump helm/chart-testing-action from 2.2.0 to 2.2.1
Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/helm/chart-testing-action/releases)
- [Commits](https://github.com/helm/chart-testing-action/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: helm/chart-testing-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-15 06:48:34 +01:00
dependabot[bot]
d82d295f2d build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-10 19:00:48 +01:00
Khue Doan
580279f419 Add Helm values example 2022-03-03 06:15:38 +01:00
Khue Doan
87508eb778 docs: add sentinel command example for RHEL family 2022-03-03 06:15:38 +01:00
dependabot[bot]
7d3b97541d build(deps): bump actions/setup-python from 2 to 3
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-01 08:42:57 +01:00
Jack
93d6a783a1 retry cordon + drain if fail, keep lock 2022-02-15 15:07:51 -08:00
dependabot[bot]
b7494f5f80 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.0 to 1.12.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.0...v1.12.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-31 20:10:45 +01:00
dependabot[bot]
8e1933cd28 build(deps): bump github.com/prometheus/client_golang
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.11.0 to 1.12.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.11.0...v1.12.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-19 20:52:58 +01:00
dependabot[bot]
96bf7c1add build(deps): bump gotest.tools/v3 from 3.0.3 to 3.1.0
Bumps [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) from 3.0.3 to 3.1.0.
- [Release notes](https://github.com/gotestyourself/gotest.tools/releases)
- [Commits](https://github.com/gotestyourself/gotest.tools/compare/v3.0.3...v3.1.0)

---
updated-dependencies:
- dependency-name: gotest.tools/v3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 18:55:59 +01:00
Daniel Simionato
178ba93b5a Add ability to define ds annotations in helm chart 2022-01-12 07:25:11 +01:00
Christian Kotzbauer
f3ed0087d2 Merge pull request #493 from weaveworks/dependabot/github_actions/helm/chart-testing-action-2.2.0
build(deps): bump helm/chart-testing-action from 2.1.0 to 2.2.0
2022-01-07 20:41:40 +01:00
dependabot[bot]
71a273a14c build(deps): bump helm/chart-testing-action from 2.1.0 to 2.2.0
Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/helm/chart-testing-action/releases)
- [Commits](https://github.com/helm/chart-testing-action/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: helm/chart-testing-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-07 17:02:55 +00:00
Christian Kotzbauer
2b36eab0f8 Merge pull request #492 from weaveworks/feature/release-1.9.1
Prepare release 1.9.1
2022-01-06 19:13:05 +01:00
Christian Kotzbauer
aefd901b4e prepare release 1.9.1
Signed-off-by: Christian Kotzbauer <git@ckotzbauer.de>
2022-01-06 10:06:45 +01:00
Christian Kotzbauer
91b01b5524 Merge pull request #489 from dkulchinsky/dannyk/remove_env_values_from_logs
don't print env variable values in the logs (some are sensitive)
2022-01-05 05:55:28 +01:00
Christian Kotzbauer
f1255bff91 Merge pull request #490 from dkulchinsky/dannyk/deprecation_fix
small fix in deprecation log messages
2022-01-04 19:03:46 +01:00
Danny Kulchinsky
22a76f0da2 small fix in deprecation log messages 2022-01-04 12:23:22 -05:00
Danny Kulchinsky
b52a9587f3 don't print env variable values in the logs (some are sensitive) 2022-01-04 10:55:46 -05:00
Christian Kotzbauer
a6e1cf8191 Merge pull request #487 from weaveworks/release-1.9.0
Release 1.9.0
2021-12-17 14:14:42 +01:00
Christian Kotzbauer
d7576dce0f Merge pull request #456 from span/jsonlogging-chart
Jsonlogging chart
2021-12-17 10:33:58 +01:00
Christian Kotzbauer
661af3b042 prepare 1.9.0 2021-12-17 10:32:21 +01:00
Daniel Holbach
eec8ca1f9b Merge pull request #485 from weaveworks/dependabot/go_modules/github.com/spf13/viper-1.10.1
build(deps): bump github.com/spf13/viper from 1.10.0 to 1.10.1
2021-12-15 19:16:38 +01:00
dependabot[bot]
15356fa26d build(deps): bump github.com/spf13/viper from 1.10.0 to 1.10.1
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.10.0...v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-15 17:55:30 +00:00
Daniel Holbach
7e3565a565 Merge pull request #484 from weaveworks/dependabot/go_modules/github.com/spf13/cobra-1.3.0
build(deps): bump github.com/spf13/cobra from 1.2.1 to 1.3.0
2021-12-15 18:45:36 +01:00
dependabot[bot]
a3bc03b4b9 build(deps): bump github.com/spf13/cobra from 1.2.1 to 1.3.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-15 17:12:47 +00:00
Daniel Holbach
22ce5a2628 Merge pull request #483 from weaveworks/dependabot/go_modules/github.com/spf13/viper-1.10.0
build(deps): bump github.com/spf13/viper from 1.9.0 to 1.10.0
2021-12-14 18:33:53 +01:00
dependabot[bot]
0f80b70478 build(deps): bump github.com/spf13/viper from 1.9.0 to 1.10.0
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-14 17:12:51 +00:00
Daniel Holbach
28be690849 Merge pull request #480 from weaveworks/dependabot/github_actions/nick-invision/retry-2.6.0
build(deps): bump nick-invision/retry from 2.5.1 to 2.6.0
2021-12-10 19:12:53 +01:00
dependabot[bot]
84292cc8c3 build(deps): bump nick-invision/retry from 2.5.1 to 2.6.0
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-invision/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.5.1...v2.6.0)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-10 17:02:55 +00:00
Christian Kotzbauer
21b54227a7 Merge pull request #479 from weaveworks/dependabot/go_modules/github.com/spf13/viper-1.9.0
build(deps): bump github.com/spf13/viper from 1.8.1 to 1.9.0
2021-12-09 18:42:24 +01:00
dependabot[bot]
8e3fb55ec4 build(deps): bump github.com/spf13/viper from 1.8.1 to 1.9.0
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.8.1 to 1.9.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.8.1...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-09 17:11:56 +00:00
Christian Kotzbauer
1a6592851e Merge pull request #459 from georgekaz/patch-1
Exclude terminated pods from the blocking mechanism
2021-12-09 14:02:49 +01:00
Christian Kotzbauer
bba3b8d83f Merge pull request #464 from dkulchinsky/viper_env_vars
bind environment variables to cobra flags with viper
2021-12-09 14:00:11 +01:00
Daniel Holbach
9c6d6a6d82 Merge pull request #476 from dholbach/fix-474
update to test against k8s 1.2{1,2,3} kind images
2021-12-08 10:34:12 +01:00
Daniel Holbach
997794eaac update to test against k8s 1.2{1,2,3} kind images
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-12-08 09:59:01 +01:00
Daniel Holbach
0763cdd95a Merge pull request #475 from dholbach/fix-473
Update k8s dependencies to 0.22.4
2021-12-07 08:40:35 +01:00
Daniel Holbach
c004566e97 ensure go version for tests
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-12-07 08:07:21 +01:00
Daniel Holbach
077ef2488e Update k8s dependencies to 0.22.4
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-12-06 15:08:54 +01:00
Daniel Holbach
06093ab53b Merge pull request #472 from dholbach/chart-1.8.2-update
update image tag to 1.8.2
2021-12-06 15:04:01 +01:00
Daniel Holbach
4d2019c07f update image tag to 1.8.2 2021-12-06 14:40:51 +01:00
Danny Kulchinsky
687aeda813 use sprintf for value in log 2021-12-02 12:05:07 -05:00
Danny Kulchinsky
acddd6b675 minor restructure and adding log for flag to env var binding 2021-12-01 20:59:12 -05:00
Danny Kulchinsky
54e7d93902 dedup const block 2021-12-01 14:50:53 -05:00
Danny Kulchinsky
2666b49d01 address review comments 2021-12-01 11:14:19 -05:00
Daniel Holbach
ff1a27ba8b Merge pull request #468 from weaveworks/fix-ghcr-login
fix ghcr.io login
2021-11-29 20:29:49 +01:00
Daniel Holbach
38ed636ecf fix ghcr.io login
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-11-29 16:59:36 +01:00
Daniel Holbach
8324b09bb9 Merge pull request #446 from weaveworks/revert-445-revert-439-feature/quay-registry
Add ghcr.io as second registry
2021-11-29 16:54:28 +01:00
Daniel Holbach
fb8677e7ac Move to GHCR as a backup for Docker Hub 2021-11-29 16:29:47 +01:00
Daniel Holbach
bdd16d4e01 Merge pull request #467 from weaveworks/dependabot/docker/cmd/kured/alpine-3.15.0
build(deps): bump alpine from 3.14 to 3.15.0 in /cmd/kured
2021-11-29 11:12:38 +01:00
dependabot[bot]
16e6d3c4d3 build(deps): bump alpine from 3.14 to 3.15.0 in /cmd/kured
Bumps alpine from 3.14 to 3.15.0.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-29 09:51:54 +00:00
Daniel Holbach
af824bfd6a Merge pull request #466 from dholbach/follow-up-to-465
follow up to #465
2021-11-29 10:51:35 +01:00
Daniel Holbach
8264a529d6 follow up to #465
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-11-29 10:29:16 +01:00
Jean-Philippe Evrard
cd25017d67 Merge pull request #462 from jackfrancis/helm-chart-2.10.1
feat: update chart to 2.10.1 w/ 1.8.1 kured image
2021-11-27 11:18:49 +01:00
Daniel Holbach
4c1a23a047 Merge pull request #465 from dholbach/add-docker-dependabot
update docker images too
2021-11-26 09:45:14 +01:00
Daniel Holbach
8f86e1d4f8 update docker images too
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-11-26 09:12:52 +01:00
Danny Kulchinsky
79e19d84ba bind environment variables to cobra flags with viper 2021-11-25 13:53:30 -05:00
Jack
01396db3d1 feat: update chart to 2.10.1 w/ 1.8.1 kured image 2021-11-19 09:08:57 -08:00
georgekaz
d3b59b8922 Exclude terminated pods from the blocking mechanism
Terminated pods should be excluded from the blocking a reboot as per https://github.com/weaveworks/kured/issues/227

This adds status filters to the fieldSelector in order to do that. I've not updated tests here but have successfully tested the exact same filter using kubectl
2021-11-05 16:48:36 +00:00
Daniel Kvist
eafe2c3d98 Update README.md
Add default value for logformat.
2021-10-30 04:35:53 +02:00
Daniel Kvist
e4f1c7358c Add chart configuration for json logging 2021-10-28 10:49:44 +02:00
Daniel Holbach
348b5b4c96 Merge pull request #368 from atighineanu/proto_removed_slack
removed notifications/slack package [Merge after 1.7.0 release]
2021-10-28 08:43:27 +02:00
Christian Kotzbauer
c8a3a6ff9d Merge pull request #455 from span/jsonlogging
Support json logformatter
2021-10-27 18:24:02 +02:00
Daniel Holbach
c196d4e97f Merge pull request #457 from weaveworks/dependabot/github_actions/nick-invision/retry-2.5.1
build(deps): bump nick-invision/retry from 2.5.0 to 2.5.1
2021-10-25 19:26:47 +02:00
dependabot[bot]
efc98c8813 build(deps): bump nick-invision/retry from 2.5.0 to 2.5.1
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-invision/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.5.0...v2.5.1)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-25 17:02:51 +00:00
Daniel Kvist
b108aa4d2d Support json logformatter
This commit introduces a new flag '--log-format' that allows a user
to configure json logging on the pods. If the log-format
is not specified, the formatter will default to the existing
text formatter.
2021-10-25 14:38:53 +02:00
Christian Kotzbauer
2ae0a82510 Merge pull request #454 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.32.1
build(deps): bump github.com/prometheus/common from 0.32.0 to 0.32.1
2021-10-21 19:31:53 +02:00
dependabot[bot]
f95664156d build(deps): bump github.com/prometheus/common from 0.32.0 to 0.32.1
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.32.0 to 0.32.1.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.32.0...v0.32.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-21 17:11:08 +00:00
Christian Kotzbauer
891afda596 Merge pull request #453 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.32.0
build(deps): bump github.com/prometheus/common from 0.31.1 to 0.32.0
2021-10-21 09:21:07 +02:00
dependabot[bot]
2b89170417 build(deps): bump github.com/prometheus/common from 0.31.1 to 0.32.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.31.1 to 0.32.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.31.1...v0.32.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-20 17:10:49 +00:00
Daniel Holbach
de59c2614d Merge pull request #450 from weaveworks/dependabot/go_modules/github.com/containrrr/shoutrrr-0.5.2
build(deps): bump github.com/containrrr/shoutrrr from 0.5.1 to 0.5.2
2021-10-11 19:32:29 +02:00
dependabot[bot]
2e5cb81b4c build(deps): bump github.com/containrrr/shoutrrr from 0.5.1 to 0.5.2
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.5.1...v0.5.2)

---
updated-dependencies:
- dependency-name: github.com/containrrr/shoutrrr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-11 17:10:43 +00:00
Christian Kotzbauer
fde91041d5 Merge pull request #449 from weaveworks/feature/helm-1.8.0
helm: Prepare release for 1.8.0
2021-10-08 16:01:52 +02:00
Christian Kotzbauer
8a3f486ad9 feat: update to 1.8.0
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-10-08 15:40:57 +02:00
Christian Kotzbauer
513db7ce8c Merge pull request #448 from weaveworks/feature/release-1.8.0
docs: updated version table
2021-10-08 15:06:09 +02:00
Christian Kotzbauer
938cbd428c feat: add also missing prefer-no-schedule-taint
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-10-08 15:05:18 +02:00
Christian Kotzbauer
fa28b550b2 feat: add reboot-sentinel-command to helm-chart
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-10-08 14:56:30 +02:00
Christian Kotzbauer
164183e1bc fix: correct indent
ref: #447

Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-10-08 14:53:12 +02:00
Christian Kotzbauer
7d0499cc0a Merge pull request #430 from amorey/reboot-delay-documentation
Add `reboot-delay` CLI argument to docs, helm charts and manifests
2021-10-08 14:49:05 +02:00
Christian Kotzbauer
5e32864e0b Merge pull request #415 from MattJeanes/prometheus-alert-firing-option-chart
Add --alert-firing-only parameter to chart
2021-10-08 14:48:18 +02:00
Christian Kotzbauer
718faf4d31 Merge branch 'feature/helm-1.8.0' into prometheus-alert-firing-option-chart 2021-10-08 14:47:57 +02:00
Christian Kotzbauer
ac9e669b52 docs: updated version table
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-10-08 14:44:04 +02:00
Daniel Holbach
7c33ad8b6e Merge pull request #436 from weaveworks/dependabot/github_actions/guyarb/golang-test-annoations-0.5.0
Bump guyarb/golang-test-annoations from 0.4.0 to 0.5.0
2021-10-08 10:47:31 +02:00
Daniel Holbach
6f8d36e8db Merge pull request #445 from weaveworks/revert-439-feature/quay-registry
Revert "Add quay.io as second registry"
2021-10-08 10:12:13 +02:00
Daniel Holbach
688346e811 Revert "[WIP] Add quay.io as second registry" 2021-10-08 09:51:04 +02:00
Daniel Holbach
079425349d Merge pull request #444 from weaveworks/dependabot/github_actions/nick-invision/retry-2.5.0
Bump nick-invision/retry from 2.4.1 to 2.5.0
2021-10-08 09:35:50 +02:00
dependabot[bot]
d7589b16d7 Bump nick-invision/retry from 2.4.1 to 2.5.0
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-invision/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.4.1...v2.5.0)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-07 17:03:28 +00:00
atighineanu
bab1425e1a removed notifications/slack package
In this PR the slack-hook-url is translated
 into shoutrrr syntax. Therefore, slack pack
 age as well as checks for slack-hook-url in
 drain and reboot functions are removed.
 Also added a unit test for flagCheck(), this
 function also checks the (slack)URL syntax.
2021-10-07 10:37:47 +02:00
Daniel Holbach
4e1c05c5e3 Merge pull request #443 from weaveworks/feature/contrib-docs
doc: some clarification of release-docs
2021-10-01 08:45:17 +02:00
Christian Kotzbauer
2c7ca8261f doc: some clarification for release-docs
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-09-30 16:52:40 +02:00
Daniel Holbach
6ebf9a96f9 Merge pull request #439 from weaveworks/feature/quay-registry
[WIP] Add quay.io as second registry
2021-09-29 13:34:50 +02:00
Daniel Holbach
adffa11796 Merge pull request #440 from jackfrancis/maintainers-add-jackfrancis
Add jackfrancis to MAINTAINERS
2021-09-29 12:05:25 +02:00
Daniel Holbach
1152d72d51 Merge pull request #441 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.31.1
Bump github.com/prometheus/common from 0.31.0 to 0.31.1
2021-09-29 10:13:46 +02:00
dependabot[bot]
fb6a224f66 Bump github.com/prometheus/common from 0.31.0 to 0.31.1
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.31.0 to 0.31.1.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.31.0...v0.31.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-28 17:10:41 +00:00
Jack
c671dce161 Add jackfrancis to MAINTAINERS 2021-09-28 09:08:05 -07:00
Christian Kotzbauer
f8fc6e5017 build: add quay.io as second registry
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-09-28 17:42:49 +02:00
Daniel Holbach
effbf62987 Merge pull request #428 from weaveworks/k8s-1.21
Updated Kubernetes to 1.21
2021-09-28 10:15:50 +02:00
Daniel Holbach
6423bf0069 update to go 1.16 (follow the load of k8s 1.21)
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-09-28 09:06:35 +02:00
Christian Kotzbauer
9c81caa92e build: added k8s@1.22 and dropped k8s@1.19
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-09-28 09:06:35 +02:00
Christian Kotzbauer
978acba030 feat: updated to k8s@1.21
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-09-28 09:06:35 +02:00
Daniel Holbach
acef34e916 Merge pull request #437 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.31.0
Bump github.com/prometheus/common from 0.30.0 to 0.31.0
2021-09-28 08:59:22 +02:00
Daniel Holbach
f72ef8c2ca Merge pull request #438 from jackfrancis/kubectl-cordon-context
fix: don't use nil context in drain helper
2021-09-28 08:56:02 +02:00
Jack
3c2508050d fix: don't use nil context in drain helper 2021-09-27 12:43:20 -07:00
dependabot[bot]
483a5d8211 Bump github.com/prometheus/common from 0.30.0 to 0.31.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.30.0 to 0.31.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.30.0...v0.31.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-27 17:09:51 +00:00
dependabot[bot]
9b89a8c0fc Bump guyarb/golang-test-annoations from 0.4.0 to 0.5.0
Bumps [guyarb/golang-test-annoations](https://github.com/guyarb/golang-test-annoations) from 0.4.0 to 0.5.0.
- [Release notes](https://github.com/guyarb/golang-test-annoations/releases)
- [Commits](https://github.com/guyarb/golang-test-annoations/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: guyarb/golang-test-annoations
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-27 17:02:45 +00:00
Christian Kotzbauer
b5a4bf432c Merge pull request #360 from cnmcavoy/cnmcavoy/force-reboot-timeout-helm
Add force-reboot and drain timeouts to chart config and ds
2021-09-15 18:45:37 +02:00
Cameron McAvoy
cee15cfc32 Add force-reboot and drain timeouts to chart config and ds 2021-09-15 10:42:50 -05:00
Christian Kotzbauer
b2b1940435 fix: do not use array for stale action (#433) 2021-09-10 09:52:44 +02:00
Daniel Holbach
a9eb139f60 Merge pull request #431 from weaveworks/dependabot/go_modules/github.com/containrrr/shoutrrr-0.5.1
Bump github.com/containrrr/shoutrrr from 0.5.0 to 0.5.1
2021-09-02 08:01:45 +02:00
dependabot[bot]
d6e478ec6b Bump github.com/containrrr/shoutrrr from 0.5.0 to 0.5.1
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: github.com/containrrr/shoutrrr
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 17:11:21 +00:00
Daniel Holbach
0955403470 Merge pull request #429 from weaveworks/alpine-3.14
build: updated to alpine@3.14
2021-08-30 10:54:35 +02:00
Andres Morey
a3f9796305 Add reboot-delay CLI argument to docs, manifests and helm charts 2021-08-26 16:26:21 +03:00
Christian Kotzbauer
9473f831be build: updated to alpine@3.14
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-08-25 20:19:03 +02:00
Daniel Holbach
3682eb36de Merge pull request #418 from amorey/reboot-delay
Add `reboot-delay` command line argument
2021-08-25 18:12:03 +02:00
Daniel Holbach
3900ee8876 Merge pull request #422 from weaveworks/dependabot/go_modules/github.com/containrrr/shoutrrr-0.5.0
Bump github.com/containrrr/shoutrrr from 0.4.4 to 0.5.0
2021-08-23 11:37:37 +02:00
dependabot[bot]
4c31084be8 Bump github.com/containrrr/shoutrrr from 0.4.4 to 0.5.0
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.4.4 to 0.5.0.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.4.4...v0.5.0)

---
updated-dependencies:
- dependency-name: github.com/containrrr/shoutrrr
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-16 17:08:06 +00:00
David Höld
6c9ee57dc1 Change default updateStrategy to RollingUpdate (#420)
Incrementally update Pods by default when changing the DaemonSet spec.

Fixes #413

Co-authored-by: David Hoeld <david.hoeld@fujitsu.com>
2021-08-06 09:38:37 +02:00
Andres Morey
3c5eb968d3 Add reboot-delay command line argument
Currently, kured issues the system reboot command immediately after
kubectl drain finishes.

This is a problem for processes that need extra time to finish but aren't
running on pods and therefore aren't controlled by kubectl drain (e.g.
de-registering nodes from external load balancers).

This patch solves the problem by introducing a `reboot-delay` command
line argument that can be used to add a delay after kubectl drain
finishes but before the reboot command is issued.
2021-08-03 16:48:25 +03:00
Jean-Philippe Evrard
54c0e4e25f Merge pull request #410 from MattJeanes/prometheus-alert-firing-option
Add --alert-firing-only parameter to only consider firing alerts
2021-07-28 09:02:44 +02:00
Matt Jeanes
afac9d435a Add --alert-firing-only parameter to chart 2021-07-27 11:27:08 +01:00
Matt Jeanes
6af3f1abc1 Add --alert-firing-only parameter to only consider firing alerts 2021-07-27 11:23:10 +01:00
dependabot[bot]
a48da239bc Bump github.com/prometheus/common from 0.29.0 to 0.30.0 (#414)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.29.0 to 0.30.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.29.0...v0.30.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-27 08:03:42 +02:00
SimeonPoot
c7d5810503 Restructuring Prometheus client, added unit-tests to regex-queries active alerts (#386)
* prometheus labels incl tests

* enable label in main, add log, docs

* revert the option to query by label

* revert the option to query by label

* PromClient instantiate by func,white space removal

* revert whitespace fix for readability.

* revert removal of newlines for readability

* rename New to NewPromClient to improve readability

Co-authored-by: simp <simp@saxobank.com>
2021-07-27 07:09:46 +02:00
Renaud Hager
6e16e993d9 Added possibility to mount volumes (#407)
* Added possibility to mount volumes

* Added a new line at the end of the file.

* Added a new line at the end of the file.

* Updated README.md
2021-07-26 13:19:02 +02:00
Daniel Holbach
24f4925b3f Merge pull request #408 from jackfrancis/chart-2.7.1-reboot-default
fix: common default reboot command for code and chart
2021-07-16 09:55:33 +02:00
Jack Francis
c0333d186e fix: common default reboot command for code and chart 2021-07-15 12:34:32 -07:00
Jean-Philippe Evrard
7a2b4a6a1a Merge pull request #405 from weaveworks/dependabot/github_actions/actions/stale-4
Bump actions/stale from 3.0.19 to 4
2021-07-14 19:28:23 +02:00
dependabot[bot]
fb7a7feb15 Bump actions/stale from 3.0.19 to 4
Bumps [actions/stale](https://github.com/actions/stale) from 3.0.19 to 4.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v3.0.19...v4)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-14 17:02:48 +00:00
Daniel Holbach
ffddfd7add Merge pull request #402 from piksel/patch-1
link to versioned shoutrrr docs
2021-07-05 11:33:49 +02:00
Daniel Holbach
a0bc7daa32 Merge pull request #401 from weaveworks/dependabot/go_modules/github.com/spf13/cobra-1.2.1
Bump github.com/spf13/cobra from 1.1.3 to 1.2.1
2021-07-05 10:13:39 +02:00
nils måsén
fd6f520b6e link to versioned shoutrrr docs
shoutrrr now have versioned docs to allow directly linking to the version that matches the one you use
changes should always backwards compatible, but not the other way around
2021-07-04 03:19:25 +02:00
dependabot[bot]
c2f275ebd0 Bump github.com/spf13/cobra from 1.1.3 to 1.2.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.3 to 1.2.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.1.3...v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 17:11:01 +00:00
Daniel Holbach
01b0ca8cea Merge pull request #399 from weaveworks/dependabot/github_actions/helm/kind-action-1.2.0
Bump helm/kind-action from 1.1.0 to 1.2.0
2021-07-01 08:21:23 +02:00
dependabot[bot]
aa45139b80 Bump helm/kind-action from 1.1.0 to 1.2.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: helm/kind-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 17:01:53 +00:00
Jean-Philippe Evrard
1654b75ec4 Merge pull request #396 from dholbach/fix-stale
our 'good first issue' issue label has no '-', add 'keep'
2021-06-23 18:11:30 +02:00
Daniel Holbach
e4da44a774 our 'good first issue' issue label has no '-', add 'keep'
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-06-22 15:33:27 +02:00
Jean-Philippe Evrard
e301908ae8 Merge pull request #391 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.29.0
Bump github.com/prometheus/common from 0.25.0 to 0.29.0
2021-06-20 11:11:45 +02:00
Renaud Hager
f442c6b632 Added rebootCommand values (#394)
* Added rebootCommand values

* Increased chart version from 2.6.0 to 2.7.0

* Updated README.md

* Added a space before a comment.
2021-06-17 18:14:09 +02:00
Daniel Holbach
8fc0a9daf2 Merge pull request #392 from weaveworks/dependabot/github_actions/nick-invision/retry-2.4.1
Bump nick-invision/retry from 2.4.0 to 2.4.1
2021-06-14 16:23:33 +02:00
dependabot[bot]
4d783e4321 Bump nick-invision/retry from 2.4.0 to 2.4.1
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-invision/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.4.0...v2.4.1)

---
updated-dependencies:
- dependency-name: nick-invision/retry
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 06:44:51 +00:00
dependabot[bot]
11f077f689 Bump github.com/prometheus/common from 0.25.0 to 0.29.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.25.0 to 0.29.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.25.0...v0.29.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-11 05:26:37 +00:00
Daniel Holbach
807b727ab3 Merge pull request #382 from dkulchinsky/fix_deprecation
fix slack deprecation notice
2021-05-31 10:03:04 +02:00
Danny Kulchinsky
c826d73695 fix slack deprecation notice 2021-05-28 13:52:01 -04:00
Daniel Holbach
5193f2de16 Merge pull request #379 from weaveworks/dependabot/github_actions/helm/chart-testing-action-2.1.0
Bump helm/chart-testing-action from 2.0.1 to 2.1.0
2021-05-26 08:59:12 +02:00
dependabot[bot]
310c6c114d Bump helm/chart-testing-action from 2.0.1 to 2.1.0
Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from 2.0.1 to 2.1.0.
- [Release notes](https://github.com/helm/chart-testing-action/releases)
- [Commits](https://github.com/helm/chart-testing-action/compare/v2.0.1...v2.1.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-26 05:13:46 +00:00
Christian Kotzbauer
e1017f47fb Merge pull request #353 from spingel/release-lock-delay-chart
Add lockReleaseDelay parameter to helm chart
2021-05-20 13:55:54 +02:00
Steffen Pingel
42f69c7b1e sort parameters alphabetically 2021-05-20 13:28:12 +02:00
Steffen Pingel
e3f4a88a07 Add documentation for lockReleaseDelay parameter 2021-05-20 13:26:53 +02:00
Steffen Pingel
48dc84b3e6 Add lockReleaseDelay parameter to helm chart 2021-05-19 22:06:25 +02:00
Christian Kotzbauer
816c732f39 Merge pull request #338 from atighineanu/master
update chart definition to include --notify-url
2021-05-19 19:09:53 +02:00
Christian Kotzbauer
0bd22c7c56 Merge branch 'main' into master 2021-05-19 18:49:37 +02:00
Christian Kotzbauer
2850417e48 doc: update image-version 2021-05-19 18:48:51 +02:00
Daniel Holbach
4f8e9a0761 Merge pull request #377 from weaveworks/release-1.7.0
Release 1.7.0: Compatibility docs
2021-05-19 16:01:50 +02:00
Christian Kotzbauer
0cbc2d58d2 doc: add compat-line for 1.7.0 2021-05-19 15:17:02 +02:00
Daniel Holbach
11a62c8ce8 Merge pull request #349 from dholbach/fix-347
Update test matrix to latest 3 sets of k8s releases
2021-05-19 10:43:01 +02:00
Daniel Holbach
89d1fe497c use latest kind
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-05-19 10:20:06 +02:00
Daniel Holbach
870329c7b4 Bounce kubernetes testing versions
This update the test matrix to latest set of 3 minor k8s releases

Fixes: #347

Co-Authored-By: Jean-Philippe Evrard <open-source@a.spamming.party>
2021-05-19 10:17:46 +02:00
Daniel Holbach
78bb9d6c14 Merge pull request #376 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.25.0
Bump github.com/prometheus/common from 0.24.0 to 0.25.0
2021-05-19 10:16:49 +02:00
Daniel Holbach
c035259d0a Merge pull request #374 from weaveworks/dependabot/github_actions/actions/stale-3.0.19
Bump actions/stale from 3.0.18 to 3.0.19
2021-05-19 10:16:26 +02:00
dependabot[bot]
d08b42933d Bump github.com/prometheus/common from 0.24.0 to 0.25.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.24.0 to 0.25.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.24.0...v0.25.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-19 05:45:01 +00:00
dependabot[bot]
729fa658dc Bump actions/stale from 3.0.18 to 3.0.19
Bumps [actions/stale](https://github.com/actions/stale) from 3.0.18 to 3.0.19.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3.0.18...v3.0.19)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-18 07:50:09 +00:00
Daniel Holbach
d7377bff1b update golang.org/x/crypto - break out of #349
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-05-18 09:38:38 +02:00
Daniel Holbach
42e4c317ae Merge pull request #369 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.24.0
Bump github.com/prometheus/common from 0.23.0 to 0.24.0
2021-05-11 09:08:50 +02:00
dependabot[bot]
5061a611a8 Bump github.com/prometheus/common from 0.23.0 to 0.24.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.23.0...v0.24.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-11 05:17:02 +00:00
Jean-Philippe Evrard
eca6da173c Clarify and simplify tests
Without this, we get multiple questions about our testing.
This should help clarify the tests and our coverage by:
- Simplifying our coverage
- Documenting better the purpose of each workflow file
- Documenting our testing and development activities better.
2021-05-04 11:24:20 +02:00
Jean-Philippe Evrard
7582e166be Merge pull request #367 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.23.0
Bump github.com/prometheus/common from 0.18.0 to 0.23.0
2021-05-04 08:43:27 +02:00
Jean-Philippe Evrard
de23444a5f Merge pull request #366 from papanito/papanito/update-docu-for-ms-teams
docu: update url for ms teams notifications, fixes #362
2021-05-04 08:42:54 +02:00
dependabot[bot]
4d5ea21db3 Bump github.com/prometheus/common from 0.18.0 to 0.23.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.18.0 to 0.23.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.18.0...v0.23.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-28 16:16:32 +00:00
papanito
bb56c731bb docu: update url for ms teams notifications, fixes #362 2021-04-28 09:48:23 +02:00
Daniel Holbach
ea6844d315 Merge pull request #365 from evrardjp/fix-kind-action
Use stable kind-action
2021-04-28 08:52:08 +02:00
Jean-Philippe Evrard
247e6f6c70 Use stable kind-action
We are relying on master, which might break anytime (or in this
case, moved to another branch).

Instead we should rely on a stable version, and unfreeze if
necessary. Dependabot helps us maintain those releases anyway.
2021-04-27 10:11:16 +02:00
Jean-Philippe Evrard
43a7a1a1ca Merge pull request #352 from spingel/release-lock-delay
Add parameter for delaying release of lock
2021-04-21 11:42:09 +02:00
Jean-Philippe Evrard
803ecef1de Merge pull request #324 from weaveworks/dependabot/go_modules/github.com/prometheus/client_golang-1.10.0
Bump github.com/prometheus/client_golang from 1.8.0 to 1.10.0
2021-04-21 11:33:49 +02:00
dependabot[bot]
0eb318c1b2 Bump github.com/prometheus/client_golang from 1.8.0 to 1.10.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.8.0 to 1.10.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.8.0...v1.10.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-21 08:22:04 +00:00
Daniel Holbach
6a7494fda5 Merge pull request #363 from weaveworks/dependabot/go_modules/github.com/containrrr/shoutrrr-0.4.4
Bump github.com/containrrr/shoutrrr from 0.4.3 to 0.4.4
2021-04-21 08:27:55 +02:00
dependabot[bot]
7b44fd2eb8 Bump github.com/containrrr/shoutrrr from 0.4.3 to 0.4.4
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.4.3 to 0.4.4.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.4.3...v0.4.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-21 05:48:57 +00:00
Daniel Holbach
3f322dfbb2 Merge pull request #361 from weaveworks/dependabot/go_modules/github.com/containrrr/shoutrrr-0.4.3
Bump github.com/containrrr/shoutrrr from 0.4.2 to 0.4.3
2021-04-20 08:37:34 +02:00
dependabot[bot]
4a11a95b86 Bump github.com/containrrr/shoutrrr from 0.4.2 to 0.4.3
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.4.2 to 0.4.3.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.4.2...v0.4.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-20 05:49:19 +00:00
Jean-Philippe Evrard
0b759a9ff6 Update kured-ds.yaml
Without this patch, it's not clear that we added command line
arguments recently. This should expose our latest changes in the
future released manifest.
2021-04-14 19:52:25 +02:00
Daniel Holbach
496d2b26d8 Merge pull request #354 from evrardjp/test-prom
Add prometheus export metrics functional testing
2021-04-14 10:11:26 +02:00
Daniel Holbach
c1a9de6622 Merge pull request #355 from evrardjp/fix-linter-false-positive
Reduce false positives
2021-04-14 10:10:54 +02:00
Jean-Philippe Evrard
79f22cee67 Merge branch 'main' into release-lock-delay 2021-04-14 09:48:28 +02:00
Jean-Philippe Evrard
83415d0e59 Reduce false positives in chart testing
Without this change, the "Test helm chart (install) action" will
rightfully succeed when our helm chart gets installed and has
no syntax issues. However, it doesn't test if kured is properly
installed. For example, the helm chart can try to install a
yet unpublished image, and our test will succeed, as the syntax
is still valid.

This is a problem, as everything looks green, but it's not
effectively working. Our other jobs are focusing on code changes,
so they rightfully override the image tag, which is not what
we want in this "Test helm chart" action.

This fixes it by adding an extra job in the workflow, depending
on the chart testing.
2021-04-13 17:20:06 +02:00
Jean-Philippe Evrard
8046977d1b Merge pull request #341 from cnmcavoy/cnmcavoy/force-reboot-timeout
Add force-reboot after force-timeout duration has been exceeded
2021-04-13 16:47:41 +02:00
Jean-Philippe Evrard
240a669727 Add prometheus export metrics functional testing
Without this, we can't know if the exposed prometheus metrics
behave properly.

This is a problem, as the only way we can evaluate the success
(right now), is a compilation success or failure from kured.
While this is a good start, it doesn't translate to what we
claim to offer: A boolean showing if a reboot is required.

This fixes it by creating a new github action workflow testing
if the float64 gauge is properly showing 0 for no reboot, 1 for reboot.
This is done by exposing the metrics endpoint through a node port.
A helm chart change was required to have the ability to expose
the service on a node port. We connect to the kind node through
docker in the `tests/test-metrics.sh`, where we curl the nodeport,
extract the only relevant metric, and compare it to the expected result.
2021-04-13 16:17:42 +02:00
Steffen Pingel
f7b3de36a6 Add parameter for delaying release of lock
This support throtteling of reboots across the cluster
and allows rebooted nodes to reschedule pods, e.g.
to synchronize replicated state before rebooting the next node.
2021-04-13 10:14:14 +02:00
Jean-Philippe Evrard
4c4508a586 Merge pull request #342 from jackfrancis/retry-daemonset-get
chore: retry daemonset get operations
2021-04-13 09:50:45 +02:00
Jean-Philippe Evrard
4e4c29aec0 Merge pull request #350 from dholbach/update-k8s-deps
update to latest k8s deps of 1.20 branch
2021-04-12 11:29:05 +02:00
Daniel Holbach
59d5266005 update to latest k8s deps of 1.20 branch
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-04-12 11:05:07 +02:00
Cameron McAvoy
25dcf3cb12 Expose SkipWaitForDeleteTimeoutSeconds and explicitly return when cordonning fails 2021-04-08 09:52:15 -05:00
Cameron McAvoy
5a86ef40e8 Update the default drain timeout to be infinite 2021-04-07 17:17:33 -05:00
Cameron McAvoy
2400f34cc0 Don't panic if the cordon fails and force-reboot is true 2021-04-07 14:58:21 -05:00
Cameron McAvoy
8db5650510 Refactor force-drain to be a drain-timeout in general 2021-04-07 12:57:01 -05:00
Jack Francis
390f6e9f99 chore: retry daemonset get operations 2021-04-07 09:27:05 -07:00
Cameron McAvoy
65292983f2 Add force-reboot after force-timeout duration has been exceeded 2021-04-07 09:39:01 -05:00
atighineanu
120bf713c0 update chart definition to include --notify-url 2021-04-07 13:26:02 +02:00
Daniel Holbach
d2c9ef8cba Merge pull request #336 from weaveworks/dependabot/go_modules/github.com/containrrr/shoutrrr-0.4.2
Bump github.com/containrrr/shoutrrr from 0.4.1 to 0.4.2
2021-04-07 11:14:55 +02:00
dependabot[bot]
9030f56648 Bump github.com/containrrr/shoutrrr from 0.4.1 to 0.4.2
Bumps [github.com/containrrr/shoutrrr](https://github.com/containrrr/shoutrrr) from 0.4.1 to 0.4.2.
- [Release notes](https://github.com/containrrr/shoutrrr/releases)
- [Changelog](https://github.com/containrrr/shoutrrr/blob/main/goreleaser.yml)
- [Commits](https://github.com/containrrr/shoutrrr/compare/v0.4.1...v0.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-07 08:48:02 +00:00
Jean-Philippe Evrard
1c13476b49 Update deps
This is the result of a go mod tidy.
It should clarify our dependencies.
2021-04-07 10:43:59 +02:00
Jean-Philippe Evrard
cd7976ce4f Add chart-testing target-branch
Without this patch, chart-testing is using the branch named
"master" by default.

This is a problem, as we just renamed our development branch
"main" instead of "master".

This should fix it by pointing to the right branch.
2021-04-07 10:43:43 +02:00
Jean-Philippe Evrard
8dfe5f2486 Merge pull request #340 from dholbach/update-dev-docs
Update dev docs
2021-04-06 17:14:58 +02:00
Daniel Holbach
f1c5608bcd Merge pull request #339 from evrardjp/fix-gh-action-cancelling
Update github actions
2021-04-06 17:12:41 +02:00
Daniel Holbach
c2122f3924 udpate Dev docs to latest
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-04-06 16:40:41 +02:00
Jean-Philippe Evrard
babc9095ef Update github actions
Without this patch, github actions are lagging behind.
This should improve our coverage.
2021-04-06 15:26:33 +02:00
Daniel Holbach
5305d7b34d Merge pull request #337 from dholbach/change-to-main-branch
Change default branch to 'main'.
2021-04-06 15:00:54 +02:00
atighineanu
9583df2e50 update chart definition to include --notify-url 2021-04-06 13:19:38 +02:00
Daniel Holbach
56a26a2f25 Change default branch to 'main'.
- Make markdownlint happier in a couple of places.
	- Rename '*-master-*' files
	- Change default branches of some other projects
	  we rely on. They moved to 'main' as well.
	- Standardise version of actions/checkout.
	- Update last release in README to 1.6.1.
	- Bbump chart version.

	Eventually closes: #252

Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-04-06 12:46:12 +02:00
Jean-Philippe Evrard
3fa1f3feec Merge pull request #335 from weaveworks/helm-app-version
Use chart appVersion as default image-tag
2021-04-02 10:06:06 +02:00
Christian Kotzbauer
21fdba4ef0 feat: use chart appVersion as default image-tag
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-04-02 09:41:37 +02:00
Jean-Philippe Evrard
4d45fa8bdb Fix invoke reboot for custom commands
Without this patch, the rebootCommand passed to invokeReboot is
ignored, and the command used for reboot is always systemctl reboot.

This is a problem, as we are aiming for flexible commands for this
release.

This fixes it by restoring the previous behaviour before commit
[1] happened.

[1]: 694957d56e
2021-04-02 09:15:59 +02:00
Jean-Philippe Evrard
e09359e46c Merge pull request #330 from weaveworks/dependabot/github_actions/guyarb/golang-test-annoations-v0.4.0
Bump guyarb/golang-test-annoations from v0.3.0 to v0.4.0
2021-03-29 15:53:11 +02:00
Daniel Holbach
770eb1e4f8 Merge pull request #315 from atighineanu/master
Implement universal notification mechanism (NEW)
2021-03-29 15:21:12 +02:00
atighineanu
694957d56e Implement universal notification mechanism
This patch gives the possibility to send notifications
 across different technologies. Also, this patch makes
 slack-hook-url, slack-username and slack-channel
 deprecated (informed by a warning).
 Also, updated the documentation (Readme).
2021-03-29 11:26:18 +02:00
dependabot[bot]
85c42fdb81 Bump guyarb/golang-test-annoations from v0.3.0 to v0.4.0
Bumps [guyarb/golang-test-annoations](https://github.com/guyarb/golang-test-annoations) from v0.3.0 to v0.4.0.
- [Release notes](https://github.com/guyarb/golang-test-annoations/releases)
- [Commits](https://github.com/guyarb/golang-test-annoations/compare/v0.3.0...48645c385003e0c362bf954d4018895be76f1d3d)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 09:19:36 +00:00
Jean-Philippe Evrard
3671c27e37 Add go tests
Without this patch, go test bugs can appear without getting caught,
neither in periodics, nor in PRs.

This should fix it.
2021-03-29 10:26:38 +02:00
Jean-Philippe Evrard
5930d733f8 Fix the Fatal calls using formatting
Without this, go test will rightfully fail.

This is a problem, as we don't have go test enabled, but we want
to have this in the future.

This should fix it.
2021-03-29 09:50:56 +02:00
Jean-Philippe Evrard
fd63e9a74b Add flexible commands parameters
Without this patch, you cannot configure the reboot
command to use, or the use another command to trigger
a reboot.

This is a problem, as multiple users have asked for
it in the past, and we are lacking flexibility.

This fixes it by introducing two new parameters,
- one to provide a custom reboot command.
  This should help people running kured on
  non systemd OS
- one to provide a custom sentinel command.
  This should help people running non Ubuntu OS,
  as they can directly use their command instead of
  generating a file (useful for CentOS/SUSE)

For this, several refactors had to be done, to
remove global state in some functions. Making those
functions closer to "pure functions" helps us
increase our test coverage here and later.

As commandReboot was very close to rebootCommand,
the function to reboot the node has been renamed
to invokeReboot.
2021-03-29 09:50:56 +02:00
Jean-Philippe Evrard
837bd4eb2a Refactor reboot blocks
Without this patch, we rely on global state in many functions for
which we check the reboot blockers.

This is a problem, as it's harder to test.

This patch fixes it by refactoring the reboot blockers. This also
includes a first series of unit tests for our main.
2021-03-29 09:50:56 +02:00
Jean-Philippe Evrard
2a95f0b6c8 Fix periodic jobs
Without this patch, the version of 1.20 is taken in jobs as 1.2.
This is a problem, as it breaks all jobs, because there is no
file to provision a cluster with kubernetes 1.2 (and we shouldn't
do this!)

This fixes it by ensuring there is no mangling of the version
strings, and therefore the right file is used.
2021-03-24 14:29:26 +01:00
Jean-Philippe Evrard
15c57927c8 Update the deprecated DeleteLocalData
DeleteLocalData was deprecated for users of kubectl in 0.20 [1].
At the same time of the deprecation, the relevant code was also
removed [2] without warning: The DeleteLocalData from the helper
structure was simply renamed DeleteEmptyDirData, without shims
on the exposed pkg.

This is a problem, as it completely breaks kured.

This should fix it, by using the new field name.

[1]:
56ea9621b7
[2]:
56ea9621b7 (diff-041bdcdedca650a38a8d82cf15ab6f3665b7b84a0fb44a8bb5dcdc5cd944c63d)
2021-03-22 14:28:17 +01:00
Jean-Philippe Evrard
20cbf6112d Bouncing go.mod with latest kubernetes packages
Without this patch, go.mod will lag behind for the kubernetes
packages, as it's not automatically tested by dependabot.

We should bump versions with each new minor release of kured.

This should fix it.
2021-03-22 14:28:17 +01:00
Christian Kotzbauer
f668bdb1ba Merge pull request #325 from weaveworks/stale-duration
Extend close-duration for stale issues and prs
2021-03-19 11:36:18 +01:00
Christian Kotzbauer
8209647e69 change comment accordingly
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-03-19 10:20:32 +01:00
Christian Kotzbauer
46354837f9 extend close-duration for stale issues and prs
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2021-03-19 08:26:11 +01:00
Jean-Philippe Evrard
de2e0bb2c8 Merge pull request #321 from dholbach/add-maintainers
Adding a MAINTAINERS file
2021-03-11 14:41:49 +01:00
Daniel Holbach
2b88b72d38 Merge pull request #318 from jackfrancis/node-annotations-chart
update chart definition to include --annotate-nodes
2021-03-11 12:04:39 +01:00
Jack Francis
87e610c25f update chart definition to include --annotate-nodes 2021-03-10 16:03:46 -08:00
Daniel Holbach
fe4ad73c2d Adding a MAINTAINERS file
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-03-10 18:16:11 +01:00
Daniel Holbach
f6ada05c5d Merge pull request #320 from dholbach/alpine-3.13
update to alpine 3.13
2021-03-10 08:50:42 +01:00
Daniel Holbach
355813de30 update to alpine 3.13
Signed-off-by: Daniel Holbach <daniel@weave.works>
2021-03-10 08:10:36 +01:00
Daniel Holbach
8a5f69480b Merge pull request #319 from weaveworks/dependabot/go_modules/github.com/sirupsen/logrus-1.8.1
Bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1
2021-03-10 08:07:11 +01:00
Daniel Holbach
1e0fc11b01 Merge pull request #316 from weaveworks/dependabot/github_actions/actions/stale-v3.0.18
Bump actions/stale from v3.0.17 to v3.0.18
2021-03-10 07:55:11 +01:00
dependabot[bot]
2218e29504 Bump github.com/sirupsen/logrus from 1.8.0 to 1.8.1
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.8.0...v1.8.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-10 05:55:36 +00:00
Daniel Holbach
250b9bad05 Merge pull request #296 from jackfrancis/node-annotations
add node annotations to identify kured reboot operations
2021-03-09 10:14:46 +01:00
Daniel Holbach
32e01a8417 Merge pull request #294 from jackfrancis/always-drain
always drain before reboot
2021-03-09 10:13:36 +01:00
Jack Francis
baf83408b8 add node annotations
adds a new --annotate-nodes daemonset runtime argument, which does the following when enabled:

- adds a new node annotation "weave.works/kured-most-recent-reboot-needed" with a value of the current RFC3339 timestamp as soon as kured identifies that a node needs to be rebooted
- adds a new node annotation "weave.works/kured-reboot-in-progress" with a value of the current RFC3339 timestamp as soon as kured identifies that a node needs to be rebooted
- removes the annotation "weave.works/kured-reboot-in-progress" when kured has successfully rebooted the node
2021-03-08 17:22:47 -08:00
Jack Francis
93c8242b89 always drain before reboot
This changes the pre-reboot drain functionality so that it always runs, regardless of the value of the Unschedulable node property.

Because kubectl drain is idempotent, we shouldn't have to worry about whether the node has already been set to Unschedulable (perhaps due to a prior, unsuccessful loop of the kured reboot cycle): we can run it over and over again. And because this drain func actually does a cordon + drain (and it only performs the drain if a cordon is successful), we can be sure that we aren't going to be thrashing this node w/ respect to scheduled pods.

This also fixes an edge case: if the node has been marked Unschedulable out-of-band, but workloads remain Running on this node, kured will no longer reboot the node's underlying VM/machine while it is actively running pods.
2021-03-08 17:20:31 -08:00
dependabot[bot]
c3d4c36493 Bump actions/stale from v3.0.17 to v3.0.18
Bumps [actions/stale](https://github.com/actions/stale) from v3.0.17 to v3.0.18.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3.0.17...3b3c3f03cd4d8e2b61e179ef744a0d20efbe90b4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-08 06:35:26 +00:00
Daniel Holbach
1fd09dd572 Merge pull request #310 from weaveworks/dependabot/go_modules/github.com/sirupsen/logrus-1.8.0
Bump github.com/sirupsen/logrus from 1.7.0 to 1.8.0
2021-03-02 10:48:41 +01:00
Daniel Holbach
d21a438197 Merge pull request #311 from weaveworks/dependabot/github_actions/actions/stale-v3.0.17
Bump actions/stale from v3.0.16 to v3.0.17
2021-03-02 10:48:15 +01:00
dependabot[bot]
3fdd1cf6f7 Bump actions/stale from v3.0.16 to v3.0.17
Bumps [actions/stale](https://github.com/actions/stale) from v3.0.16 to v3.0.17.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3.0.16...996798eb71ef485dc4c7b4d3285842d714040c4a)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-19 05:49:06 +00:00
dependabot[bot]
48688044d5 Bump github.com/sirupsen/logrus from 1.7.0 to 1.8.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.7.0...v1.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-18 05:49:25 +00:00
Daniel Holbach
640613565d Merge pull request #305 from weaveworks/dependabot/go_modules/github.com/spf13/cobra-1.1.3
Bump github.com/spf13/cobra from 1.1.2 to 1.1.3
2021-02-16 12:18:40 +01:00
dependabot[bot]
763695de5c Bump github.com/spf13/cobra from 1.1.2 to 1.1.3
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.2 to 1.1.3.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.1.2...v1.1.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-11 05:52:43 +00:00
Daniel Holbach
6ff5722728 Merge pull request #304 from weaveworks/dependabot/go_modules/github.com/spf13/cobra-1.1.2
Bump github.com/spf13/cobra from 1.1.1 to 1.1.2
2021-02-10 12:40:27 +01:00
dependabot[bot]
472934e958 Bump github.com/spf13/cobra from 1.1.1 to 1.1.2
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.1 to 1.1.2.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.1.1...v1.1.2)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-10 05:53:05 +00:00
Daniel Holbach
b7f29c76ce Merge pull request #302 from weaveworks/coc
Point to CNCF Code of Conduct
2021-02-08 17:40:40 +01:00
Daniel Holbach
fa4e458f1f Merge pull request #300 from t3mi/master
add podLabels parameter
2021-02-08 16:05:24 +01:00
Daniel Holbach
4fc93d550d Merge pull request #301 from weaveworks/dependabot/github_actions/actions/stale-v3.0.16
Bump actions/stale from v3.0.15 to v3.0.16
2021-02-08 16:04:16 +01:00
Daniel Holbach
6eb9050156 Point to CNCF Code of Conduct 2021-02-08 11:35:50 +01:00
dependabot[bot]
d8b7669ab4 Bump actions/stale from v3.0.15 to v3.0.16
Bumps [actions/stale](https://github.com/actions/stale) from v3.0.15 to v3.0.16.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3.0.15...9d6f46564a515a9ea11e7762ab3957ee58ca50da)

Signed-off-by: dependabot[bot] <support@github.com>
2021-02-08 06:26:07 +00:00
t3mi
d52d78a303 add podLabels parameter 2021-02-07 23:58:55 +02:00
Daniel Holbach
6a8e3f1e98 Merge pull request #298 from weaveworks/dependabot/github_actions/actions/stale-v3.0.15
Bump actions/stale from v3.0.14 to v3.0.15
2021-01-25 10:05:12 +01:00
dependabot[bot]
b39c9011ea Bump actions/stale from v3.0.14 to v3.0.15
Bumps [actions/stale](https://github.com/actions/stale) from v3.0.14 to v3.0.15.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v3.0.14...86561461b92875de77a8b2d2e75f004c826e8f45)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-25 06:54:10 +00:00
Daniel Holbach
fade706cbf Merge pull request #250 from damoon/19-PreferNoSchedule
implement issue-19 add prefer no schedule taint to avoid double draining of pods
2021-01-12 14:28:23 +01:00
David Sauer
5a4e197d27 change taint config to be disabled by default 2021-01-11 18:24:17 +01:00
Daniel Holbach
1320c5d318 Merge pull request #293 from evrardjp/fix-make-helm-chart
Update helm chart README using Make
2021-01-11 16:39:23 +01:00
Jean-Philippe Evrard
0640683fbb Update helm chart README using Make
Without this, it's possible that the helm chart documentation
contains the `image tag` version which might not be equal to
the version in the helm chart, as it's only an example.

This is a confusing, so instead we should use make to edit the
application version everywhere.

This fixes it by updating the Makefile to modify text of the
chart's README using a regex looking for something similar to
a version; then I used the updated makefile to edit the README,
which in turns requires a bump of the version of the chart
itself.
2021-01-11 16:14:18 +01:00
Daniel Holbach
ec1a931a39 Merge pull request #292 from evrardjp/update-helm-chart
Update helm chart
2021-01-11 15:18:50 +01:00
Jean-Philippe Evrard
36308cee91 Update helm chart
Bumping the helm chart with minor version bump, due to minor
version bump of the kured appVersion.
2021-01-11 14:57:42 +01:00
Daniel Holbach
b733d00550 Merge pull request #280 from cnmcavoy/cnmcavoy/helm-updates
Expose the service name and maxUnavailable for rolling updates in helm chart
2021-01-11 14:53:53 +01:00
Daniel Holbach
56e2c12d38 Merge pull request #291 from evrardjp/fix-tagging
Fix automated tagging
2021-01-11 14:29:28 +01:00
Jean-Philippe Evrard
48e7ff28bf Fix automated tagging
Without this patch, the name of the image is not templated, which
cause the action to fail.

This should fix it, by ensuring the image scan action uses a
templated value, instead of incorrectly relying on shell templating,
which doesn't run in the action.
2021-01-11 14:23:14 +01:00
Daniel Holbach
14fcc7bf37 Merge pull request #289 from evrardjp/update-README-for-1.6.0
Update README
2021-01-11 11:51:20 +01:00
Daniel Holbach
5b4e5b8533 Merge pull request #288 from evrardjp/update-versions-testing
Refresh kind cluster versions
2021-01-11 11:39:54 +01:00
Jean-Philippe Evrard
0162288ecf Update README
This will prepare the README for 1.6.0 release, showing the
planned version.
2021-01-11 11:26:23 +01:00
Jean-Philippe Evrard
2e09425a45 Refresh kind cluster versions
Without this patch, we are using outdated images in kind cluster
setup.

This should fix it, by removing 1.17 cluster (which is not tested
anymore), and updating 1.19 images.
2021-01-11 11:16:09 +01:00
Daniel Holbach
5cbca18377 Merge pull request #269 from evrardjp/publish-chart-on-change-not-on-release
Auto-publish helm chart on master change
2021-01-11 10:49:37 +01:00
Daniel Holbach
86fe6ff03e Merge pull request #285 from weaveworks/dependabot/github_actions/nick-invision/retry-v2.4.0
Bump nick-invision/retry from v2.2.0 to v2.4.0
2021-01-08 15:10:30 +01:00
Daniel Holbach
a3b782f86b Merge pull request #268 from evrardjp/prep-1.20
Update for kubernetes 1.20 support
2021-01-08 15:09:37 +01:00
Daniel Holbach
14269023e8 Merge pull request #275 from evrardjp/dont-bump-k8s
Do not bump any k8s module
2021-01-08 15:02:29 +01:00
Daniel Holbach
a1e443a9f3 Merge pull request #276 from evrardjp/vuln-image-fix
Temporarily workaround alpine issue
2021-01-08 15:01:38 +01:00
Daniel Holbach
a2cc24e656 Merge pull request #287 from jack-education/correct-README-schedule-example
Corrected README Setting a schedule configuration example
2021-01-08 11:40:54 +01:00
jack-education
77ca6fda07 Corrected README Setting a schedule configuration example 2021-01-08 00:26:15 +00:00
David Sauer
3a35d6a46c remove taint in case the reboot is not needed anymore 2021-01-06 22:21:41 +01:00
David Sauer
e430b1442a updated README 2021-01-06 21:59:53 +01:00
David Sauer
b3e39418ba cache taint state to avoid unnecessary API calls 2021-01-06 21:51:43 +01:00
David Sauer
34446f949e Allow to disable tainting during pending node reboot by setting the taint name to an empty string. 2021-01-06 21:39:32 +01:00
David Sauer
10d95c426f fixed type & renamed variable 2021-01-06 21:29:35 +01:00
David Sauer
e4c684c3af taint node with PreferNoSchedule to prevent receiving (and double draining) additional pods from other rebooting nodes 2021-01-06 21:23:40 +01:00
David Sauer
204a06ca38 fixed call of log.Fatal instead of log.Fatalf 2021-01-06 21:23:40 +01:00
David Sauer
48897eb0ab avoid indentations to ease readability 2021-01-06 21:23:40 +01:00
dependabot[bot]
84407690c6 Bump nick-invision/retry from v2.2.0 to v2.4.0
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from v2.2.0 to v2.4.0.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-invision/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v2.2.0...7c68161adf97a48beb850a595b8784ec57a98cbb)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 05:58:00 +00:00
Cameron McAvoy
d4893d7bd7 Expose the service name and maxUnavailable for rolling updates in the helm chart 2020-12-17 18:31:28 -05:00
Jean-Philippe Evrard
897834a9db Temporarily workaround alpine issue
Until a new alpine image is created, we should ensure the latest
packages are used, and therefore we should upgrade default
installed packages.

Without this patch, we'll have outdated and vulnerable packages
until a new 3.12 image is released.

This is a problem, as we'll publish broken images.

This should temporarily workaround it, at the expense of larger
images (contains package cache)
2020-12-14 11:20:27 +01:00
Jean-Philippe Evrard
996b1459b1 Do not bump any k8s module
Without this patch, dependabot will still try to bump some k8s
dependencies.

This is a problem, as we need to bump them together, manually.

This should fix it by removing them all from dependabot.
2020-12-14 10:25:52 +01:00
Jean-Philippe Evrard
251c3c8503 Clarify development process for helm charts
Without this, it might be unclear when the chart is published.

This should fix it.
2020-12-11 12:57:47 +01:00
Jean-Philippe Evrard
0bb0cd168b Auto-publish helm chart on master change
We are now testing the helm charts on each PR. They are now
ensured to be passing our tests and reviewed before merging.
This also means that the merged changes in the master branch
are reliable, and therefore can be consumed immediately.

Currently, we are waiting for a release to publish a helm
chart.

This is a problem as it means that the helm chart will
always lag behind, and we'll miss a few semantic versions,
if for example the helm chart is adapted multiple times
before the next release.

This should fix it by ensuring ALL the merged changes in
our helm chart will result in a new published helm chart.
2020-12-10 11:17:25 +01:00
Daniel Holbach
e716e9c2b4 Merge pull request #270 from evrardjp/fix-current-helm-chart
Fix comment spacing
2020-12-09 17:28:08 +01:00
Jean-Philippe Evrard
1362eafb33 Fix comment spacing
Without this patch, chart linting will fail: more than two
spaces are needed before a comment in the helm chart values.

This fixes it by adding one more space, and move the whole block
of comments for consistency.
2020-12-09 16:37:03 +01:00
Jean-Philippe Evrard
c68937b5ff Update for kubernetes 1.20 support
This ensures we bump the code for 1.20.
It updates the testing to ensure kured works on a 1.20 cluster,
removes the testing on 1.17 (as it is now deprecated).
Libraries remain on 1.19, to avoid breaking 1.18 clusters.
2020-12-09 14:54:35 +01:00
Daniel Holbach
e878e0e5b3 Merge pull request #258 from evrardjp/only-use-github-actions
Publish image on tag with github actions
2020-12-07 15:29:36 +01:00
Jean-Philippe Evrard
525f04b492 Publish image on master merged changes
As we are pretty much committed to github actions, we should
probably rely on it to push the images at each commit merged
on the master branch.
2020-12-07 13:57:58 +01:00
Jean-Philippe Evrard
c7542a5d21 Point docs to current golang version
This is to be on par with the previous documentation.
2020-12-07 13:21:25 +01:00
Ciaran Moran
170a792112 DockerHub auth: use local and org secrets 2020-12-07 13:21:25 +01:00
Jean-Philippe Evrard
ea57673373 Publish image on tag
As we are pretty much committed to github actions, we should
probably rely on it to push the images on tag.

This covers the missing bits.
2020-12-07 13:21:25 +01:00
Daniel Holbach
277a8e30cd Merge pull request #262 from evrardjp/fix-force-golang-version
Fix typo in github workflows
2020-12-07 12:57:28 +01:00
Jean-Philippe Evrard
bd0d901d22 Fix typo in github workflows
Without this patch, the PR jobs are broken and no jobs are running.
This was a recently introduced typo in the last refactor of the
PR jobs.

This should fix it, and make the PR test working again.
2020-12-07 12:35:52 +01:00
Daniel Holbach
dcd5ec5325 Merge pull request #220 from weaveworks/dependabot/go_modules/github.com/prometheus/client_golang-1.8.0
Bump github.com/prometheus/client_golang from 1.0.0 to 1.8.0
2020-12-05 16:13:32 +01:00
Daniel Holbach
09d44c9ac1 Merge pull request #259 from evrardjp/force-golang-version
Force golang version
2020-12-02 16:51:16 +01:00
dependabot[bot]
8a9ae1ee9d Bump github.com/prometheus/client_golang from 1.0.0 to 1.8.0
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.0.0 to 1.8.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.0.0...v1.8.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-02 13:59:26 +00:00
Daniel Holbach
67c9cc0fa7 Merge pull request #226 from weaveworks/dependabot/go_modules/github.com/prometheus/common-0.15.0
Bump github.com/prometheus/common from 0.4.1 to 0.15.0
2020-12-02 14:55:49 +01:00
dependabot[bot]
111d1a1a98 Bump github.com/prometheus/common from 0.4.1 to 0.15.0
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.4.1 to 0.15.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.4.1...v0.15.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-02 13:29:19 +00:00
Daniel Holbach
6e6ad21b70 Merge pull request #257 from weaveworks/dependabot/go_modules/github.com/spf13/cobra-1.1.1
Bump github.com/spf13/cobra from 1.0.0 to 1.1.1
2020-12-02 14:25:47 +01:00
dependabot[bot]
db9e716a55 Bump github.com/spf13/cobra from 1.0.0 to 1.1.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.0.0 to 1.1.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.0.0...v1.1.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-02 13:03:21 +00:00
Daniel Holbach
e40a925cf0 Merge pull request #207 from weaveworks/dependabot/go_modules/github.com/sirupsen/logrus-1.7.0
Bump github.com/sirupsen/logrus from 1.2.0 to 1.7.0
2020-12-02 13:59:06 +01:00
Jean-Philippe Evrard
e2dd29748d Force golang version
Without this, golang version used is the golang version decided
by github.

This is a problem, as it might shift over time, without our control.

This fixes it by getting the golang version from the go.mod.
2020-12-01 08:36:35 +01:00
dependabot[bot]
8ab4d7390e Bump github.com/sirupsen/logrus from 1.2.0 to 1.7.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.2.0 to 1.7.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.2.0...v1.7.0)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 12:51:45 +00:00
Daniel Holbach
a13dfbb538 Merge pull request #256 from evrardjp/dependabot-ignore-kubernetes
Do not bump kubernetes with dependabot
2020-11-30 13:13:36 +01:00
Daniel Holbach
c9de90c96d Merge pull request #255 from dholbach/merge-k8s-and-go-updates
Merge k8s and go updates
2020-11-30 12:31:34 +01:00
Jean-Philippe Evrard
b4c8b64c2d Do not bump kubernetes with dependabot
Without this patch, we'll get kubernetes updates.

This is not necessary, and could be even a problem on merge:
those kubernetes updates are done separately, knowingly,
to respect the life cycle of the kubernetes we need
(and stay one version below latest to have a larger coverage
of versions).

We could keep dependabot to update those on a lower frequency,
but that sounds clunky and not great. Instead disable them all,
and rely on the team to do this regular maintenance work.
2020-11-30 12:03:50 +01:00
Daniel Holbach
8344015019 Merge pull request #253 from evrardjp/ensure-python-is-installed
Fix chart linter
2020-11-30 11:11:01 +01:00
Daniel Holbach
31bb5363b2 update versions 2020-11-30 10:51:43 +01:00
Daniel Holbach
4894a86f32 Merge remote-tracking branch 'evrardjp/build-with-golang1.14' into merge-k8s-and-go-updates 2020-11-30 10:42:40 +01:00
Daniel Holbach
21eabe2fa6 Merge remote-tracking branch 'upstream/dependabot/go_modules/k8s.io/apimachinery-0.19.2' into merge-k8s-and-go-updates 2020-11-30 10:33:47 +01:00
Daniel Holbach
459d7c53aa Merge remote-tracking branch 'upstream/dependabot/go_modules/k8s.io/kubectl-0.19.4' into merge-k8s-and-go-updates 2020-11-30 10:31:11 +01:00
Jean-Philippe Evrard
40f5eac8aa Simplify action code
There are lots of duplicated code in this workflow.
This fixes it by making a unique job with parameters. The
matrix buys us the parallelisation and the fail-fast.
2020-11-30 10:30:41 +01:00
Jean-Philippe Evrard
1b54c4bc04 Fix chart linter
Without this patch, the lint action incorrectly returns everything
is fine.

This is a problem, as lint effectively is not running, and
therefore we could merge broken charts.

This fixes it by updating to the latest practices you can find
in the official chart-repo-actions.

(See the official example in
i1a9640d998/.github/workflows/lint-test.yaml)
2020-11-30 10:05:02 +01:00
Daniel Holbach
ef7a7f6320 Merge pull request #251 from weaveworks/dependabot/github_actions/nick-invision/retry-v2.2.0
Bump nick-invision/retry from v1 to v2.2.0
2020-11-30 09:07:14 +01:00
dependabot[bot]
876f72fa50 Bump nick-invision/retry from v1 to v2.2.0
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from v1 to v2.2.0.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-invision/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v1...fb3bca3fb54f6488d7508c8d1eeb64b94efd5a93)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-30 07:07:20 +00:00
Daniel Holbach
c62fa36259 Merge pull request #241 from evrardjp/fix-incoherences-in-actions-names
Cleanup github actions
2020-11-27 16:58:00 +01:00
Jean-Philippe Evrard
ba54b199b8 Clarify development process
Without this, it's a little bit hard to grasp how things
are interconnected. This should clarify things.
2020-11-27 16:23:24 +01:00
Jean-Philippe Evrard
679f45c321 Cleanup github actions
- Made all the file extensions ".yaml"
- Regrouped actions together to make it easy to see when they
  are useful: on-pr is useful at every PR, on-tag when we are
  ready to tag next image, on-pr-chart when we have a PR to
  modify the chart with the published image, on-release when
  we have released and need to publish the final helm chart
- Regrouped periodic jobs together, to deal with stale prs/issues
  and ensuring that our helm chart always works.
2020-11-27 14:41:38 +01:00
Daniel Holbach
de4e9a9bd9 Merge pull request #249 from evrardjp/produce-more-logs-for-stopped-containers
Add more logs into gates
2020-11-27 13:49:17 +01:00
Jean-Philippe Evrard
81ee206a87 Add more logs into gates
This will be necessary to find out why some docker containers fail
to come back up in github actions.
2020-11-27 13:31:20 +01:00
Daniel Holbach
77594f2e31 Merge pull request #248 from evrardjp/add-shellcheck
Add Shellcheck
2020-11-27 12:52:25 +01:00
Daniel Holbach
36a9e4e3d6 Merge pull request #247 from evrardjp/make-shellcheck-happy
Fix shellcheck issue
2020-11-27 12:49:21 +01:00
Jean-Philippe Evrard
98b547a66e Add Shellcheck
Ensures our bash is neat!
2020-11-27 12:23:39 +01:00
Jean-Philippe Evrard
1165cfe6f4 Fix shellcheck issue
Without this, shellcheck will complain about double quotes
missing.
2020-11-27 12:12:39 +01:00
Daniel Holbach
91a8ed0638 Merge pull request #246 from evrardjp/separate-debug-output
Improve coordinated reboot output
2020-11-27 11:38:34 +01:00
Jean-Philippe Evrard
67ea5922f4 Improve coordinated reboot output
When a failure is happening and the cluster doesn't manage to
be back up on time, we exit 1, and don't show docker logs.

This is a problem, as we would benefit from a detailed docker
output on those cases, when debugging.

This fixes it by ensuring the logging is always done at the
exit of the script.
2020-11-27 10:59:14 +01:00
Daniel Holbach
88b8b5d223 Merge pull request #181 from evrardjp/kustomize-kind-tests
Add manifests testing
2020-11-27 09:43:07 +01:00
Daniel Holbach
645ca7f88f Merge pull request #242 from weaveworks/dependabot/github_actions/nick-invision/retry-v2.2.0
Bump nick-invision/retry from v1 to v2.2.0
2020-11-27 09:40:34 +01:00
Daniel Holbach
f152a15552 Merge pull request #184 from evrardjp/multiple-k8s-versions
Increase test matrix for smoke tests
2020-11-27 09:36:18 +01:00
dependabot[bot]
470b887ea4 Bump nick-invision/retry from v1 to v2.2.0
Bumps [nick-invision/retry](https://github.com/nick-invision/retry) from v1 to v2.2.0.
- [Release notes](https://github.com/nick-invision/retry/releases)
- [Changelog](https://github.com/nick-invision/retry/blob/master/.releaserc.js)
- [Commits](https://github.com/nick-invision/retry/compare/v1...fb3bca3fb54f6488d7508c8d1eeb64b94efd5a93)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-27 06:12:15 +00:00
Jean-Philippe Evrard
9ca74a6062 Simplify manifest testing
We don't need to test with kustomize, manifest testing is good
enough, as we just test that the manifest are correct, not that
they are functional (which would require a change in the poll time).
2020-11-26 14:14:18 +01:00
Jean-Philippe Evrard
7f379ac920 Add kustomize testing
This extends our test coverages for kured-* manifest changes on PRs,
and any eventual changes in kubernetes/kubectl on periodics.

Signed-off-by: Jean-Philippe Evrard <open-source@a.spamming.party>
2020-11-26 09:46:07 +01:00
Jean-Philippe Evrard
fa9991f929 Increase kubernetes versions test matrix for smoke tests
This allows us to test this branch with multiple kubernetes
versions.
2020-11-26 09:41:32 +01:00
Daniel Holbach
596394db79 Merge pull request #183 from evrardjp/helm-smoke-test
Add smoke/basic functional test
2020-11-26 09:40:18 +01:00
Jean-Philippe Evrard
c9367eeff5 Always have latest helm binary installed
This will ease our maintenance.
2020-11-26 09:19:41 +01:00
Daniel Holbach
8ad6bb7c24 Merge pull request #240 from weaveworks/dependabot/github_actions/actions/stale-v3.0.14
Bump actions/stale from v1 to v3.0.14
2020-11-26 08:57:34 +01:00
Daniel Holbach
722db47b2d Merge pull request #212 from DaniJG/master
GH-125, add additional parameters for the drain/reboot slack message template
2020-11-26 08:53:29 +01:00
dependabot[bot]
3f2027da32 Bump actions/stale from v1 to v3.0.14
Bumps [actions/stale](https://github.com/actions/stale) from v1 to v3.0.14.
- [Release notes](https://github.com/actions/stale/releases)
- [Commits](https://github.com/actions/stale/compare/v1...87c2b794b9b47a9bec68ae03c01aeb572ffebdb1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-26 06:26:14 +00:00
Daniel Jimenez Garcia
51cab0dedc rename message template parameters so they are not related to slack 2020-11-25 16:20:54 +00:00
Daniel Jimenez Garcia
f059cec794 GH-125, add additional parameters to override the drain/reboot slack messages 2020-11-25 16:19:31 +00:00
Daniel Holbach
2fef8b1b12 Merge pull request #206 from chentex/time-wrap
Added support for time wrap in timewindow.Contains
2020-11-25 10:28:57 +01:00
Daniel Holbach
e9a7c4535a Merge pull request #224 from evrardjp/auto-expire-issues
Auto expire issues and PRs
2020-11-25 10:14:45 +01:00
Daniel Holbach
da60edbe7b Merge pull request #229 from weaveworks/dependabot/github_actions/helm/kind-action-v1.1.0
Bump helm/kind-action from v1.0.0 to v1.1.0
2020-11-25 10:12:54 +01:00
Daniel Holbach
a6040aa12d Merge pull request #230 from weaveworks/dependabot/github_actions/helm/chart-testing-action-v2.0.1
Bump helm/chart-testing-action from v1.0.0 to v2.0.1
2020-11-25 10:10:05 +01:00
Daniel Holbach
685f32881b Merge pull request #235 from dholbach/prep-1.5.1-release
Prepare 1.5.1 release
2020-11-24 15:34:27 +01:00
Daniel Holbach
1931b9b939 Merge pull request #238 from dholbach/rename-annotationTTL-in-chart
rename annotation-ttl to lock-ttl in all places, follow-up to #213
2020-11-24 09:55:21 +01:00
Daniel Holbach
32aa77f75b rename annotation-ttl to lock-ttl in all places, follow-up to #213 2020-11-24 09:28:57 +01:00
Daniel Holbach
4b1e4036e3 Merge pull request #237 from weaveworks/drain-grace
Drain: allow pods grace period to terminate
2020-11-24 07:46:05 +01:00
Bryan Boreham
1ba3acab98 Drain: allow pods grace period to terminate
The default of 0 is taken as "delete immediately", which is
not appropriate.
2020-11-23 18:07:56 +00:00
Daniel Holbach
038a3412b1 Prepare 1.5.1 release 2020-11-23 10:47:16 +01:00
dependabot[bot]
84b62ba7ec Bump k8s.io/kubectl from 0.18.8 to 0.19.4
Bumps [k8s.io/kubectl](https://github.com/kubernetes/kubectl) from 0.18.8 to 0.19.4.
- [Release notes](https://github.com/kubernetes/kubectl/releases)
- [Commits](https://github.com/kubernetes/kubectl/compare/v0.18.8...v0.19.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 07:10:36 +00:00
dependabot[bot]
cc4a4f5161 Bump helm/chart-testing-action from v1.0.0 to v2.0.1
Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from v1.0.0 to v2.0.1.
- [Release notes](https://github.com/helm/chart-testing-action/releases)
- [Commits](https://github.com/helm/chart-testing-action/compare/v1.0.0...b0d4458c71155b54fcf33e11dd465dc923550009)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 07:06:39 +00:00
dependabot[bot]
8a29c218da Bump helm/kind-action from v1.0.0 to v1.1.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from v1.0.0 to v1.1.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.0.0...7a937c0fb648064a83b8b9354151e5e543d9fcec)

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-16 07:06:38 +00:00
Daniel Holbach
64202ff440 Merge pull request #185 from evrardjp/release-helper
Release helper
2020-11-09 16:43:12 +01:00
Daniel Holbach
08ae57579c Merge pull request #221 from evrardjp/lint-job
Add Lint job in github actions
2020-11-09 13:22:26 +01:00
Jean-Philippe Evrard
2e5ea66e91 Add lint job
In the past, we had lint issues which were merged into the code,
and/or lint changed without us adapting our code.

This should allow us to stay on top of linting issue by
highlighting them in PRs.
2020-11-09 13:11:58 +01:00
Daniel Holbach
7461ab8d95 Merge pull request #222 from evrardjp/make-lint-happier-for-pkg-folder
Make go lint on pkg folder happier
2020-11-09 11:50:58 +01:00
Daniel Holbach
aa49cfd8c4 Merge pull request #215 from evrardjp/make-lint-happier
Make go lint on cmd folder happier
2020-11-09 11:49:51 +01:00
Bryan Boreham
4c31184422 Merge pull request #213 from mvisonneau/lock_ttl
Replaced --annotationTTL with --lockTTL and fixed bug
2020-11-06 11:31:19 +00:00
Jean-Philippe Evrard
8a0f38ac2a Auto expire issues and PRs
Without this patch, we might hold old issues and PR for a long
time. Instead we should close them. People can reopen if necessary.

This would show that we have a proper triage process, and a proper
way to handle those.
2020-11-05 11:23:05 +01:00
Daniel Holbach
6177c3a996 Merge pull request #217 from weaveworks/post-210-cleanup
Clean up deps, update docs to explain state post-210
2020-11-05 11:10:36 +01:00
Jean-Philippe Evrard
5d88e6c6db Make lint happier in pkg folder
Without this patch, lint will complain about a few cosmetic details.
2020-11-05 11:01:49 +01:00
Jean-Philippe Evrard
7091debe23 Make lint happier
Without this, golint is complaining about a few cosmetic changes.
This solves it, and is necessary if we want to add a lint test
in CI.
2020-11-05 10:14:39 +01:00
Jean-Philippe Evrard
ce6075c800 Remove prom-active-alerts
Prom-active-alerts command is not used, not tested, and
currently broken. Let's remove it.
2020-11-05 10:13:50 +01:00
Daniel Holbach
4ed5b823fc update docs following #210 2020-11-04 12:09:20 +01:00
Daniel Holbach
cadb6c263f run 'go mod tidy' 2020-11-04 12:07:05 +01:00
Daniel Holbach
d5fe4fbaec Merge pull request #210 from evrardjp/remove-kubectl-bin
feature: Remove kubectl bin
2020-11-04 12:01:47 +01:00
Maxime VISONNEAU
9648d1d759 Replaced --annotationTTL with --lockTTL and made it work correctly 2020-10-30 10:39:18 +00:00
Jean-Philippe Evrard
e5a2d4acc7 Refactor drain/uncordon
Moving the drainer object close to its usage is more readable.
2020-10-29 11:45:20 +01:00
Jean-Philippe Evrard
e1ba9a975e Remove kubectl exception in container scanning
Because we now have a builtin kubectl, we don't need that
security exception.
2020-10-29 09:56:32 +01:00
Jean-Philippe Evrard
19bf5bf224 Bump prometheus
This is required by the vendoring of kubectl.
2020-10-15 13:02:39 +02:00
Jean-Philippe Evrard
72c4112e20 Use kubectl as library instead of calling from cli 2020-10-15 13:02:35 +02:00
Vicente Zepeda Mas
2f740b7f9a Added support for time wrap in timewindow.Contains
Add test scenarios to test new cases
Organize test scenarios chronologically

Signed-off-by: Vicente Zepeda Mas <vzepedamas@suse.com>
2020-09-28 13:58:43 +02:00
dependabot[bot]
cf58d9a777 Bump k8s.io/apimachinery from 0.18.8 to 0.19.2
Bumps [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) from 0.18.8 to 0.19.2.
- [Release notes](https://github.com/kubernetes/apimachinery/releases)
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.18.8...v0.19.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-17 05:53:07 +00:00
Daniel Holbach
553e061b94 Merge pull request #199 from evrardjp/ci/add-security-scanner
feat: Add security scanning into CI
2020-09-14 14:50:34 +02:00
Daniel Holbach
598964b0f6 Merge pull request #198 from evrardjp/fix/DKL-DI-0004
fix: Follow DKL-DI-0004 guideline
2020-09-14 12:32:40 +02:00
Jean-Philippe Evrard
b0bd603931 fix: Follow DKL-DI-0004 guideline
Without this patch, we need to build a cache, remove it.
Since apk allows to work with no-cache and won't leave artifacts,
we should use it.

This will make the dockle best practices scanner happier.
2020-09-11 16:53:59 +02:00
Jean-Philippe Evrard
8961cbf262 feat: Add security scanning into CI
Without this patch, there is no way we can see, in the development
process, if the image we are about to publish is insecure.

This is a problem as we might be releasing new versions of kured
with outdated base image which contains vulnerabilities.

This fixes it by creating a job which will show any eventual
vulnerability.
2020-09-10 15:16:05 +02:00
Daniel Holbach
13708ad1dc Merge pull request #194 from dholbach/add-missing-quote
add missing quote - thanks Karan Arora for reporting
2020-09-09 15:55:06 +02:00
Daniel Holbach
83dccea063 add missing quote - thanks Karan Arora for reporting 2020-09-09 15:13:57 +02:00
Daniel Holbach
10e8dbda97 Merge pull request #166 from smueller18/param-alert-filterregexp
Remove quote for parameter alert-filter-regexp
2020-09-04 19:53:56 +02:00
Stephan Müller
a6c0a4a7cb Bump helm chart version 2020-09-04 17:34:26 +02:00
Stephan Müller
8b4b92f237 Remove quote for parameter alert-filter-regexp 2020-09-04 17:33:47 +02:00
Daniel Holbach
ba8c830d63 Merge pull request #192 from dholbach/prep-1.5.0-release
Prepare 1.5.0 release
2020-09-01 15:08:10 +02:00
Daniel Holbach
19d7dee4aa Prepare 1.5.0 release
- update chart versions
	- update release documentation
	- Christian and David are the chart maintainers
2020-09-01 11:38:17 +02:00
Daniel Holbach
7408cebb6b Merge pull request #187 from weaveworks/dependabot/github_actions/helm/chart-testing-action-v1.0.0
Bump helm/chart-testing-action from v1.0.0-rc.2 to v1.0.0
2020-09-01 10:59:14 +02:00
Daniel Holbach
cd0f3cee12 Merge pull request #188 from weaveworks/dependabot/github_actions/helm/kind-action-v1.0.0
Bump helm/kind-action from v1.0.0-rc.1 to v1.0.0
2020-09-01 10:58:07 +02:00
dependabot[bot]
dadf2cdd48 Bump helm/kind-action from v1.0.0-rc.1 to v1.0.0
Bumps [helm/kind-action](https://github.com/helm/kind-action) from v1.0.0-rc.1 to v1.0.0.
- [Release notes](https://github.com/helm/kind-action/releases)
- [Commits](https://github.com/helm/kind-action/compare/v1.0.0-rc.1...3af270e3dacc4feded63d810def7e19de77cba72)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-01 08:53:51 +00:00
dependabot[bot]
15c5c47b49 Bump helm/chart-testing-action from v1.0.0-rc.2 to v1.0.0
Bumps [helm/chart-testing-action](https://github.com/helm/chart-testing-action) from v1.0.0-rc.2 to v1.0.0.
- [Release notes](https://github.com/helm/chart-testing-action/releases)
- [Commits](https://github.com/helm/chart-testing-action/compare/v1.0.0-rc.2...96a4323c6cfa90ddea6e02db43143cd80124a7fa)

Signed-off-by: dependabot[bot] <support@github.com>
2020-09-01 08:53:50 +00:00
Daniel Holbach
012e680061 Merge pull request #186 from evrardjp/dependabot
Add dependabot
2020-09-01 10:53:24 +02:00
Jean-Philippe Evrard
1cab9a1d28 Add dependabot
Without this patch, our deps will have to be manually maintained.

This should fix it.
2020-08-31 15:58:21 +02:00
Jean-Philippe Evrard
6793b0882f Release helper
This automates the manifest and helm chart version handling.
Just pass the organisation and version in the make command to
update the manifests/helm charts.

This does not automate the helm chart version and does not
create a manifest used in the release process.
2020-08-28 16:46:53 +02:00
Jean-Philippe Evrard
ad8c0053e2 Update to golang 1.15 2020-08-28 14:35:58 +02:00
Daniel Holbach
549bb9b415 Merge pull request #165 from dholbach/prep-for-k8s-1.19
Prepare for k8s release 1.19 (Aug 25)
2020-08-28 13:49:48 +02:00
Daniel Holbach
3ebc224958 update alpine to 3.12, k8s 1.18.8 2020-08-28 10:27:39 +02:00
Jean-Philippe Evrard
3d75f1b37a Add smoke/basic functional test
Without this patch, we don't test on release whether kured actually
works and behave well.

This is a problem, as a functional issue could have been hidden by
a recent change, as our testing is minimalist (only test the
usability, not the functionality).
Instead of testing manually, we should ensure this in CI.

This fixes it by adding a github action which tests the previously
built artifacts before publishing a release. The job consume the helm
chart in our code tree  (note: this relies on the last released image),
and run a functional test triggering a coordinated restart of a
whole 5 node cluster deployed with kind, through github actions.

Note: The github action needs to reset docker configuration, else
the reboot of the node (a docker container in kind) will fail.
It will be correctly triggered, but the node will not come back up,
with its systemd log mentioning: "Failed to attach 1 to compat systemd cgroup".
2020-08-28 09:25:44 +02:00
Daniel Holbach
16109017ce Prepare for k8s release 1.19 (Aug 25)
This is #152, #139, #127 in disguise.

	Maybe this time let it simmer a bit longer until the k8s
	release is there?
2020-08-19 17:30:00 +02:00
Daniel Holbach
b024898ed6 Merge pull request #171 from dholbach/prep-1.4.5
Prep 1.4.5 release
2020-08-05 11:21:15 +02:00
Daniel Holbach
19b177372e document how releases are town wrt Helm bits 2020-08-05 11:03:32 +02:00
Daniel Holbach
50f8d037fc bump versions for 1.4.5 release 2020-08-05 11:01:22 +02:00
Daniel Holbach
aea93fd0ac Merge pull request #169 from audunsolemdal/master
Chart: Support extraEnvVars
2020-07-29 15:09:53 +02:00
audunsolemdal
4dd15e3874 Use nindent, not indent 2020-07-29 09:37:31 +02:00
audunsolemdal
c1abad8a92 chart: update readme 2020-07-28 15:07:48 +02:00
audunsolemdal
25491c801b Bump chart version 2020-07-28 15:01:03 +02:00
audunsolemdal
9e42c8ec15 Add missing 'end' 2020-07-28 14:59:23 +02:00
Daniel Holbach
29eb862335 Merge pull request #168 from dholbach/update-to-last-release
update install instructions to use latest
2020-07-25 18:09:53 +02:00
audunsolemdal
d7e58bef3e Chart: Support extraEnvVars 2020-07-21 17:35:59 +02:00
Daniel Holbach
949aa3acf7 update install instructions to use latest 2020-07-21 10:23:49 +02:00
Daniel Holbach
2762837dac Merge pull request #164 from dholbach/1.4.4-release
Prep for 1.4.4 release
2020-07-01 11:27:51 +02:00
Daniel Holbach
d507361a45 update chart version 2020-07-01 10:49:12 +02:00
Daniel Holbach
1d1f22c93b Prep for 1.4.4 release
Drop bit in the docs about updating image tag - not necessary
	if you use the instructions.
2020-07-01 10:43:06 +02:00
Daniel Holbach
644aca3fa0 Merge pull request #163 from ckotzbauer/chart-fixes
Additional chart changes for service-handling
2020-06-30 20:28:30 +02:00
Christian Kotzbauer
59b078f38d bump and fix
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-30 19:21:06 +02:00
Christian Kotzbauer
36cef41c20 split matchLabels template
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-30 19:18:47 +02:00
Christian Kotzbauer
eb617adc2b restructured and improved service
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-30 19:15:32 +02:00
Daniel Holbach
2afd04ddd3 Merge pull request #162 from ckotzbauer/chart-fixes
Several small chart fixes
2020-06-30 18:25:53 +02:00
Christian Kotzbauer
3eb7f17b3a bumped kured to upcoming 1.4.3
fixed servicemonitor indent
fixed quotes for arguments

Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-30 18:00:05 +02:00
Daniel Holbach
a87e7b28d2 Merge pull request #158 from dholbach/use-github-token
Use GitHub token
2020-06-30 10:42:10 +02:00
Daniel Holbach
c6f341ec16 update things for 1.4.2 release 2020-06-30 10:37:39 +02:00
Daniel Holbach
14bda85a03 Use GITHUB_TOKEN for releasing chart
https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret
2020-06-30 10:35:13 +02:00
Daniel Holbach
d6f7609081 Merge pull request #157 from dholbach/update-readme
Update readme
2020-06-30 10:19:57 +02:00
Daniel Holbach
2b4830a0f6 make markdownlint happier 2020-06-30 09:58:43 +02:00
Daniel Holbach
688ba8ef72 update version 2020-06-30 09:53:44 +02:00
Daniel Holbach
aebe9463fd Merge pull request #155 from ckotzbauer/chart-release-1.4.1
prepare chart-release for 1.4.1
2020-06-30 09:30:59 +02:00
Christian Kotzbauer
900f58ae2d prepare chart-release for 1.4.1
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-29 17:22:51 +02:00
Daniel Holbach
b177a9f6eb Merge pull request #152 from dholbach/revert-139
Revert #139
2020-06-26 17:37:43 +02:00
Daniel Holbach
8fafad18bb Revert #139
This is a follow-up to #150, so we can get a 1.4.x release
	out that will be geared towards k8s 1.1[6-8].

	Update to latest 1.17 kubectl: 1.17.7.
2020-06-26 17:30:01 +02:00
Daniel Holbach
cc806b886c Merge pull request #150 from ckotzbauer/initial-helm-chart
Initial Kured Helm-Chart
2020-06-26 15:52:28 +02:00
Christian Kotzbauer
b78ba8e73b allow multiple blockingPodSelector and rebootDays to be defined
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-22 16:21:30 +02:00
Christian Kotzbauer
1ddd45d90b updated maintainers and version
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-22 15:20:48 +02:00
Christian Kotzbauer
a815867584 updated chart docs
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 12:04:27 +02:00
Christian Kotzbauer
d271165496 rearrange default values
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 10:50:54 +02:00
Christian Kotzbauer
2bb7b7937e add service and serviceMonitor
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 10:46:54 +02:00
Christian Kotzbauer
2afa0a9da7 add cli-flags as config-object
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 10:17:50 +02:00
Christian Kotzbauer
ab0b5d137c add affinity support; removed duplicate restartPolicy
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 09:52:41 +02:00
Christian Kotzbauer
d3ea5639f4 fix role inconsistencies
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 09:49:20 +02:00
Christian Kotzbauer
02bb6d650e use template function for labels
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 09:45:39 +02:00
Christian Kotzbauer
c473caafc8 remove autolock feature
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 09:37:44 +02:00
Christian Kotzbauer
a574a67c61 add unmodified chart from stable repo
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 09:36:07 +02:00
Christian Kotzbauer
4420dc82d6 add chart github-actions
Signed-off-by: Christian Kotzbauer <christian.kotzbauer@gmail.com>
2020-06-20 09:35:35 +02:00
Daniel Holbach
cdbcf8d4a0 Merge pull request #149 from dholbach/circleci-ignore-ghpages
make sure Circle CI ignores the 'gh-pages' branch
2020-06-17 12:50:56 +02:00
Daniel Holbach
3508110f52 make sure Circle CI ignores the 'gh-pages' branch 2020-06-17 12:27:01 +02:00
Bryan Boreham
ec75533394 Merge pull request #119 from michalschott/annotationTTL
Adding --annotation-ttl for automatic unlock
2020-05-20 11:30:44 +01:00
Daniel Holbach
edeefcd2b9 Merge pull request #139 from dholbach/move-to-1.18
replay changes from #127
2020-05-11 16:36:51 +02:00
Michal Schott
cf03bc587c Adding unit tests for ttlExpired. 2020-05-05 22:37:18 +02:00
Michal Schott
59a6700add Renaming flag as suggested. 2020-05-05 20:52:10 +02:00
Michal Schott
64ebf53264 Typo in logic. 2020-05-05 14:32:41 +02:00
Michal Schott
615e3d4840 Calculate time difference easier. 2020-05-05 14:10:23 +02:00
Michal Schott
1257d97ead Be clean when this feature is disabled. 2020-05-05 14:10:23 +02:00
Michal Schott
1fc2522c0f Removing spurious change. 2020-05-05 14:10:23 +02:00
Michal Schott
7fb16fed9b Adding annotationTTL. 2020-05-05 14:10:22 +02:00
Daniel Holbach
72a31030db replay changes from #127 2020-05-01 09:07:16 +02:00
Daniel Holbach
f2a0f8e20d Merge pull request #138 from dholbach/check-links
add Github Action to check links
2020-04-30 18:07:30 +02:00
Daniel Holbach
c571a775df add Github Action to check links 2020-04-30 08:50:33 +02:00
Daniel Holbach
92ca18ff6e Merge pull request #133 from dholbach/prep-1.4.0-release
Update for 1.4.0 release
2020-04-29 18:59:39 +02:00
Daniel Holbach
4c66c69b77 Merge pull request #135 from dholbach/go-back-to-1.17
Revert parts of #127, move to client-go/kubectl 1.17
2020-04-29 18:56:38 +02:00
Daniel Holbach
779a9e27d4 update compatibility matrix re: #135 2020-04-29 15:22:54 +02:00
Daniel Holbach
ecd73fc68f Update for 1.4.0 release
Tested on minikube with k8s 1.16.8, 1.17.4, 1.18.1
2020-04-29 15:21:10 +02:00
Daniel Holbach
8e73cf224d Revert parts of #127, move to client-go/kubectl 1.17
After the release of kured 1.4.0 we should be able to go back.

	This was decided in our meeting
(https://docs.google.com/document/d/1bsHTjHhqaaZ7yJnXF6W8c89UB_yn-OoSZEmDnIP34n8/edit#heading=h.8cgszb6vuhza)

	Let's go with supporting 1.1[678] in this release.
2020-04-22 18:32:25 +02:00
Daniel Holbach
3fbc98ed57 Merge pull request #134 from crgarcia12/crgar/send-telemetry-before-rebooting
print the node id when commanding a reboot
2020-04-20 11:31:55 +02:00
Carlos Garcia Lalicata
800e9e19fb pring node id when commanding reboot, so that any monitoring tool can catch it and act on it 2020-04-20 10:58:35 +02:00
Daniel Holbach
a2c5eb7b57 Merge pull request #131 from evrardjp/build-with-1.14
Unpin base docker image
2020-04-08 18:30:30 +02:00
Jean-Philippe Evrard
247863109d Bump to golang 1.14 2020-04-08 18:18:36 +02:00
Jean-Philippe Evrard
bdd20c963c Unpin base docker images
The upside is that image building will always use the latest
stable version of the alpine OS, which might include security fixes.
The downside is that it's less reproducible, because the full
version isn't given.

While this commit isn't necessary per se, it's nice to have
an image that will be up to date, when we'll build it.
2020-04-08 18:17:58 +02:00
Daniel Holbach
ff73068789 Merge pull request #130 from weaveworks/fix-129
Update Go version to 1.13
2020-04-08 18:06:06 +02:00
Daniel Holbach
d6e7a42c0d Update Go version to 1.13
New Go image is recommended in https://circleci.com/docs/2.0/circleci-images/

	fixes: #129
2020-04-08 18:01:24 +02:00
Daniel Holbach
2392170b8e Merge pull request #127 from dholbach/fix-123
Update to match k8s 1.18.0
2020-04-08 17:38:07 +02:00
Daniel Holbach
0a419d0d34 update to 1.18.0 API
confirmed by running https://github.com/kubernetes-sigs/clientgofix

	closes: #123
2020-03-30 10:11:30 +02:00
Daniel Holbach
b75aec87d7 update urls to match k8s 1.18 release 2020-03-30 10:11:30 +02:00
Daniel Holbach
7ef25be46c Update client-go to 1.18
go get k8s.io/client-go@kubernetes-1.18.0
	go mod tidy
2020-03-30 10:11:30 +02:00
Daniel Holbach
67499fbdf2 Merge pull request #126 from dholbach/document-meetings
add information about monthly meetings
2020-03-30 10:10:24 +02:00
Daniel Holbach
c1fd783913 add information about monthly meetings 2020-03-27 11:08:53 +01:00
Daniel Holbach
834e7d191d Merge pull request #118 from dholbach/document-slack
point to kured Slack
2020-03-09 15:57:16 +01:00
Daniel Holbach
b1d0571298 point to kured Slack 2020-03-09 12:52:46 +01:00
Daniel Holbach
63b523e71d Merge pull request #114 from pgroene/patch-2
Keeping alpine fresh
2020-02-27 12:29:48 +01:00
Peter Groenewegen
7e7430f7df Keeping alpine fresh
Updating alpine to the latest version.
Tested this version of alpine and running fine, keeping versions of dependencies up to date.
2020-02-25 11:09:28 -08:00
Daniel Holbach
2a0ad5384d Merge pull request #113 from dholbach/prep-1.3.0
Prepare 1.3.0 release
2020-02-25 11:22:03 +01:00
Daniel Holbach
43737e35d5 Prepare 1.3.0 release
Also point out how to create the dockerhub.yaml file,
	update other release related instructions.

	closes: #97
2020-02-25 11:20:39 +01:00
Daniel Holbach
b337c9d6be Merge pull request #111 from pgroene/patch-1
Use newer version of k8s client tools
2020-02-21 18:45:14 +01:00
Daniel Holbach
95ec750a31 Merge pull request #112 from dholbach/add-release-docs
add development docs
2020-02-21 18:39:31 +01:00
Peter Groenewegen
fdc960b84d Merge pull request #1 from weaveworks/attempt-k8s-1.15
update to client-go as well
2020-02-21 09:22:43 -08:00
Daniel Holbach
72a35388a6 add development docs 2020-02-21 18:03:57 +01:00
Daniel Holbach
5dd0de8f78 update compability matrix 2020-02-21 17:03:30 +01:00
Daniel Holbach
37a5ece356 update client-go, run 'go mod tidy' 2020-02-21 16:11:44 +01:00
Daniel Holbach
7975a78025 update to latest kubectl 1.15 2020-02-21 16:11:10 +01:00
Peter Groenewegen
f86514c1e6 Use newer version of k8s client tools
The version of k8s has security vulnerabilities, updating to a newer version

Tested this this version to on our clusters
2020-02-19 07:55:03 -08:00
Bryan Boreham
f6e4062e13 Merge pull request #86 from weaveworks/tidy-modules
Update go.mod and go.sum after 'go mod vendor'
2019-11-26 17:35:54 +00:00
Praveen Adusumilli
f2ae01120a Upgrading to latest alpine (#100)
* Upgrading to latest alpine 3.10.3
2019-11-26 16:53:43 +00:00
Bryan Boreham
db7b42f5ee Merge pull request #87 from Nighthawk22/master
Added slack channel name configuration
2019-11-26 16:50:24 +00:00
Nighthawk22
5c21206bdb Merge branch 'master' into master 2019-10-28 10:56:13 +01:00
leigh capili
4beddb5338 Reboot only within time window specified on commandline (#66)
Reboot only within time window specified on commandline
2019-10-23 22:23:51 -06:00
Maximilian Zollneritsch
7944fd2639 Updated readme and daemonset with slack channel parameter 2019-09-11 14:03:13 +02:00
Maximilian Zollneritsch
d1315c691e Added slack channel name configuration 2019-09-11 13:59:09 +02:00
Bryan Boreham
57ef32d2d1 Update go.mod and go.sum after 'go mod vendor' 2019-09-05 12:28:27 +00:00
Adam Harrison
4d2b8763d3 Merge pull request #75 from weaveworks/support-k8s-1.14
Support k8s 1.14
2019-05-22 15:46:50 +01:00
Adam Harrison
b4fc6bac27 Update daemonsetlock to use AppsV1 2019-05-17 10:15:23 +01:00
Adam Harrison
423f4afc9c Update compatibility matrix 2019-05-16 17:07:17 +01:00
Adam Harrison
8d809333b3 Update embedded kubectl to v1.14.1 2019-05-16 17:07:17 +01:00
Adam Harrison
6a65a535c0 Update client-go, api, apimachinery to 1.14.x
go get k8s.io/client-go@v11.0.0
    go get k8s.io/apimachinery@release-1.14
    go get k8s.io/api@release-1.14
2019-05-16 16:15:30 +01:00
Adam Harrison
26e1ab8678 Merge pull request #74 from weaveworks/go-modules
Build with golang 1.12 and modules
2019-05-16 16:07:34 +01:00
Adam Harrison
b16c3278b3 Document how to build inside/outside GOPATH 2019-05-16 15:55:44 +01:00
Adam Harrison
ddfb4119b7 Update build instructions for go modules 2019-05-16 15:16:00 +01:00
Adam Harrison
a5a0435e41 Remove go clean
This fails with an error in module mode.
2019-05-16 15:15:32 +01:00
Adam Harrison
f41b121b14 Upgrade to go 1.12 with modules 2019-05-16 14:35:11 +01:00
Adam Harrison
97e4963583 Update docs for 1.2.0 release 2019-05-16 13:53:21 +01:00
Adam Harrison
fc94716ffe Update install instructions to use alternative dockerhub yaml 2019-05-16 11:29:26 +01:00
Adam Harrison
c20c9e987b Merge pull request #73 from weaveworks/remove-spurious-go-get
Remove spurious `go get` from Makefile
2019-05-16 11:04:13 +01:00
Adam Harrison
10443c5178 Remove spurious go get from Makefile 2019-05-16 11:00:21 +01:00
Adam Harrison
1b3d84d360 Correct master kubectl version in README 2019-05-16 10:56:41 +01:00
Adam Harrison
50136cd865 Merge pull request #57 from weaveworks/support-k8s-1.13
Support k8s 1.13
2019-05-16 10:55:59 +01:00
Adam Harrison
69b509f246 Add master to compatibility matrix 2019-05-16 10:51:51 +01:00
Adam Harrison
556789e6c7 Update embedded kubectl to v1.13.6 2019-05-16 10:51:51 +01:00
Adam Harrison
0127675514 Update client-go and transitive dependencies 2019-05-16 10:51:46 +01:00
JJ Jordan
7249f1c573 Reduce silliness 2019-04-18 18:02:13 -07:00
JJ Jordan
357687b053 Fix seconds format in parser, address (an unimportant) corner case 2019-04-18 18:00:29 -07:00
Hidde Beydals
b1370be8f3 Merge pull request #69 from weaveworks/switch-docker-hub
Move image to Docker Hub
2019-04-18 09:51:34 +02:00
Hidde Beydals
de3593799f Move image to Docker Hub 2019-04-17 13:43:47 +02:00
JJ Jordan
3a89e3e058 Add documentation section, params to daemonset, tzdata to docker container 2019-04-09 18:02:11 -07:00
JJ Jordan
972ef4240b Comment 2019-04-04 01:06:03 -07:00
JJ Jordan
334437cdc0 Improve help strings (?) 2019-04-04 01:04:39 -07:00
JJ Jordan
7d85e85db0 weekdays to use a bitmap, add (minimal) tests 2019-04-04 01:02:27 -07:00
JJ Jordan
3f6713fa65 More forgiving inputs 2019-04-02 01:28:59 -07:00
JJ Jordan
170a3a4bac Use time window 2019-04-02 01:23:33 -07:00
Matthias Radestock
521e15cc73 Merge pull request #58 from dholbach/drop-email
weave-users mailing list is closed
2019-01-08 11:58:35 +00:00
Daniel Holbach
84be7929d1 weave-users mailing list is closed: https://groups.google.com/a/weave.works/forum/#!topic/weave-users/0QXWGOPdBfY
Signed-off-by: Daniel Holbach <daniel@weave.works>
2019-01-08 08:18:21 +05:30
Adam Harrison
06b22bc3ad Merge pull request #46 from weaveworks/labelled-pods-can-block-reboots
Allow selected pods to prevent reboots
2019-01-03 11:54:43 +00:00
Adam Harrison
f6f9e7492c Allow selected pods to prevent reboots 2018-11-21 15:03:29 +00:00
Adam Harrison
114c34950b Merge pull request #41 from weaveworks/doc-compat-matrix
Document embedded kubectl/client-go versions
2018-10-30 17:06:54 +00:00
Adam Harrison
048bba446f Document embedded kubectl/client-go versions 2018-10-30 17:04:10 +00:00
Adam Harrison
dcddbfffdc Merge pull request #40 from weaveworks/1.1.0-doc-udpates
Update docs for 1.1.0 release
2018-10-30 15:17:32 +00:00
Adam Harrison
8f8cda2e74 Update docs for 1.1.0 release 2018-10-30 15:15:51 +00:00
Adam Harrison
c8bb178fb9 Merge pull request #39 from weaveworks/nsenter-host-mount-namepace
Enter host mount namespace
2018-10-30 14:40:18 +00:00
Adam Harrison
0cd450b7bc Enter host mount namespace
Use the tools installed in the host to effect reboots, and allow
the execution of commands such as `needs-restart` to determine if
reboots are required.
2018-10-30 11:58:22 +00:00
Adam Harrison
3caedb0ab8 Merge pull request #38 from weaveworks/automate-release-process
Enable CI builds on tags
2018-10-30 11:55:10 +00:00
Adam Harrison
8ed1b575d9 Enable CI builds on tags
So that creating a GitHub release triggers an appropriately versioned
build.
2018-10-30 11:31:14 +00:00
Adam Harrison
56cd1f0a49 Merge pull request #37 from weaveworks/tolerate-master-node-role
Tolerate master node-role NoSchedule taint
2018-10-26 16:12:16 +01:00
Adam Harrison
028109d203 Tolerate master node-role NoSchedule taint 2018-10-26 16:09:24 +01:00
Adam Harrison
97c58c775e Merge pull request #36 from weaveworks/support-k8s-1.12
Support k8s 1.12
2018-10-26 15:41:56 +01:00
Adam Harrison
12cd5cda87 CI build with go 1.11 2018-10-26 15:39:58 +01:00
Adam Harrison
4322c3212a Update embedded kubectl to v1.12.1 2018-10-26 12:50:08 +01:00
Adam Harrison
02d9b54125 Update client-go and transitive dependencies 2018-10-25 18:06:22 +01:00
Marcus Cobden
549be7711f Merge pull request #29 from weaveworks/drain-notify
Notify slack before draining a node
2018-09-24 10:43:10 +01:00
Marcus Cobden
ebf0fb5119 Notify slack before draining a node
Fixes #12
2018-09-04 14:37:34 +01:00
Adam Harrison
5731b98a8a Add warning to Dockerfile re: upgrading kubectl 2018-06-05 18:00:02 +01:00
Adam Harrison
efbb0c3e0d Document version compatibility in release notes 2018-06-05 17:27:26 +01:00
Adam Harrison
908998a70b Update RBAC permissions for kubectl v1.10.3 2018-06-05 17:20:57 +01:00
Adam Harrison
bc3f28d112 Move deployment manifest to apps/v1 2018-06-05 17:06:17 +01:00
Adam Harrison
826fcd2998 Bundle latest v1.10.x kubectl 2018-06-05 17:06:17 +01:00
Adam Harrison
b3f9ddf402 Bump client-go for optimum k8s 1.10 compatibility 2018-06-05 17:06:17 +01:00
Adam Harrison
c42fff3005 Create a :latest tag on build to push to minikube 2018-06-05 17:05:43 +01:00
Adam Harrison
aefc4ea498 Merge pull request #8 from weaveworks/build-on-osx
Don't call `sudo docker` when building on macOS
2018-06-05 16:28:54 +01:00
Adam Harrison
fd752b834a Merge pull request #6 from 3dinfluence/rbac_support
Update provided manifests to support a service account and RBAC
2018-06-05 16:20:28 +01:00
Adam Harrison
b2aa608294 Update permissions for kubectl 1.9.6
The permissions required by `kubectl drain` vary from version
to version; this change brings them into line with the one currently
bundled.
2018-06-05 16:16:46 +01:00
Adam Harrison
170f2ed2fb Restrict update permissions on daemonsets
Kured only needs update permissions on its own daeemonset.
2018-06-05 16:16:28 +01:00
Adam Harrison
152534fcc8 Convert to compact representation 2018-06-05 15:16:45 +01:00
Adam Harrison
741b27cd35 Revert documentation change
The manifest on master is for development, normal users should use a
released version. I'll do a release with RBAC shortly.
2018-06-05 15:14:10 +01:00
Sam Broughton
0e75f74ca8 Don't call sudo docker when building on macOS 2017-12-05 17:12:18 +00:00
David Miller
11780f008a Update provided manifests to support a service account and RBAC
- Added kured service account
- Added kured clusterrole
- Added kured clusterrolebinding
- Updated README.md documentation to include deploying with RBAC support
2017-11-23 11:48:14 -05:00
51 changed files with 4986 additions and 923 deletions

View File

@@ -1,20 +0,0 @@
version: 2
jobs:
build:
working_directory: /go/src/github.com/weaveworks/kured
docker:
- image: circleci/golang:1.8
steps:
- checkout
- setup_remote_docker
- run: go get github.com/golang/dep/cmd/dep
- run: dep ensure
- run: make
- deploy:
name: Maybe push master images
command: |
if [ -z "${CIRCLE_TAG}" -a "${CIRCLE_BRANCH}" == "master" ]; then
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS" quay.io
make publish-image
fi

3
.clomonitor.yml Normal file
View File

@@ -0,0 +1,3 @@
exemptions:
- check: analytics
reason: "We don't track people"

21
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,21 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
# Maintain dependencies for gomod
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
ignore:
- dependency-name: "k8s.io/api"
- dependency-name: "k8s.io/apimachinery"
- dependency-name: "k8s.io/client-go"
- dependency-name: "k8s.io/kubectl"
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"

13
.github/kind-cluster-1.26.yaml vendored Normal file
View File

@@ -0,0 +1,13 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: "kindest/node:v1.26.6"
- role: control-plane
image: "kindest/node:v1.26.6"
- role: control-plane
image: "kindest/node:v1.26.6"
- role: worker
image: "kindest/node:v1.26.6"
- role: worker
image: "kindest/node:v1.26.6"

13
.github/kind-cluster-1.27.yaml vendored Normal file
View File

@@ -0,0 +1,13 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: "kindest/node:v1.27.3"
- role: control-plane
image: "kindest/node:v1.27.3"
- role: control-plane
image: "kindest/node:v1.27.3"
- role: worker
image: "kindest/node:v1.27.3"
- role: worker
image: "kindest/node:v1.27.3"

13
.github/kind-cluster-1.28.yaml vendored Normal file
View File

@@ -0,0 +1,13 @@
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
image: "kindest/node:v1.28.0"
- role: control-plane
image: "kindest/node:v1.28.0"
- role: control-plane
image: "kindest/node:v1.28.0"
- role: worker
image: "kindest/node:v1.28.0"
- role: worker
image: "kindest/node:v1.28.0"

28
.github/scripts/goreleaser-install.sh vendored Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/sh
set -e
RELEASES_URL="https://github.com/goreleaser/goreleaser/releases"
FILE_BASENAME="goreleaser"
test -z "$VERSION" && {
echo "Unable to get goreleaser version." >&2
exit 1
}
test -z "$TMPDIR" && TMPDIR="$(mktemp -d)"
TAR_FILE="$TMPDIR/${FILE_BASENAME}_$(uname -s)_$(uname -m).tar.gz"
export TAR_FILE
(
echo "Downloading GoReleaser $VERSION..."
curl -sfLo "$TAR_FILE" \
"$RELEASES_URL/download/$VERSION/${FILE_BASENAME}_$(uname -s)_$(uname -m).tar.gz"
cd "$TMPDIR"
curl -sfLo "checksums.txt" "$RELEASES_URL/download/$VERSION/checksums.txt"
echo "Verifying checksums..."
sha256sum --ignore-missing --quiet --check checksums.txt
)
tar -xf "$TAR_FILE" -O goreleaser > "$TMPDIR/goreleaser"
rm "$TMPDIR/checksums.txt"
rm "$TAR_FILE"

75
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '24 13 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

82
.github/workflows/on-main-push.yaml vendored Normal file
View File

@@ -0,0 +1,82 @@
# We publish every merged commit in the form of an image
# named kured:<branch>-<short tag>
name: Push image of latest main
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
tag-scan-and-push-final-image:
name: "Build, scan, and publish tagged image"
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- name: Ensure go version
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Find current tag version
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: tags
- name: Setup GoReleaser
run: make bootstrap-tools
- name: Build binaries
run: make kured-release-snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/arm64, linux/amd64, linux/arm/v7, linux/arm/v6, linux/386
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.sha_short }}
- name: Generate SBOM
run: |
.tmp/syft ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.sha_short }} -o spdx > kured.sbom
- name: Sign and attest artifacts
run: |
.tmp/cosign sign -y -r ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.sha_short }}
.tmp/cosign sign-blob -y --output-signature kured.sbom.sig --output-certificate kured.sbom.pem kured.sbom
.tmp/cosign attest -y --type spdx --predicate kured.sbom ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.sha_short }}
.tmp/cosign attach sbom --type spdx --sbom kured.sbom ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.sha_short }}

268
.github/workflows/on-pr.yaml vendored Normal file
View File

@@ -0,0 +1,268 @@
name: PR
on:
pull_request:
push:
jobs:
pr-gotest:
name: Run go tests
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Ensure go version
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: run tests
run: go test -json ./... > test.json
- name: Annotate tests
if: always()
uses: guyarb/golang-test-annoations@v0.7.0
with:
test-results: test.json
pr-shellcheck:
name: Lint bash code with shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: bewuethr/shellcheck-action@v2
pr-lint-code:
name: Lint golang code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Ensure go version
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: Lint cmd folder
uses: Jerome1337/golint-action@v1.0.3
with:
golint-path: './cmd/...'
- name: Lint pkg folder
uses: Jerome1337/golint-action@v1.0.3
with:
golint-path: './pkg/...'
pr-check-docs-links:
name: Check docs for incorrect links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Link Checker
uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: --verbose --no-progress '*.md' '*.yaml' '*/*/*.go' --exclude-link-local
fail: true
# This should not be made a mandatory test
# It is only used to make us aware of any potential security failure, that
# should trigger a bump of the image in build/.
pr-vuln-scan:
name: Build image and scan it against known vulnerabilities
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Ensure go version
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup GoReleaser
run: make bootstrap-tools
- name: Find current tag version
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: tags
- name: Build image
run: VERSION="${{ steps.tags.outputs.sha_short }}" make image
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54
with:
image-ref: 'ghcr.io/${{ github.repository }}:${{ steps.tags.outputs.sha_short }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
# This ensures the latest code works with the manifests built from tree.
# It is useful for two things:
# - Test manifests changes (obviously), ensuring they don't break existing clusters
# - Ensure manifests work with the latest versions even with no manifest change
# (compared to helm charts, manifests cannot easily template changes based on versions)
# Helm charts are _trailing_ releases, while manifests are done during development.
e2e-manifests:
name: End-to-End test with kured with code and manifests from HEAD
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kubernetes:
- "1.26"
- "1.27"
- "1.28"
steps:
- uses: actions/checkout@v3
- name: Ensure go version
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup GoReleaser
run: make bootstrap-tools
- name: Find current tag version
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: tags
- name: Build artifacts
run: |
VERSION="${{ steps.tags.outputs.sha_short }}" make image
VERSION="${{ steps.tags.outputs.sha_short }}" make manifest
- name: Workaround "Failed to attach 1 to compat systemd cgroup /actions_job/..." on gh actions
run: |
sudo bash << EOF
cp /etc/docker/daemon.json /etc/docker/daemon.json.old
echo '{}' > /etc/docker/daemon.json
systemctl restart docker || journalctl --no-pager -n 500
systemctl status docker
EOF
# Default name for helm/kind-action kind clusters is "chart-testing"
- name: Create kind cluster with 5 nodes
uses: helm/kind-action@v1.8.0
with:
config: .github/kind-cluster-${{ matrix.kubernetes }}.yaml
version: v0.14.0
- name: Preload previously built images onto kind cluster
run: kind load docker-image ghcr.io/${{ github.repository }}:${{ steps.tags.outputs.sha_short }} --name chart-testing
- name: Do not wait for an hour before detecting the rebootSentinel
run: |
sed -i 's/#\(.*\)--period=1h/\1--period=30s/g' kured-ds.yaml
- name: Install kured with kubectl
run: |
kubectl apply -f kured-rbac.yaml && kubectl apply -f kured-ds.yaml
- name: Ensure kured is ready
uses: nick-invision/retry@v2.8.3
with:
timeout_minutes: 10
max_attempts: 10
retry_wait_seconds: 60
# DESIRED CURRENT READY UP-TO-DATE AVAILABLE should all be = to cluster_size
command: "kubectl get ds -n kube-system kured | grep -E 'kured.*5.*5.*5.*5.*5'"
- name: Create reboot sentinel files
run: |
./tests/kind/create-reboot-sentinels.sh
- name: Follow reboot until success
env:
DEBUG: true
run: |
./tests/kind/follow-coordinated-reboot.sh
# This ensures the latest code works with the manifests built from tree.
# It is useful for two things:
# - Test manifests changes (obviously), ensuring they don't break existing clusters
# - Ensure manifests work with the latest versions even with no manifest change
# (compared to helm charts, manifests cannot easily template changes based on versions)
# Helm charts are _trailing_ releases, while manifests are done during development.
# Concurrency = 2
e2e-manifests-concurent:
name: End-to-End test with kured with code and manifests from HEAD (concurrent)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
kubernetes:
- "1.26"
- "1.27"
- "1.28"
steps:
- uses: actions/checkout@v3
- name: Ensure go version
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup GoReleaser
run: make bootstrap-tools
- name: Find current tag version
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: tags
- name: Build artifacts
run: |
VERSION="${{ steps.tags.outputs.sha_short }}" make image
VERSION="${{ steps.tags.outputs.sha_short }}" make manifest
- name: Workaround "Failed to attach 1 to compat systemd cgroup /actions_job/..." on gh actions
run: |
sudo bash << EOF
cp /etc/docker/daemon.json /etc/docker/daemon.json.old
echo '{}' > /etc/docker/daemon.json
systemctl restart docker || journalctl --no-pager -n 500
systemctl status docker
EOF
# Default name for helm/kind-action kind clusters is "chart-testing"
- name: Create kind cluster with 5 nodes
uses: helm/kind-action@v1.8.0
with:
config: .github/kind-cluster-${{ matrix.kubernetes }}.yaml
version: v0.14.0
- name: Preload previously built images onto kind cluster
run: kind load docker-image ghcr.io/${{ github.repository }}:${{ steps.tags.outputs.sha_short }} --name chart-testing
- name: Do not wait for an hour before detecting the rebootSentinel
run: |
sed -i 's/#\(.*\)--period=1h/\1--period=30s/g' kured-ds.yaml
sed -i 's/#\(.*\)--concurrency=1/\1--concurrency=2/g' kured-ds.yaml
- name: Install kured with kubectl
run: |
kubectl apply -f kured-rbac.yaml && kubectl apply -f kured-ds.yaml
- name: Ensure kured is ready
uses: nick-invision/retry@v2.8.3
with:
timeout_minutes: 10
max_attempts: 10
retry_wait_seconds: 60
# DESIRED CURRENT READY UP-TO-DATE AVAILABLE should all be = to cluster_size
command: "kubectl get ds -n kube-system kured | grep -E 'kured.*5.*5.*5.*5.*5'"
- name: Create reboot sentinel files
run: |
./tests/kind/create-reboot-sentinels.sh
- name: Follow reboot until success
env:
DEBUG: true
run: |
./tests/kind/follow-coordinated-reboot.sh

97
.github/workflows/on-tag.yaml vendored Normal file
View File

@@ -0,0 +1,97 @@
# when we add a tag to the repo, we should publish the kured image to a public repository
# if it's safe.
# It doesn't mean it's ready for release, but at least it's getting us started.
# The next step is to have a PR with the helm chart, to bump the version of the image used
name: Tag repo
on:
push:
tags:
- "*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
tag-scan-and-push-final-image:
name: "Build, scan, and publish tagged image"
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- name: Ensure go version
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: Find current tag version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
id: tags
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup GoReleaser
run: make bootstrap-tools
- name: Build binaries
run: make kured-release-tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build single image for scan
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64
push: false
load: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54
with:
image-ref: '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Login to ghcr.io
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build release images
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/arm64, linux/amd64, linux/arm/v7, linux/arm/v6, linux/386
push: true
labels: ${{ steps.meta.outputs.labels }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }}
- name: Generate SBOM
run: |
.tmp/syft ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }} -o spdx > kured.sbom
- name: Sign and attest artifacts
run: |
.tmp/cosign sign -y -r ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }}
.tmp/cosign sign-blob -y --output-signature kured.sbom.sig kured.sbom
.tmp/cosign attest -y --type spdx --predicate kured.sbom ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }}
.tmp/cosign attach sbom --type spdx --sbom kured.sbom ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.tags.outputs.version }}

80
.github/workflows/periodics-daily.yaml vendored Normal file
View File

@@ -0,0 +1,80 @@
name: Daily jobs
on:
schedule:
- cron: "30 1 * * *"
jobs:
periodics-gotest:
name: Run go tests
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: run tests
run: go test -json ./... > test.json
- name: Annotate tests
if: always()
uses: guyarb/golang-test-annoations@v0.7.0
with:
test-results: test.json
periodics-mark-stale:
name: Mark stale issues and PRs
runs-on: ubuntu-latest
steps:
# Stale by default waits for 60 days before marking PR/issues as stale, and closes them after 21 days.
# Do not expire the first issues that would allow the community to grow.
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue was automatically considered stale due to lack of activity. Please update it and/or join our slack channels to promote it, before it automatically closes (in 7 days).'
stale-pr-message: 'This PR was automatically considered stale due to lack of activity. Please refresh it and/or join our slack channels to highlight it, before it automatically closes (in 7 days).'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
exempt-issue-labels: 'good first issue,keep'
days-before-close: 21
check-docs-links:
name: Check docs for incorrect links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Link Checker
uses: lycheeverse/lychee-action@ec3ed119d4f44ad2673a7232460dc7dff59d2421
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: --verbose --no-progress '*.md' '*.yaml' '*/*/*.go' --exclude-link-local
fail: true
vuln-scan:
name: Build image and scan it against known vulnerabilities
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Ensure go version
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
check-latest: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Setup GoReleaser
run: make bootstrap-tools
- name: Find current tag version
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
id: tags
- name: Build artifacts
run: VERSION="${{ steps.tags.outputs.sha_short }}" make image
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@41f05d9ecffa2ed3f1580af306000f734b733e54
with:
image-ref: 'ghcr.io/${{ github.repository }}:${{ steps.tags.outputs.sha_short }}'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'

3
.gitignore vendored
View File

@@ -1,4 +1,5 @@
cmd/kured/kured
cmd/prom-active-alerts/prom-active-alerts
vendor
build
dist
.tmp

32
.goreleaser.yml Normal file
View File

@@ -0,0 +1,32 @@
project_name: kured
before:
hooks:
- go mod tidy
builds:
- main: ./cmd/kured
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64
- arm64
- arm
- "386"
goarm:
- "6"
- "7"
ldflags:
- -s -w -X main.version={{ if .IsSnapshot }}{{ .ShortCommit }}{{ else }}{{ .Version }}{{ end }}
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
snapshot:
name_template: "{{ .ShortCommit }}"
release:
disable: true
changelog:
skip: true

6
.lycheeignore Normal file
View File

@@ -0,0 +1,6 @@
app.fossa.com
cluster.local
hooks.slack.com
localhost
slack://
teams://

3
CODE_OF_CONDUCT.md Normal file
View File

@@ -0,0 +1,3 @@
## Kured Community Code of Conduct
Kured follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md).

242
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,242 @@
# Developing `kured`
We love contributions to `kured`, no matter if you are [helping out on
Slack][slack], reporting or triaging [issues][issues] or contributing code
to `kured`.
In any case, it will make sense to familiarise yourself with the main
[README][readme] to understand the different features and options, which is
helpful for testing. The "building" section in particular makes sense if
you are planning to contribute code.
[slack]: README.md#getting-help
[issues]: https://github.com/kubereboot/kured/issues
[readme]: README.md
## Certificate of Origin
By contributing to this project you agree to the Developer Certificate of
Origin (DCO). This document was created by the Linux Kernel community and is a
simple statement that you, as a contributor, have the legal right to make the
contribution.
We require all commits to be signed. By signing off with your signature, you
certify that you wrote the patch or otherwise have the right to contribute the
material by the rules of the [DCO](DCO):
`Signed-off-by: Jane Doe <jane.doe@example.com>`
The signature must contain your real name
(sorry, no pseudonyms or anonymous contributions)
If your `user.name` and `user.email` are configured in your Git config,
you can sign your commit automatically with `git commit -s`.
## Kured Repositories
All Kured repositories are kept under <https://github.com/kubereboot>. To find the code and work on the individual pieces that make Kured, here is our overview:
| Repositories | Contents |
| --------------------------------------- | ------------------------- |
| <https://github.com/kubereboot/kured> | Kured operator itself |
| <https://github.com/kubereboot/charts> | Helm chart |
| <https://github.com/kubereboot/website> | website and documentation |
## Regular development activities
### Prepare environment
Please run `make bootstrap-tools` once on a fresh repository clone to download several needed tools, e.g. GoReleaser.
### Updating k8s support
Whenever we want to update e.g. the `kubectl` or `client-go` dependencies,
some RBAC changes might be necessary too.
This is what it took to support Kubernetes 1.14:
<https://github.com/kubereboot/kured/pull/75>
That the process can be more involved based on kubernetes changes.
For example, k8s 1.10 changes to apps triggered the following commits:
b3f9ddf: Bump client-go for optimum k8s 1.10 compatibility
bc3f28d: Move deployment manifest to apps/v1
908998a: Update RBAC permissions for kubectl v1.10.3
efbb0c3: Document version compatibility in release notes
5731b98: Add warning to Dockerfile re: upgrading kubectl
Search the git log for inspiration for your cases.
Please update our `.github/workflows` with the new k8s images, starting by
the creation of a `.github/kind-cluster-<version>.yaml`, then updating
our workflows with the new versions.
Once you updated everything, make sure you update the support matrix on
the main [README][readme] as well.
### Updating other dependencies
Dependabot proposes changes in our go.mod/go.sum.
Some of those changes are covered by CI testing, some are not.
Please make sure to test those not covered by CI (mostly the integration
with other tools) manually before merging.
### Review periodic jobs
We run periodic jobs (see also Automated testing section of this documentation).
Those should be monitored for failures.
If a failure happen in periodics, something terribly wrong must have happened
(or github is failing at the creation of a kind cluster). Please monitor those
failures carefully.
### Introducing new features
When you introduce a new feature, the kured team expects you to have tested
your change thoroughly. If possible, include all the necessary testing in your change.
If your change involves a user facing change (change in flags of kured for example),
please include expose your new feature in our default manifest (`kured-ds.yaml`),
as a comment.
Our release manifests and helm charts are our stable interfaces.
Any user facing changes will therefore have to wait for a release before being
exposed to our users.
This also means that when you expose a new feature, you should create another PR
for your changes in <https://github.com/kubereboot/charts> to make your feature
available at the next kured version for helm users.
In the charts PR, you can directly bump the appVersion to the next minor version
(you are introducing a new feature, which requires a bump of the minor number.
For example, if current appVersion is 1.6.x, make sure you update your appVersion
to 1.7.0). It allows us to have an easy view of what we land each release.
Do not hesitate to increase the test coverage for your feature, whether it's unit
testing to full functional testing (even using helm charts)
### Increasing test coverage
We are welcoming any change to increase our test coverage.
See also our github issues for the label `testing`.
## Automated testing
Our CI is covered by github actions.
You can see their contents in .github/workflows.
We currently run:
- go tests and lint
- `shellcheck`
- a check for dead links in our docs
- a security check against our base image (alpine)
- a deep functional test using our manifests on all supported k8s versions
To test your code manually, follow the section Manual testing.
## Manual (release) testing
Before `kured` is released, we want to make sure it still works fine on the
previous, current and next minor version of Kubernetes (with respect to the
`client-go` & `kubectl` dependencies in use). For local testing e.g.
`minikube` or `kind` can be sufficient. This will allow you to catch issues
that might not have been tested in our CI, like integration with other tools,
or your specific use case.
Deploy kured in your test scenario, make sure you pass the right `image`,
update the e.g. `period` and `reboot-days` options, so you get immediate
results, if you login to a node and run:
```console
sudo touch /var/run/reboot-required
```
### Example of golang testing
Please run `make test`. You should have `golint` installed.
### Example of testing with `minikube`
A test-run with `minikube` could look like this:
```console
# start minikube
minikube start --driver=kvm2 --kubernetes-version <k8s-release>
# build kured image and publish to registry accessible by minikube
make image minikube-publish
# edit kured-ds.yaml to
# - point to new image
# - change e.g. period and reboot-days option for immediate results
minikube kubectl -- apply -f kured-rbac.yaml
minikube kubectl -- apply -f kured-ds.yaml
minikube kubectl -- logs daemonset.apps/kured -n kube-system -f
# In separate terminal
minikube ssh
sudo touch /var/run/reboot-required
minikube logs -f
```
Now check for the 'Commanding reboot' message and minikube going down.
Unfortunately as of today, you are going to run into
<https://github.com/kubernetes/minikube/issues/2874>. This means that
minikube won't come back easily. You will need to start minikube again.
Then you can check for the lock release.
### Example of testing with `kind`
A test-run with `kind` could look like this:
```console
# create kind cluster
kind create cluster --config .github/kind-cluster-<k8s-version>.yaml
# create reboot required files on pre-defined kind nodes
./tests/kind/create-reboot-sentinels.sh
# check if reboot is working fine
./tests/kind/follow-coordinated-reboot.sh
```
## Publishing a new kured release
### Prepare Documentation
Check that `README.md` has an updated compatibility matrix and that the
url in the `kubectl` incantation (under "Installation") is updated to the
new version you want to release.
### Create a tag on the repo
Before going further, we should freeze the code for a release, by
tagging the code. The Github-Action should start a new job and push
the new image to the registry.
### Create the combined manifest
Now create the `kured-<release>-dockerhub.yaml` for e.g. `1.3.0`:
```sh
VERSION=1.3.0
MANIFEST="kured-$VERSION-dockerhub.yaml"
make DH_ORG="kubereboot" VERSION="${VERSION}" manifest
cat kured-rbac.yaml > "$MANIFEST"
cat kured-ds.yaml >> "$MANIFEST"
```
### Publish release artifacts
Now you can head to the Github UI, use the version number as tag and upload the
`kured-<release>-dockerhub.yaml` file.
Please describe what's new and noteworthy in the release notes, list the PRs
that landed and give a shout-out to everyone who contributed.
Please also note down on which releases the upcoming `kured` release was
tested on. (Check old release notes if you're unsure.)

36
DCO Normal file
View File

@@ -0,0 +1,36 @@
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
660 York Street, Suite 102,
San Francisco, CA 94110 USA
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

1
DEVELOPMENT.md Normal file
View File

@@ -0,0 +1 @@
This file was moved to [CONTRIBUTING.md](CONTRIBUTING.md).

25
Dockerfile Normal file
View File

@@ -0,0 +1,25 @@
FROM --platform=$TARGETPLATFORM alpine:3.18.3 as bin
ARG TARGETOS
ARG TARGETARCH
ARG TARGETVARIANT
COPY dist/ /dist
RUN set -ex \
&& case "${TARGETARCH}" in \
amd64) \
SUFFIX="_v1" \
;; \
arm) \
SUFFIX="_${TARGETVARIANT:1}" \
;; \
*) \
SUFFIX="" \
;; \
esac \
&& cp /dist/kured_${TARGETOS}_${TARGETARCH}${SUFFIX}/kured /dist/kured;
FROM --platform=$TARGETPLATFORM alpine:3.18.3
RUN apk update --no-cache && apk upgrade --no-cache && apk add --no-cache ca-certificates tzdata
COPY --from=bin /dist/kured /usr/bin/kured
ENTRYPOINT ["/usr/bin/kured"]

112
GOVERNANCE.md Normal file
View File

@@ -0,0 +1,112 @@
# Project Governance
- [Values](#values)
- [Maintainers](#maintainers)
- [Becoming a Maintainer](#becoming-a-maintainer)
- [Meetings](#meetings)
- [Code of Conduct Enforcement](#code-of-conduct)
- [Voting](#voting)
## Values
The Kured project and its leadership embrace the following values:
- Openness: Communication and decision-making happens in the open and is discoverable for future
reference. As much as possible, all discussions and work take place in public
forums and open repositories.
- Fairness: All stakeholders have the opportunity to provide feedback and submit
contributions, which will be considered on their merits.
- Community over Product or Company: Sustaining and growing our community takes
priority over shipping code or sponsors' organizational goals. Each
contributor participates in the project as an individual.
- Inclusivity: We innovate through different perspectives and skill sets, which
can only be accomplished in a welcoming and respectful environment.
- Participation: Responsibilities within the project are earned through
participation, and there is a clear path up the contributor ladder into leadership
positions.
- Consensus: Whether or not wider input is required, the Kured community believes that
the best decisions are reached through Consensus
<https://en.wikipedia.org/wiki/Consensus_decision-making>.
## Maintainers
Kured Maintainers have write access to the [project GitHub
organisation](https://github.com/kubereboot). They can merge their own patches or patches
from others. The current maintainers can be found in [MAINTAINERS][maintainers-file].
Maintainers collectively manage the project's resources and contributors.
This privilege is granted with some expectation of responsibility: maintainers
are people who care about the Kured project and want to help it grow and
improve. A maintainer is not just someone who can make changes, but someone who
has demonstrated their ability to collaborate with the team, get the most
knowledgeable people to review code and docs, contribute high-quality code, and
follow through to fix issues (in code or tests).
A maintainer is a contributor to the project's success and a citizen helping
the project succeed.
## Becoming a Maintainer
To become a Maintainer you need to demonstrate the following:
- commitment to the project:
- participate in discussions, contributions, code and documentation reviews
for 3 months or more and participate in Slack discussions and meetings
if possible,
- perform reviews for 5 non-trivial pull requests,
- contribute 5 non-trivial pull requests and have them merged,
- ability to write quality code and/or documentation,
- ability to collaborate with the team,
- understanding of how the team works (policies, processes for testing and code review, etc),
- understanding of the project's code base and coding and documentation style.
We realise that everybody brings different abilities and qualities to the team, that's
why we are willing to change the rules somewhat depending on the circumstances.
A new Maintainer can apply by proposing a PR to the [MAINTAINERS
file][maintainers-file]. A simple majority vote of existing Maintainers
approves the application.
Maintainers who are selected will be granted the necessary GitHub rights,
and invited to the [private maintainer mailing list][private-list].
## Meetings
Time zones permitting, Maintainers are expected to participate in the public
developer meeting, details can be found [here][meeting-agenda].
Maintainers will also have closed meetings in order to discuss security reports
or Code of Conduct violations. Such meetings should be scheduled by any
Maintainer on receipt of a security issue or CoC report. All current Maintainers
must be invited to such closed meetings, except for any Maintainer who is
accused of a CoC violation.
## Code of Conduct
[Code of Conduct](./CODE_OF_CONDUCT.md) violations by community members will
be discussed and resolved on the [private Maintainer mailing list][private-list].
If the reported CoC violator is a Maintainer, the Maintainers will instead
designate two Maintainers to work with CNCF staff in resolving the report.
## Voting
While most business in Kured is conducted by "lazy consensus", periodically
the Maintainers may need to vote on specific actions or changes.
A vote can be taken in [kured issues labeled 'decision'][decision-issues] or
[the private Maintainer mailing list][private-list] for security or conduct
matters. Votes may also be taken at [the developer meeting][meeting-agenda].
Any Maintainer may demand a vote be taken.
Most votes require a simple majority of all Maintainers to succeed. Maintainers
can be removed by a 2/3 majority vote of all Maintainers, and changes to this
Governance require a 2/3 vote of all Maintainers.
[maintainers-file]: ./MAINTAINERS
[private-list]: cncf-kured-maintainers@lists.cncf.io
[meeting-agenda]: https://docs.google.com/document/d/1AWT8YDdqZY-Se6Y1oAlwtujWLVpNVK2M_F_Vfqw06aI/edit
[decision-issues]: https://github.com/kubereboot/kured/labels/decision

431
Gopkg.lock generated
View File

@@ -1,431 +0,0 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/PuerkitoBio/purell"
packages = ["."]
revision = "0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4"
version = "v1.1.0"
[[projects]]
branch = "master"
name = "github.com/PuerkitoBio/urlesc"
packages = ["."]
revision = "bbf7a2afc14f93e1e0a5c06df524fbd75e5031e5"
[[projects]]
name = "github.com/asaskevich/govalidator"
packages = ["."]
revision = "73945b6115bfbbcc57d89b7316e28109364124e1"
version = "v7"
[[projects]]
branch = "master"
name = "github.com/beorn7/perks"
packages = ["quantile"]
revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9"
[[projects]]
branch = "master"
name = "github.com/cloudfoundry-incubator/candiedyaml"
packages = ["."]
revision = "99c3df83b51532e3615f851d8c2dbb638f5313bf"
[[projects]]
branch = "master"
name = "github.com/davecgh/go-spew"
packages = ["spew"]
revision = "5215b55f46b2b919f50a1df0eaa5886afe4e3b3d"
[[projects]]
branch = "master"
name = "github.com/docker/distribution"
packages = [
"digest",
"reference"
]
revision = "7365003236ca58bd7fa17ef1459328d13301d7d5"
[[projects]]
branch = "master"
name = "github.com/emicklei/go-restful"
packages = [
".",
"log"
]
revision = "b14c3a95fc27c52959d2eddc85066da3c14bf269"
[[projects]]
name = "github.com/emicklei/go-restful-swagger12"
packages = ["."]
revision = "dcef7f55730566d41eae5db10e7d6981829720f6"
version = "1.0.1"
[[projects]]
branch = "master"
name = "github.com/ghodss/yaml"
packages = ["."]
revision = "aa0c862057666179de291b67d9f093d12b5a8473"
[[projects]]
branch = "master"
name = "github.com/go-openapi/analysis"
packages = ["."]
revision = "8ed83f2ea9f00f945516462951a288eaa68bf0d6"
[[projects]]
branch = "master"
name = "github.com/go-openapi/errors"
packages = ["."]
revision = "03cfca65330da08a5a440053faf994a3c682b5bf"
[[projects]]
branch = "master"
name = "github.com/go-openapi/jsonpointer"
packages = ["."]
revision = "779f45308c19820f1a69e9a4cd965f496e0da10f"
[[projects]]
branch = "master"
name = "github.com/go-openapi/jsonreference"
packages = ["."]
revision = "36d33bfe519efae5632669801b180bf1a245da3b"
[[projects]]
branch = "master"
name = "github.com/go-openapi/loads"
packages = ["."]
revision = "a80dea3052f00e5f032e860dd7355cd0cc67e24d"
[[projects]]
branch = "master"
name = "github.com/go-openapi/spec"
packages = ["."]
revision = "e51c28f07047ad90caff03f6450908720d337e0c"
[[projects]]
branch = "master"
name = "github.com/go-openapi/strfmt"
packages = ["."]
revision = "610b6cacdcde6852f4de68998bd20ce1dac85b22"
[[projects]]
branch = "master"
name = "github.com/go-openapi/swag"
packages = ["."]
revision = "24ebf76d720bab64f62824d76bced3184a65490d"
[[projects]]
branch = "master"
name = "github.com/gogo/protobuf"
packages = [
"proto",
"sortkeys"
]
revision = "e33835a643a970c11ac74f6333f5f6866387a101"
[[projects]]
branch = "master"
name = "github.com/golang/glog"
packages = ["."]
revision = "23def4e6c14b4da8ac2ed8007337bc5eb5007998"
[[projects]]
branch = "master"
name = "github.com/golang/protobuf"
packages = ["proto"]
revision = "2bba0603135d7d7f5cb73b2125beeda19c09f4ef"
[[projects]]
branch = "master"
name = "github.com/google/gofuzz"
packages = ["."]
revision = "fd52762d25a41827db7ef64c43756fd4b9f7e382"
[[projects]]
branch = "master"
name = "github.com/inconshreveable/mousetrap"
packages = ["."]
revision = "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
[[projects]]
branch = "master"
name = "github.com/juju/ratelimit"
packages = ["."]
revision = "5b9ff866471762aa2ab2dced63c9fb6f53921342"
[[projects]]
branch = "master"
name = "github.com/mailru/easyjson"
packages = [
"buffer",
"jlexer",
"jwriter"
]
revision = "2af9a745a611440bab0528e5ac19b2805a1c50eb"
[[projects]]
name = "github.com/matttproud/golang_protobuf_extensions"
packages = ["pbutil"]
revision = "3247c84500bff8d9fb6d579d800f20b3e091582c"
version = "v1.0.0"
[[projects]]
branch = "master"
name = "github.com/mitchellh/mapstructure"
packages = ["."]
revision = "d0303fe809921458f417bcf828397a65db30a7e4"
[[projects]]
branch = "master"
name = "github.com/prometheus/client_golang"
packages = [
"api/prometheus",
"prometheus",
"prometheus/promhttp"
]
revision = "5636dc67ae776adf5590da7349e70fbb9559972d"
[[projects]]
branch = "master"
name = "github.com/prometheus/client_model"
packages = ["go"]
revision = "6f3806018612930941127f2a7c6c453ba2c527d2"
[[projects]]
branch = "master"
name = "github.com/prometheus/common"
packages = [
"expfmt",
"internal/bitbucket.org/ww/goautoneg",
"model"
]
revision = "ebdfc6da46522d58825777cf1f90490a5b1ef1d8"
[[projects]]
branch = "master"
name = "github.com/prometheus/procfs"
packages = [
".",
"xfs"
]
revision = "e645f4e5aaa8506fc71d6edbc5c4ff02c04c46f2"
[[projects]]
name = "github.com/sirupsen/logrus"
packages = ["."]
revision = "c155da19408a8799da419ed3eeb0cb5db0ad5dbc"
version = "v1.0.5"
[[projects]]
branch = "master"
name = "github.com/spf13/cobra"
packages = ["."]
revision = "b24564e919247d7c870fe0ed3738c98d8741aca4"
[[projects]]
branch = "master"
name = "github.com/spf13/pflag"
packages = ["."]
revision = "367864438f1b1a3c7db4da06a2f55b144e6784e0"
[[projects]]
branch = "master"
name = "github.com/ugorji/go"
packages = ["codec"]
revision = "3487a5545b3d480987dfb0492035299077fab33a"
[[projects]]
branch = "master"
name = "golang.org/x/crypto"
packages = ["ssh/terminal"]
revision = "beb2a9779c3b677077c41673505f150149fce895"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = [
"context",
"context/ctxhttp",
"http2",
"http2/hpack",
"idna"
]
revision = "2a35e686583654a1b89ca79c4ac78cb3d6529ca3"
[[projects]]
branch = "master"
name = "golang.org/x/sys"
packages = [
"unix",
"windows"
]
revision = "3b87a42e500a6dc65dae1a55d0b641295971163e"
[[projects]]
branch = "master"
name = "golang.org/x/text"
packages = [
"internal/gen",
"internal/triegen",
"internal/ucd",
"transform",
"unicode/cldr",
"unicode/norm",
"width"
]
revision = "a9a820217f98f7c8a207ec1e45a874e1fe12c478"
[[projects]]
branch = "master"
name = "gopkg.in/inf.v0"
packages = ["."]
revision = "3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4"
[[projects]]
branch = "v2"
name = "gopkg.in/mgo.v2"
packages = [
"bson",
"internal/json"
]
revision = "3f83fa5005286a7fe593b055f0d7771a7dce4655"
[[projects]]
branch = "v2"
name = "gopkg.in/yaml.v2"
packages = ["."]
revision = "cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b"
[[projects]]
branch = "release-1.7"
name = "k8s.io/apimachinery"
packages = [
"pkg/api/equality",
"pkg/api/errors",
"pkg/api/meta",
"pkg/api/resource",
"pkg/apimachinery",
"pkg/apimachinery/announced",
"pkg/apimachinery/registered",
"pkg/apis/meta/v1",
"pkg/apis/meta/v1/unstructured",
"pkg/apis/meta/v1alpha1",
"pkg/conversion",
"pkg/conversion/queryparams",
"pkg/conversion/unstructured",
"pkg/fields",
"pkg/labels",
"pkg/openapi",
"pkg/runtime",
"pkg/runtime/schema",
"pkg/runtime/serializer",
"pkg/runtime/serializer/json",
"pkg/runtime/serializer/protobuf",
"pkg/runtime/serializer/recognizer",
"pkg/runtime/serializer/streaming",
"pkg/runtime/serializer/versioning",
"pkg/selection",
"pkg/types",
"pkg/util/clock",
"pkg/util/diff",
"pkg/util/errors",
"pkg/util/framer",
"pkg/util/intstr",
"pkg/util/json",
"pkg/util/net",
"pkg/util/rand",
"pkg/util/runtime",
"pkg/util/sets",
"pkg/util/validation",
"pkg/util/validation/field",
"pkg/util/wait",
"pkg/util/yaml",
"pkg/version",
"pkg/watch",
"third_party/forked/golang/reflect"
]
revision = "8ab5f3d8a330c2e9baaf84e39042db8d49034ae2"
[[projects]]
name = "k8s.io/client-go"
packages = [
"discovery",
"kubernetes",
"kubernetes/scheme",
"kubernetes/typed/admissionregistration/v1alpha1",
"kubernetes/typed/apps/v1beta1",
"kubernetes/typed/authentication/v1",
"kubernetes/typed/authentication/v1beta1",
"kubernetes/typed/authorization/v1",
"kubernetes/typed/authorization/v1beta1",
"kubernetes/typed/autoscaling/v1",
"kubernetes/typed/autoscaling/v2alpha1",
"kubernetes/typed/batch/v1",
"kubernetes/typed/batch/v2alpha1",
"kubernetes/typed/certificates/v1beta1",
"kubernetes/typed/core/v1",
"kubernetes/typed/extensions/v1beta1",
"kubernetes/typed/networking/v1",
"kubernetes/typed/policy/v1beta1",
"kubernetes/typed/rbac/v1alpha1",
"kubernetes/typed/rbac/v1beta1",
"kubernetes/typed/settings/v1alpha1",
"kubernetes/typed/storage/v1",
"kubernetes/typed/storage/v1beta1",
"pkg/api",
"pkg/api/v1",
"pkg/api/v1/ref",
"pkg/apis/admissionregistration",
"pkg/apis/admissionregistration/v1alpha1",
"pkg/apis/apps",
"pkg/apis/apps/v1beta1",
"pkg/apis/authentication",
"pkg/apis/authentication/v1",
"pkg/apis/authentication/v1beta1",
"pkg/apis/authorization",
"pkg/apis/authorization/v1",
"pkg/apis/authorization/v1beta1",
"pkg/apis/autoscaling",
"pkg/apis/autoscaling/v1",
"pkg/apis/autoscaling/v2alpha1",
"pkg/apis/batch",
"pkg/apis/batch/v1",
"pkg/apis/batch/v2alpha1",
"pkg/apis/certificates",
"pkg/apis/certificates/v1beta1",
"pkg/apis/extensions",
"pkg/apis/extensions/v1beta1",
"pkg/apis/networking",
"pkg/apis/networking/v1",
"pkg/apis/policy",
"pkg/apis/policy/v1beta1",
"pkg/apis/rbac",
"pkg/apis/rbac/v1alpha1",
"pkg/apis/rbac/v1beta1",
"pkg/apis/settings",
"pkg/apis/settings/v1alpha1",
"pkg/apis/storage",
"pkg/apis/storage/v1",
"pkg/apis/storage/v1beta1",
"pkg/util",
"pkg/util/parsers",
"pkg/version",
"rest",
"rest/watch",
"tools/clientcmd/api",
"tools/metrics",
"transport",
"util/cert",
"util/flowcontrol",
"util/integer"
]
revision = "d92e8497f71b7b4e0494e5bd204b48d34bd6f254"
version = "v4.0.0"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "029e6d2251ccbf5acdfc3bc0c36f340dc3a98511b0d7338c3e9bb167e412a155"
solver-name = "gps-cdcl"
solver-version = 1

View File

@@ -1,24 +0,0 @@
[[constraint]]
name = "github.com/sirupsen/logrus"
version = "v1.0.5"
[[constraint]]
branch = "master"
name = "github.com/prometheus/client_golang"
[[constraint]]
branch = "master"
name = "github.com/prometheus/common"
[[constraint]]
branch = "master"
name = "github.com/spf13/cobra"
[[constraint]]
name = "k8s.io/client-go"
version = "v4.0.0"
[[constraint]]
name = "k8s.io/apimachinery"
branch = "release-1.7"

5
MAINTAINERS Normal file
View File

@@ -0,0 +1,5 @@
Christian Kotzbauer <christian.kotzbauer@gmail.com> (@ckotzbauer)
Daniel Holbach <daniel.holbach@gmail.com> (@dholbach)
Hidde Beydals <hidde@weave.works> (@hiddeco)
Jack Francis <jackfrancis@gmail.com> (@jackfrancis)
Jean-Philippe Evrard <open-source@a.spamming.party> (@evrardjp)

View File

@@ -1,34 +1,53 @@
.DEFAULT: all
.PHONY: all clean image publish-image minikube-publish
.PHONY: all clean image minikube-publish manifest test kured-all
DH_ORG=weaveworks
VERSION=$(shell git symbolic-ref --short HEAD)-$(shell git rev-parse --short HEAD)
TEMPDIR=./.tmp
GORELEASER_CMD=$(TEMPDIR)/goreleaser
DH_ORG=kubereboot
VERSION=$(shell git rev-parse --short HEAD)
SUDO=$(shell docker info >/dev/null 2>&1 || echo "sudo -E")
all: image
$(TEMPDIR):
mkdir -p $(TEMPDIR)
.PHONY: bootstrap-tools
bootstrap-tools: $(TEMPDIR)
VERSION=v1.19.2 TMPDIR=.tmp bash .github/scripts/goreleaser-install.sh
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b .tmp v0.86.1
curl -sSfL https://github.com/sigstore/cosign/releases/download/v2.1.1/cosign-linux-amd64 -o .tmp/cosign
chmod +x .tmp/goreleaser .tmp/cosign .tmp/syft
clean:
go clean
rm -f cmd/kured/kured
rm -rf ./build
rm -rf ./dist
godeps=$(shell go get $1 && go list -f '{{join .Deps "\n"}}' $1 | grep -v /vendor/ | xargs go list -f '{{if not .Standard}}{{ $$dep := . }}{{range .GoFiles}}{{$$dep.Dir}}/{{.}} {{end}}{{end}}')
kured:
$(GORELEASER_CMD) build --clean --single-target --snapshot
DEPS=$(call godeps,./cmd/kured)
kured-all:
$(GORELEASER_CMD) build --clean --snapshot
cmd/kured/kured: $(DEPS)
cmd/kured/kured: cmd/kured/*.go
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=$(VERSION)" -o $@ cmd/kured/*.go
kured-release-tag:
$(GORELEASER_CMD) release --clean
build/.image.done: cmd/kured/Dockerfile cmd/kured/kured
mkdir -p build
cp $^ build
sudo -E docker build -t quay.io/$(DH_ORG)/kured:$(VERSION) -f build/Dockerfile ./build
touch $@
kured-release-snapshot:
$(GORELEASER_CMD) release --clean --snapshot
image: build/.image.done
publish-image: image
sudo -E docker push quay.io/$(DH_ORG)/kured:$(VERSION)
image: kured
$(SUDO) docker buildx build --load -t ghcr.io/$(DH_ORG)/kured:$(VERSION) .
minikube-publish: image
sudo -E docker save quay.io/$(DH_ORG)/kured:$(VERSION) | (eval $$(minikube docker-env) && docker load)
$(SUDO) docker save ghcr.io/$(DH_ORG)/kured | (eval $$(minikube docker-env) && docker load)
manifest:
sed -i "s#image: ghcr.io/.*kured.*#image: ghcr.io/$(DH_ORG)/kured:$(VERSION)#g" kured-ds.yaml
echo "Please generate combined manifest if necessary"
test:
echo "Running go tests"
go test ./...
echo "Running golint on pkg"
golint ./pkg/...
echo "Running golint on cmd"
golint ./cmd/...

234
README.md
View File

@@ -1,21 +1,17 @@
# kured - Kubernetes Reboot Daemon
<img src="https://github.com/weaveworks/kured/raw/master/img/logo.png" align="right"/>
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/kured)](https://artifacthub.io/packages/helm/kured/kured)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkubereboot%2Fkured.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkubereboot%2Fkured?ref=badge_shield)
[![CLOMonitor](https://img.shields.io/endpoint?url=https://clomonitor.io/api/projects/cncf/kured/badge)](https://clomonitor.io/projects/cncf/kured)
* [Introduction](#introduction)
* [Kubernetes & OS Compatibility](#kubernetes-&-os-compatibility)
* [Installation](#installation)
* [Configuration](#configuration)
* [Reboot Sentinel File & Period](#reboot-sentinel-file-&-period)
* [Blocking Reboots via Alerts](#blocking-reboots-via-alerts)
* [Prometheus Metrics](#prometheus-metrics)
* [Slack Notifications](#slack-notifications)
* [Overriding Lock Configuration](#overriding-lock-configuration)
* [Operation](#operation)
* [Testing](#testing)
* [Disabling Reboots](#disabling-reboots)
* [Manual Unlock](#manual-unlock)
* [Building](#building)
* [Getting Help](#getting-help)
<img src="https://github.com/kubereboot/website/raw/main/static/img/kured.png" width="200" align="right"/>
- [kured - Kubernetes Reboot Daemon](#kured---kubernetes-reboot-daemon)
- [Introduction](#introduction)
- [Documentation](#documentation)
- [Getting Help](#getting-help)
- [Trademarks](#trademarks)
- [License](#license)
## Introduction
@@ -23,188 +19,48 @@ Kured (KUbernetes REboot Daemon) is a Kubernetes daemonset that
performs safe automatic node reboots when the need to do so is
indicated by the package management system of the underlying OS.
* Watches for the presence of a reboot sentinel e.g. `/var/run/reboot-required`
* Utilises a lock in the API server to ensure only one node reboots at
- Watches for the presence of a reboot sentinel file e.g. `/var/run/reboot-required`
or the successful run of a sentinel command.
- Utilises a lock in the API server to ensure only one node reboots at
a time
* Optionally defers reboots in the presence of active Prometheus alerts
* Cordons & drains worker nodes before reboot, uncordoning them after
- Optionally defers reboots in the presence of active Prometheus alerts or selected pods
- Cordons & drains worker nodes before reboot, uncordoning them after
## Kubernetes & OS Compatibility
## Documentation
The daemon image contains a 1.7.x `k8s.io/client-go` and `kubectl`
binary for the purposes of maintaining the lock and draining worker
nodes. Whilst it has only been tested on a 1.7.x cluster, Kubernetes
typically has good forwards/backwards compatibility so there is a
reasonable chance it will work on adjacent versions; please file an
issue if this is not the case.
Find all our docs on <https://kured.dev>:
Additionally, the image contains a `systemctl` binary from Ubuntu
16.04 in order to command reboots. Again, although this has not been
tested against other systemd distributions there is a good chance that
it will work.
- [All Kured Documentation](https://kured.dev/docs/)
- [Installing Kured](https://kured.dev/docs/installation/)
- [Configuring Kured](https://kured.dev/docs/configuration/)
- [Operating Kured](https://kured.dev/docs/operation/)
- [Developing Kured](https://kured.dev/docs/development/)
## Installation
To obtain a default installation without Prometheus alerting interlock
or Slack notifications:
```
kubectl apply -f https://github.com/weaveworks/kured/releases/download/1.0.0/kured-ds.yaml
```
If you want to customise the installation, download the manifest and
edit it in accordance with the following section before application.
## Configuration
The following arguments can be passed to kured via the daemonset pod template:
```
Flags:
--alert-filter-regexp value alert names to ignore when checking for active alerts
--ds-name string namespace containing daemonset on which to place lock (default "kube-system")
--ds-namespace string name of daemonset on which to place lock (default "kured")
--lock-annotation string annotation in which to record locking node (default "weave.works/kured-node-lock")
--period duration reboot check period (default 1h0m0s)
--prometheus-url string Prometheus instance to probe for active alerts
--reboot-sentinel string path to file whose existence signals need to reboot (default "/var/run/reboot-required")
--slack-hook-url string slack hook URL for reboot notfications
--slack-username string slack username for reboot notfications (default "kured")
```
### Reboot Sentinel File & Period
By default kured checks for the existence of
`/var/run/reboot-required` every sixty minutes; you can override these
values with `--reboot-sentinel` and `--period`. Each replica of the
daemon uses a random offset derived from the period on startup so that
nodes don't all contend for the lock simultaneously.
### Blocking Reboots via Alerts
You may find it desirable to block automatic node reboots when there
are active alerts - you can do so by providing the URL of your
Prometheus server:
```
--prometheus-url=http://prometheus.monitoring.svc.cluster.local
```
By default the presence of *any* active (pending or firing) alerts
will block reboots, however you can ignore specific alerts:
```
--alert-filter-regexp=^(RebootRequired|AnotherBenignAlert|...$
```
An important application of this filter will become apparent in the
next section.
### Prometheus Metrics
Each kured pod exposes a single gauge metric (`:8080/metrics`) that
indicates the presence of the sentinel file:
```
# HELP kured_reboot_required OS requires reboot due to software updates.
# TYPE kured_reboot_required gauge
kured_reboot_required{node="ip-xxx-xxx-xxx-xxx.ec2.internal"} 0
```
The purpose of this metric is to power an alert which will summon an
operator if the cluster cannot reboot itself automatically for a
prolonged period:
```
# Alert if a reboot is required for any machines. Acts as a failsafe for the
# reboot daemon, which will not reboot nodes if there are pending alerts save
# this one.
ALERT RebootRequired
IF max(kured_reboot_required) != 0
FOR 24h
LABELS { severity="warning" }
ANNOTATIONS {
summary = "Machine(s) require being rebooted, and the reboot daemon has failed to do so for 24 hours",
impact = "Cluster nodes more vulnerable to security exploits. Eventually, no disk space left.",
description = "Machine(s) require being rebooted, probably due to kernel update.",
}
```
If you choose to employ such an alert and have configured kured to
probe for active alerts before rebooting, be sure to specify
`--alert-filter-regexp=^RebootRequired$` to avoid deadlock!
### Slack Notifications
If you specify a Slack hook via `--slack-hook-url`, kured will notify
you immediately prior to rebooting a node:
<img src="https://github.com/weaveworks/kured/raw/master/img/slack-notification.png"/>
We recommend setting `--slack-username` to be the name of the
environment, e.g. `dev` or `prod`.
### Overriding Lock Configuration
The `--ds-name` and `--ds-namespace` arguments should match the name and
namespace of the daemonset used to deploy the reboot daemon - the locking is
implemented by means of an annotation on this resource. The defaults match
the daemonset YAML provided in the repository.
Similarly `--lock-annotation` can be used to change the name of the
annotation kured will use to store the lock, but the default is almost
certainly safe.
## Operation
The example commands in this section assume that you have not
overriden the default lock annotation, daemonset name or namespace;
if you have, you will have to adjust the commands accordingly.
### Testing
You can test your configuration by provoking a reboot on a node:
```
sudo touch /var/run/reboot-required
```
### Disabling Reboots
If you need to temporarily stop kured from rebooting any nodes, you
can take the lock manually:
```
kubectl -n kube-system annotate ds kured weave.works/kured-node-lock='{"nodeID":"manual"}'
```
Don't forget to release it afterwards!
### Manual Unlock
In exceptional circumstances, such as a node experiencing a permanent
failure whilst rebooting, manual intervention may be required to
remove the cluster lock:
```
kubectl -n kube-system annotate ds kured weave.works/kured-node-lock-
```
> NB the `-` at the end of the command is important - it instructs
> `kubectl` to remove that annotation entirely.
## Building
```
dep ensure && make
```
And there's much more!
## Getting Help
If you have any questions about, feedback for or problems with `kured`:
- Invite yourself to the <a href="https://weaveworks.github.io/community-slack/" target="_blank"> #weave-community </a> slack channel.
- Ask a question on the <a href="https://weave-community.slack.com/messages/general/"> #weave-community</a> slack channel.
- Send an email to <a href="mailto:weave-users@weave.works">weave-users@weave.works</a>
- <a href="https://github.com/weaveworks/kured/issues/new">File an issue.</a>
- Invite yourself to the <a href="https://slack.cncf.io/" target="_blank">CNCF Slack</a>.
- Ask a question on the [#kured](https://cloud-native.slack.com/archives/kured) slack channel.
- [File an issue](https://github.com/kubereboot/kured/issues/new).
- Join us in [our monthly meeting](https://docs.google.com/document/d/1AWT8YDdqZY-Se6Y1oAlwtujWLVpNVK2M_F_Vfqw06aI/edit),
every first Wednesday of the month at 16:00 UTC.
- You might want to [join the kured-dev mailing list](https://lists.cncf.io/g/cncf-kured-dev) as well.
We follow the [CNCF Code of Conduct](CODE_OF_CONDUCT.md).
Your feedback is always welcome!
## Trademarks
**Kured is a [Cloud Native Computing Foundation](https://cncf.io/) Sandbox project.**
![Cloud Native Computing Foundation logo](img/cncf-color.png)
The Linux Foundation® (TLF) has registered trademarks and uses trademarks. For a list of TLF trademarks, see [Trademark Usage](https://www.linuxfoundation.org/trademark-usage/).
## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkubereboot%2Fkured.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkubereboot%2Fkured?ref=badge_large)

View File

@@ -1,6 +0,0 @@
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/cache/apt
ADD https://storage.googleapis.com/kubernetes-release/release/v1.9.6/bin/linux/amd64/kubectl /usr/bin/kubectl
RUN chmod 0755 /usr/bin/kubectl
COPY ./kured /usr/bin/kured
ENTRYPOINT ["/usr/bin/kured"]

View File

@@ -1,40 +1,89 @@
package main
import (
"context"
"encoding/json"
"fmt"
"math/rand"
"net/http"
"net/url"
"os"
"os/exec"
"reflect"
"regexp"
"sort"
"strings"
"time"
papi "github.com/prometheus/client_golang/api"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"
kubectldrain "k8s.io/kubectl/pkg/drain"
"github.com/google/shlex"
shoutrrr "github.com/containrrr/shoutrrr"
"github.com/kubereboot/kured/pkg/alerts"
"github.com/kubereboot/kured/pkg/daemonsetlock"
"github.com/kubereboot/kured/pkg/delaytick"
"github.com/kubereboot/kured/pkg/taints"
"github.com/kubereboot/kured/pkg/timewindow"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/weaveworks/kured/pkg/alerts"
"github.com/weaveworks/kured/pkg/daemonsetlock"
"github.com/weaveworks/kured/pkg/delaytick"
"github.com/weaveworks/kured/pkg/notifications/slack"
)
var (
version = "unreleased"
// Command line flags
period time.Duration
dsNamespace string
dsName string
lockAnnotation string
prometheusURL string
alertFilter *regexp.Regexp
rebootSentinel string
slackHookURL string
slackUsername string
forceReboot bool
drainTimeout time.Duration
rebootDelay time.Duration
period time.Duration
metricsHost string
metricsPort int
drainGracePeriod int
drainPodSelector string
skipWaitForDeleteTimeoutSeconds int
dsNamespace string
dsName string
lockAnnotation string
lockTTL time.Duration
lockReleaseDelay time.Duration
prometheusURL string
preferNoScheduleTaintName string
alertFilter *regexp.Regexp
alertFilterMatchOnly bool
alertFiringOnly bool
rebootSentinelFile string
rebootSentinelCommand string
notifyURL string
slackHookURL string
slackUsername string
slackChannel string
messageTemplateDrain string
messageTemplateReboot string
messageTemplateUncordon string
podSelectors []string
rebootCommand string
logFormat string
preRebootNodeLabels []string
postRebootNodeLabels []string
nodeID string
concurrency int
rebootDays []string
rebootStart string
rebootEnd string
timezone string
annotateNodes bool
// Metrics
rebootRequiredGauge = prometheus.NewGaugeVec(prometheus.GaugeOpts{
@@ -44,45 +93,212 @@ var (
}, []string{"node"})
)
const (
// KuredNodeLockAnnotation is the canonical string value for the kured node-lock annotation
KuredNodeLockAnnotation string = "weave.works/kured-node-lock"
// KuredRebootInProgressAnnotation is the canonical string value for the kured reboot-in-progress annotation
KuredRebootInProgressAnnotation string = "weave.works/kured-reboot-in-progress"
// KuredMostRecentRebootNeededAnnotation is the canonical string value for the kured most-recent-reboot-needed annotation
KuredMostRecentRebootNeededAnnotation string = "weave.works/kured-most-recent-reboot-needed"
// EnvPrefix The environment variable prefix of all environment variables bound to our command line flags.
EnvPrefix = "KURED"
)
func init() {
prometheus.MustRegister(rebootRequiredGauge)
}
func main() {
rootCmd := &cobra.Command{
Use: "kured",
Short: "Kubernetes Reboot Daemon",
Run: root}
cmd := NewRootCommand()
if err := cmd.Execute(); err != nil {
log.Fatal(err)
}
}
// NewRootCommand construct the Cobra root command
func NewRootCommand() *cobra.Command {
rootCmd := &cobra.Command{
Use: "kured",
Short: "Kubernetes Reboot Daemon",
PersistentPreRunE: bindViper,
PreRun: flagCheck,
Run: root}
rootCmd.PersistentFlags().StringVar(&nodeID, "node-id", "",
"node name kured runs on, should be passed down from spec.nodeName via KURED_NODE_ID environment variable")
rootCmd.PersistentFlags().BoolVar(&forceReboot, "force-reboot", false,
"force a reboot even if the drain fails or times out")
rootCmd.PersistentFlags().StringVar(&metricsHost, "metrics-host", "",
"host where metrics will listen")
rootCmd.PersistentFlags().IntVar(&metricsPort, "metrics-port", 8080,
"port number where metrics will listen")
rootCmd.PersistentFlags().IntVar(&drainGracePeriod, "drain-grace-period", -1,
"time in seconds given to each pod to terminate gracefully, if negative, the default value specified in the pod will be used")
rootCmd.PersistentFlags().StringVar(&drainPodSelector, "drain-pod-selector", "",
"only drain pods with labels matching the selector (default: '', all pods)")
rootCmd.PersistentFlags().IntVar(&skipWaitForDeleteTimeoutSeconds, "skip-wait-for-delete-timeout", 0,
"when seconds is greater than zero, skip waiting for the pods whose deletion timestamp is older than N seconds while draining a node")
rootCmd.PersistentFlags().DurationVar(&drainTimeout, "drain-timeout", 0,
"timeout after which the drain is aborted (default: 0, infinite time)")
rootCmd.PersistentFlags().DurationVar(&rebootDelay, "reboot-delay", 0,
"delay reboot for this duration (default: 0, disabled)")
rootCmd.PersistentFlags().DurationVar(&period, "period", time.Minute*60,
"reboot check period")
"sentinel check period")
rootCmd.PersistentFlags().StringVar(&dsNamespace, "ds-namespace", "kube-system",
"namespace containing daemonset on which to place lock")
rootCmd.PersistentFlags().StringVar(&dsName, "ds-name", "kured",
"name of daemonset on which to place lock")
rootCmd.PersistentFlags().StringVar(&lockAnnotation, "lock-annotation", "weave.works/kured-node-lock",
rootCmd.PersistentFlags().StringVar(&lockAnnotation, "lock-annotation", KuredNodeLockAnnotation,
"annotation in which to record locking node")
rootCmd.PersistentFlags().DurationVar(&lockTTL, "lock-ttl", 0,
"expire lock annotation after this duration (default: 0, disabled)")
rootCmd.PersistentFlags().DurationVar(&lockReleaseDelay, "lock-release-delay", 0,
"delay lock release for this duration (default: 0, disabled)")
rootCmd.PersistentFlags().StringVar(&prometheusURL, "prometheus-url", "",
"Prometheus instance to probe for active alerts")
rootCmd.PersistentFlags().Var(&regexpValue{&alertFilter}, "alert-filter-regexp",
"alert names to ignore when checking for active alerts")
rootCmd.PersistentFlags().StringVar(&rebootSentinel, "reboot-sentinel", "/var/run/reboot-required",
"path to file whose existence signals need to reboot")
rootCmd.PersistentFlags().BoolVar(&alertFilterMatchOnly, "alert-filter-match-only", false,
"Only block if the alert-filter-regexp matches active alerts")
rootCmd.PersistentFlags().BoolVar(&alertFiringOnly, "alert-firing-only", false,
"only consider firing alerts when checking for active alerts")
rootCmd.PersistentFlags().StringVar(&rebootSentinelFile, "reboot-sentinel", "/var/run/reboot-required",
"path to file whose existence triggers the reboot command")
rootCmd.PersistentFlags().StringVar(&preferNoScheduleTaintName, "prefer-no-schedule-taint", "",
"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.")
rootCmd.PersistentFlags().StringVar(&rebootSentinelCommand, "reboot-sentinel-command", "",
"command for which a zero return code will trigger a reboot command")
rootCmd.PersistentFlags().StringVar(&rebootCommand, "reboot-command", "/bin/systemctl reboot",
"command to run when a reboot is required")
rootCmd.PersistentFlags().IntVar(&concurrency, "concurrency", 1,
"amount of nodes to concurrently reboot. Defaults to 1")
rootCmd.PersistentFlags().StringVar(&slackHookURL, "slack-hook-url", "",
"slack hook URL for reboot notfications")
"slack hook URL for reboot notifications [deprecated in favor of --notify-url]")
rootCmd.PersistentFlags().StringVar(&slackUsername, "slack-username", "kured",
"slack username for reboot notfications")
"slack username for reboot notifications")
rootCmd.PersistentFlags().StringVar(&slackChannel, "slack-channel", "",
"slack channel for reboot notifications")
rootCmd.PersistentFlags().StringVar(&notifyURL, "notify-url", "",
"notify URL for reboot notifications (cannot use with --slack-hook-url flags)")
rootCmd.PersistentFlags().StringVar(&messageTemplateUncordon, "message-template-uncordon", "Node %s rebooted & uncordoned successfully!",
"message template used to notify about a node being successfully uncordoned")
rootCmd.PersistentFlags().StringVar(&messageTemplateDrain, "message-template-drain", "Draining node %s",
"message template used to notify about a node being drained")
rootCmd.PersistentFlags().StringVar(&messageTemplateReboot, "message-template-reboot", "Rebooting node %s",
"message template used to notify about a node being rebooted")
if err := rootCmd.Execute(); err != nil {
log.Fatal(err)
rootCmd.PersistentFlags().StringArrayVar(&podSelectors, "blocking-pod-selector", nil,
"label selector identifying pods whose presence should prevent reboots")
rootCmd.PersistentFlags().StringSliceVar(&rebootDays, "reboot-days", timewindow.EveryDay,
"schedule reboot on these days")
rootCmd.PersistentFlags().StringVar(&rebootStart, "start-time", "0:00",
"schedule reboot only after this time of day")
rootCmd.PersistentFlags().StringVar(&rebootEnd, "end-time", "23:59:59",
"schedule reboot only before this time of day")
rootCmd.PersistentFlags().StringVar(&timezone, "time-zone", "UTC",
"use this timezone for schedule inputs")
rootCmd.PersistentFlags().BoolVar(&annotateNodes, "annotate-nodes", false,
"if set, the annotations 'weave.works/kured-reboot-in-progress' and 'weave.works/kured-most-recent-reboot-needed' will be given to nodes undergoing kured reboots")
rootCmd.PersistentFlags().StringVar(&logFormat, "log-format", "text",
"use text or json log format")
rootCmd.PersistentFlags().StringSliceVar(&preRebootNodeLabels, "pre-reboot-node-labels", nil,
"labels to add to nodes before cordoning")
rootCmd.PersistentFlags().StringSliceVar(&postRebootNodeLabels, "post-reboot-node-labels", nil,
"labels to add to nodes after uncordoning")
return rootCmd
}
// func that checks for deprecated slack-notification-related flags and node labels that do not match
func flagCheck(cmd *cobra.Command, args []string) {
if slackHookURL != "" && notifyURL != "" {
log.Warnf("Cannot use both --notify-url and --slack-hook-url flags. Kured will use --notify-url flag only...")
}
if notifyURL != "" {
notifyURL = stripQuotes(notifyURL)
} else if slackHookURL != "" {
slackHookURL = stripQuotes(slackHookURL)
log.Warnf("Deprecated flag(s). Please use --notify-url flag instead.")
trataURL, err := url.Parse(slackHookURL)
if err != nil {
log.Warnf("slack-hook-url is not properly formatted... no notification will be sent: %v\n", err)
}
if len(strings.Split(strings.Trim(trataURL.Path, "/services/"), "/")) != 3 {
log.Warnf("slack-hook-url is not properly formatted... no notification will be sent: unexpected number of / in URL\n")
} else {
notifyURL = fmt.Sprintf("slack://%s", strings.Trim(trataURL.Path, "/services/"))
}
}
var preRebootNodeLabelKeys, postRebootNodeLabelKeys []string
for _, label := range preRebootNodeLabels {
preRebootNodeLabelKeys = append(preRebootNodeLabelKeys, strings.Split(label, "=")[0])
}
for _, label := range postRebootNodeLabels {
postRebootNodeLabelKeys = append(postRebootNodeLabelKeys, strings.Split(label, "=")[0])
}
sort.Strings(preRebootNodeLabelKeys)
sort.Strings(postRebootNodeLabelKeys)
if !reflect.DeepEqual(preRebootNodeLabelKeys, postRebootNodeLabelKeys) {
log.Warnf("pre-reboot-node-labels keys and post-reboot-node-labels keys do not match. This may result in unexpected behaviour.")
}
}
// stripQuotes removes any literal single or double quote chars that surround a string
func stripQuotes(str string) string {
if len(str) > 2 {
firstChar := str[0]
lastChar := str[len(str)-1]
if firstChar == lastChar && (firstChar == '"' || firstChar == '\'') {
return str[1 : len(str)-1]
}
}
// return the original string if it has a length of zero or one
return str
}
// bindViper initializes viper and binds command flags with environment variables
func bindViper(cmd *cobra.Command, args []string) error {
v := viper.New()
v.SetEnvPrefix(EnvPrefix)
v.AutomaticEnv()
bindFlags(cmd, v)
return nil
}
// bindFlags binds each cobra flag to its associated viper configuration (environment variable)
func bindFlags(cmd *cobra.Command, v *viper.Viper) {
cmd.Flags().VisitAll(func(f *pflag.Flag) {
// Environment variables can't have dashes in them, so bind them to their equivalent keys with underscores
if strings.Contains(f.Name, "-") {
v.BindEnv(f.Name, flagToEnvVar(f.Name))
}
// Apply the viper config value to the flag when the flag is not set and viper has a value
if !f.Changed && v.IsSet(f.Name) {
val := v.Get(f.Name)
log.Infof("Binding %s command flag to environment variable: %s", f.Name, flagToEnvVar(f.Name))
cmd.Flags().Set(f.Name, fmt.Sprintf("%v", val))
}
})
}
// flagToEnvVar converts command flag name to equivalent environment variable name
func flagToEnvVar(flag string) string {
envVarSuffix := strings.ToUpper(strings.ReplaceAll(flag, "-", "_"))
return fmt.Sprintf("%s_%s", EnvPrefix, envVarSuffix)
}
// newCommand creates a new Command with stdout/stderr wired to our standard logger
func newCommand(name string, arg ...string) *exec.Cmd {
cmd := exec.Command(name, arg...)
cmd.Stdout = log.NewEntry(log.StandardLogger()).
WithField("cmd", cmd.Args[0]).
WithField("std", "out").
@@ -96,50 +312,130 @@ func newCommand(name string, arg ...string) *exec.Cmd {
return cmd
}
func sentinelExists() bool {
_, err := os.Stat(rebootSentinel)
switch {
case err == nil:
return true
case os.IsNotExist(err):
return false
default:
log.Fatalf("Unable to determine existence of sentinel: %v", err)
return false // unreachable; prevents compilation error
}
// buildHostCommand writes a new command to run in the host namespace
// Rancher based need different pid
func buildHostCommand(pid int, command []string) []string {
// From the container, we nsenter into the proper PID to run the hostCommand.
// For this, kured daemonset need to be configured with hostPID:true and privileged:true
cmd := []string{"/usr/bin/nsenter", fmt.Sprintf("-m/proc/%d/ns/mnt", pid), "--"}
cmd = append(cmd, command...)
return cmd
}
func rebootRequired() bool {
if sentinelExists() {
log.Infof("Reboot required")
return true
} else {
log.Infof("Reboot not required")
return false
func rebootRequired(sentinelCommand []string) bool {
cmd := newCommand(sentinelCommand[0], sentinelCommand[1:]...)
if err := cmd.Run(); err != nil {
switch err := err.(type) {
case *exec.ExitError:
// We assume a non-zero exit code means 'reboot not required', but of course
// the user could have misconfigured the sentinel command or something else
// went wrong during its execution. In that case, not entering a reboot loop
// is the right thing to do, and we are logging stdout/stderr of the command
// so it should be obvious what is wrong.
if cmd.ProcessState.ExitCode() != 1 {
log.Warnf("sentinel command ended with unexpected exit code: %v", cmd.ProcessState.ExitCode())
}
return false
default:
// Something was grossly misconfigured, such as the command path being wrong.
log.Fatalf("Error invoking sentinel command: %v", err)
}
}
return true
}
func rebootBlocked() bool {
if prometheusURL != "" {
alertNames, err := alerts.PrometheusActiveAlerts(prometheusURL, alertFilter)
// RebootBlocker interface should be implemented by types
// to know if their instantiations should block a reboot
type RebootBlocker interface {
isBlocked() bool
}
// PrometheusBlockingChecker contains info for connecting
// to prometheus, and can give info about whether a reboot should be blocked
type PrometheusBlockingChecker struct {
// prometheusClient to make prometheus-go-client and api config available
// into the PrometheusBlockingChecker struct
promClient *alerts.PromClient
// regexp used to get alerts
filter *regexp.Regexp
// bool to indicate if only firing alerts should be considered
firingOnly bool
// bool to indicate that we're only blocking on alerts which match the filter
filterMatchOnly bool
}
// KubernetesBlockingChecker contains info for connecting
// to k8s, and can give info about whether a reboot should be blocked
type KubernetesBlockingChecker struct {
// client used to contact kubernetes API
client *kubernetes.Clientset
nodename string
// lised used to filter pods (podSelector)
filter []string
}
func (pb PrometheusBlockingChecker) isBlocked() bool {
alertNames, err := pb.promClient.ActiveAlerts(pb.filter, pb.firingOnly, pb.filterMatchOnly)
if err != nil {
log.Warnf("Reboot blocked: prometheus query error: %v", err)
return true
}
count := len(alertNames)
if count > 10 {
alertNames = append(alertNames[:10], "...")
}
if count > 0 {
log.Warnf("Reboot blocked: %d active alerts: %v", count, alertNames)
return true
}
return false
}
func (kb KubernetesBlockingChecker) isBlocked() bool {
fieldSelector := fmt.Sprintf("spec.nodeName=%s,status.phase!=Succeeded,status.phase!=Failed,status.phase!=Unknown", kb.nodename)
for _, labelSelector := range kb.filter {
podList, err := kb.client.CoreV1().Pods("").List(context.TODO(), metav1.ListOptions{
LabelSelector: labelSelector,
FieldSelector: fieldSelector,
Limit: 10})
if err != nil {
log.Warnf("Reboot blocked: prometheus query error: %v", err)
log.Warnf("Reboot blocked: pod query error: %v", err)
return true
}
count := len(alertNames)
if count > 10 {
alertNames = append(alertNames[:10], "...")
}
if count > 0 {
log.Warnf("Reboot blocked: %d active alerts: %v", count, alertNames)
if len(podList.Items) > 0 {
podNames := make([]string, 0, len(podList.Items))
for _, pod := range podList.Items {
podNames = append(podNames, pod.Name)
}
if len(podList.Continue) > 0 {
podNames = append(podNames, "...")
}
log.Warnf("Reboot blocked: matching pods: %v", podNames)
return true
}
}
return false
}
func holding(lock *daemonsetlock.DaemonSetLock, metadata interface{}) bool {
holding, err := lock.Test(metadata)
func rebootBlocked(blockers ...RebootBlocker) bool {
for _, blocker := range blockers {
if blocker.isBlocked() {
return true
}
}
return false
}
func holding(lock *daemonsetlock.DaemonSetLock, metadata interface{}, isMultiLock bool) bool {
var holding bool
var err error
if isMultiLock {
holding, err = lock.TestMultiple()
} else {
holding, err = lock.Test(metadata)
}
if err != nil {
log.Fatalf("Error testing lock: %v", err)
}
@@ -149,8 +445,17 @@ func holding(lock *daemonsetlock.DaemonSetLock, metadata interface{}) bool {
return holding
}
func acquire(lock *daemonsetlock.DaemonSetLock, metadata interface{}) bool {
holding, holder, err := lock.Acquire(metadata)
func acquire(lock *daemonsetlock.DaemonSetLock, metadata interface{}, TTL time.Duration, maxOwners int) bool {
var holding bool
var holder string
var err error
if maxOwners > 1 {
var holders []string
holding, holders, err = lock.AcquireMultiple(metadata, TTL, maxOwners)
holder = strings.Join(holders, ",")
} else {
holding, holder, err = lock.Acquire(metadata, TTL)
}
switch {
case err != nil:
log.Fatalf("Error acquiring lock: %v", err)
@@ -164,50 +469,103 @@ func acquire(lock *daemonsetlock.DaemonSetLock, metadata interface{}) bool {
}
}
func release(lock *daemonsetlock.DaemonSetLock) {
func throttle(releaseDelay time.Duration) {
if releaseDelay > 0 {
log.Infof("Delaying lock release by %v", releaseDelay)
time.Sleep(releaseDelay)
}
}
func release(lock *daemonsetlock.DaemonSetLock, isMultiLock bool) {
log.Infof("Releasing lock")
if err := lock.Release(); err != nil {
var err error
if isMultiLock {
err = lock.ReleaseMultiple()
} else {
err = lock.Release()
}
if err != nil {
log.Fatalf("Error releasing lock: %v", err)
}
}
func drain(nodeID string) {
log.Infof("Draining node %s", nodeID)
drainCmd := newCommand("/usr/bin/kubectl", "drain",
"--ignore-daemonsets", "--delete-local-data", "--force", nodeID)
func drain(client *kubernetes.Clientset, node *v1.Node) error {
nodename := node.GetName()
if err := drainCmd.Run(); err != nil {
log.Fatalf("Error invoking drain command: %v", err)
if preRebootNodeLabels != nil {
updateNodeLabels(client, node, preRebootNodeLabels)
}
}
func uncordon(nodeID string) {
log.Infof("Uncordoning node %s", nodeID)
uncordonCmd := newCommand("/usr/bin/kubectl", "uncordon", nodeID)
if err := uncordonCmd.Run(); err != nil {
log.Fatalf("Error invoking uncordon command: %v", err)
}
}
log.Infof("Draining node %s", nodename)
func commandReboot(nodeID string) {
log.Infof("Commanding reboot")
if slackHookURL != "" {
if err := slack.NotifyReboot(slackHookURL, slackUsername, nodeID); err != nil {
log.Warnf("Error notifying slack: %v", err)
if notifyURL != "" {
if err := shoutrrr.Send(notifyURL, fmt.Sprintf(messageTemplateDrain, nodename)); err != nil {
log.Warnf("Error notifying: %v", err)
}
}
// Relies on /var/run/dbus/system_bus_socket bind mount to talk to systemd
rebootCmd := newCommand("/bin/systemctl", "reboot")
if err := rebootCmd.Run(); err != nil {
drainer := &kubectldrain.Helper{
Client: client,
Ctx: context.Background(),
GracePeriodSeconds: drainGracePeriod,
PodSelector: drainPodSelector,
SkipWaitForDeleteTimeoutSeconds: skipWaitForDeleteTimeoutSeconds,
Force: true,
DeleteEmptyDirData: true,
IgnoreAllDaemonSets: true,
ErrOut: os.Stderr,
Out: os.Stdout,
Timeout: drainTimeout,
}
if err := kubectldrain.RunCordonOrUncordon(drainer, node, true); err != nil {
log.Errorf("Error cordonning %s: %v", nodename, err)
return err
}
if err := kubectldrain.RunNodeDrain(drainer, nodename); err != nil {
log.Errorf("Error draining %s: %v", nodename, err)
return err
}
return nil
}
func uncordon(client *kubernetes.Clientset, node *v1.Node) error {
nodename := node.GetName()
log.Infof("Uncordoning node %s", nodename)
drainer := &kubectldrain.Helper{
Client: client,
ErrOut: os.Stderr,
Out: os.Stdout,
Ctx: context.Background(),
}
if err := kubectldrain.RunCordonOrUncordon(drainer, node, false); err != nil {
log.Fatalf("Error uncordonning %s: %v", nodename, err)
return err
} else if postRebootNodeLabels != nil {
updateNodeLabels(client, node, postRebootNodeLabels)
}
return nil
}
func invokeReboot(nodeID string, rebootCommand []string) {
log.Infof("Running command: %s for node: %s", rebootCommand, nodeID)
if notifyURL != "" {
if err := shoutrrr.Send(notifyURL, fmt.Sprintf(messageTemplateReboot, nodeID)); err != nil {
log.Warnf("Error notifying: %v", err)
}
}
if err := newCommand(rebootCommand[0], rebootCommand[1:]...).Run(); err != nil {
log.Fatalf("Error invoking reboot command: %v", err)
}
}
func maintainRebootRequiredMetric(nodeID string) {
func maintainRebootRequiredMetric(nodeID string, sentinelCommand []string) {
for {
if sentinelExists() {
if rebootRequired(sentinelCommand) {
rebootRequiredGauge.WithLabelValues(nodeID).Set(1)
} else {
rebootRequiredGauge.WithLabelValues(nodeID).Set(0)
@@ -221,7 +579,81 @@ type nodeMeta struct {
Unschedulable bool `json:"unschedulable"`
}
func rebootAsRequired(nodeID string) {
func addNodeAnnotations(client *kubernetes.Clientset, nodeID string, annotations map[string]string) error {
node, err := client.CoreV1().Nodes().Get(context.TODO(), nodeID, metav1.GetOptions{})
if err != nil {
log.Errorf("Error retrieving node object via k8s API: %s", err)
return err
}
for k, v := range annotations {
node.Annotations[k] = v
log.Infof("Adding node %s annotation: %s=%s", node.GetName(), k, v)
}
bytes, err := json.Marshal(node)
if err != nil {
log.Errorf("Error marshalling node object into JSON: %v", err)
return err
}
_, err = client.CoreV1().Nodes().Patch(context.TODO(), node.GetName(), types.StrategicMergePatchType, bytes, metav1.PatchOptions{})
if err != nil {
var annotationsErr string
for k, v := range annotations {
annotationsErr += fmt.Sprintf("%s=%s ", k, v)
}
log.Errorf("Error adding node annotations %s via k8s API: %v", annotationsErr, err)
return err
}
return nil
}
func deleteNodeAnnotation(client *kubernetes.Clientset, nodeID, key string) error {
log.Infof("Deleting node %s annotation %s", nodeID, key)
// JSON Patch takes as path input a JSON Pointer, defined in RFC6901
// So we replace all instances of "/" with "~1" as per:
// https://tools.ietf.org/html/rfc6901#section-3
patch := []byte(fmt.Sprintf("[{\"op\":\"remove\",\"path\":\"/metadata/annotations/%s\"}]", strings.ReplaceAll(key, "/", "~1")))
_, err := client.CoreV1().Nodes().Patch(context.TODO(), nodeID, types.JSONPatchType, patch, metav1.PatchOptions{})
if err != nil {
log.Errorf("Error deleting node annotation %s via k8s API: %v", key, err)
return err
}
return nil
}
func updateNodeLabels(client *kubernetes.Clientset, node *v1.Node, labels []string) {
labelsMap := make(map[string]string)
for _, label := range labels {
k := strings.Split(label, "=")[0]
v := strings.Split(label, "=")[1]
labelsMap[k] = v
log.Infof("Updating node %s label: %s=%s", node.GetName(), k, v)
}
bytes, err := json.Marshal(map[string]interface{}{
"metadata": map[string]interface{}{
"labels": labelsMap,
},
})
if err != nil {
log.Fatalf("Error marshalling node object into JSON: %v", err)
}
_, err = client.CoreV1().Nodes().Patch(context.TODO(), node.GetName(), types.StrategicMergePatchType, bytes, metav1.PatchOptions{})
if err != nil {
var labelsErr string
for _, label := range labels {
k := strings.Split(label, "=")[0]
v := strings.Split(label, "=")[1]
labelsErr += fmt.Sprintf("%s=%s ", k, v)
}
log.Errorf("Error updating node labels %s via k8s API: %v", labelsErr, err)
}
}
func rebootAsRequired(nodeID string, rebootCommand []string, sentinelCommand []string, window *timewindow.TimeWindow, TTL time.Duration, releaseDelay time.Duration) {
config, err := rest.InClusterConfig()
if err != nil {
log.Fatal(err)
@@ -235,52 +667,217 @@ func rebootAsRequired(nodeID string) {
lock := daemonsetlock.New(client, nodeID, dsNamespace, dsName, lockAnnotation)
nodeMeta := nodeMeta{}
if holding(lock, &nodeMeta) {
if !nodeMeta.Unschedulable {
uncordon(nodeID)
source := rand.NewSource(time.Now().UnixNano())
tick := delaytick.New(source, 1*time.Minute)
for range tick {
if holding(lock, &nodeMeta, concurrency > 1) {
node, err := client.CoreV1().Nodes().Get(context.TODO(), nodeID, metav1.GetOptions{})
if err != nil {
log.Errorf("Error retrieving node object via k8s API: %v", err)
continue
}
if !nodeMeta.Unschedulable {
err = uncordon(client, node)
if err != nil {
log.Errorf("Unable to uncordon %s: %v, will continue to hold lock and retry uncordon", node.GetName(), err)
continue
} else {
if notifyURL != "" {
if err := shoutrrr.Send(notifyURL, fmt.Sprintf(messageTemplateUncordon, nodeID)); err != nil {
log.Warnf("Error notifying: %v", err)
}
}
}
}
// If we're holding the lock we know we've tried, in a prior run, to reboot
// So (1) we want to confirm that the reboot succeeded practically ( !rebootRequired() )
// And (2) check if we previously annotated the node that it was in the process of being rebooted,
// And finally (3) if it has that annotation, to delete it.
// This indicates to other node tools running on the cluster that this node may be a candidate for maintenance
if annotateNodes && !rebootRequired(sentinelCommand) {
if _, ok := node.Annotations[KuredRebootInProgressAnnotation]; ok {
err := deleteNodeAnnotation(client, nodeID, KuredRebootInProgressAnnotation)
if err != nil {
continue
}
}
}
throttle(releaseDelay)
release(lock, concurrency > 1)
break
} else {
break
}
release(lock)
}
source := rand.NewSource(time.Now().UnixNano())
tick := delaytick.New(source, period)
for _ = range tick {
if rebootRequired() && !rebootBlocked() {
node, err := client.CoreV1().Nodes().Get(nodeID, metav1.GetOptions{})
if err != nil {
log.Fatal(err)
}
nodeMeta.Unschedulable = node.Spec.Unschedulable
preferNoScheduleTaint := taints.New(client, nodeID, preferNoScheduleTaintName, v1.TaintEffectPreferNoSchedule)
if acquire(lock, &nodeMeta) {
if !nodeMeta.Unschedulable {
drain(nodeID)
}
commandReboot(nodeID)
for {
log.Infof("Waiting for reboot")
time.Sleep(time.Minute)
// Remove taint immediately during startup to quickly allow scheduling again.
if !rebootRequired(sentinelCommand) {
preferNoScheduleTaint.Disable()
}
// instantiate prometheus client
promClient, err := alerts.NewPromClient(papi.Config{Address: prometheusURL})
if err != nil {
log.Fatal("Unable to create prometheus client: ", err)
}
source = rand.NewSource(time.Now().UnixNano())
tick = delaytick.New(source, period)
for range tick {
if !window.Contains(time.Now()) {
// Remove taint outside the reboot time window to allow for normal operation.
preferNoScheduleTaint.Disable()
continue
}
if !rebootRequired(sentinelCommand) {
log.Infof("Reboot not required")
preferNoScheduleTaint.Disable()
continue
}
node, err := client.CoreV1().Nodes().Get(context.TODO(), nodeID, metav1.GetOptions{})
if err != nil {
log.Fatalf("Error retrieving node object via k8s API: %v", err)
}
nodeMeta.Unschedulable = node.Spec.Unschedulable
var timeNowString string
if annotateNodes {
if _, ok := node.Annotations[KuredRebootInProgressAnnotation]; !ok {
timeNowString = time.Now().Format(time.RFC3339)
// Annotate this node to indicate that "I am going to be rebooted!"
// so that other node maintenance tools running on the cluster are aware that this node is in the process of a "state transition"
annotations := map[string]string{KuredRebootInProgressAnnotation: timeNowString}
// & annotate this node with a timestamp so that other node maintenance tools know how long it's been since this node has been marked for reboot
annotations[KuredMostRecentRebootNeededAnnotation] = timeNowString
err := addNodeAnnotations(client, nodeID, annotations)
if err != nil {
continue
}
}
}
var blockCheckers []RebootBlocker
if prometheusURL != "" {
blockCheckers = append(blockCheckers, PrometheusBlockingChecker{promClient: promClient, filter: alertFilter, firingOnly: alertFiringOnly, filterMatchOnly: alertFilterMatchOnly})
}
if podSelectors != nil {
blockCheckers = append(blockCheckers, KubernetesBlockingChecker{client: client, nodename: nodeID, filter: podSelectors})
}
var rebootRequiredBlockCondition string
if rebootBlocked(blockCheckers...) {
rebootRequiredBlockCondition = ", but blocked at this time"
continue
}
log.Infof("Reboot required%s", rebootRequiredBlockCondition)
if !holding(lock, &nodeMeta, concurrency > 1) && !acquire(lock, &nodeMeta, TTL, concurrency) {
// Prefer to not schedule pods onto this node to avoid draing the same pod multiple times.
preferNoScheduleTaint.Enable()
continue
}
err = drain(client, node)
if err != nil {
if !forceReboot {
log.Errorf("Unable to cordon or drain %s: %v, will release lock and retry cordon and drain before rebooting when lock is next acquired", node.GetName(), err)
release(lock, concurrency > 1)
log.Infof("Performing a best-effort uncordon after failed cordon and drain")
uncordon(client, node)
continue
}
}
if rebootDelay > 0 {
log.Infof("Delaying reboot for %v", rebootDelay)
time.Sleep(rebootDelay)
}
invokeReboot(nodeID, rebootCommand)
for {
log.Infof("Waiting for reboot")
time.Sleep(time.Minute)
}
}
}
// buildSentinelCommand creates the shell command line which will need wrapping to escape
// the container boundaries
func buildSentinelCommand(rebootSentinelFile string, rebootSentinelCommand string) []string {
if rebootSentinelCommand != "" {
cmd, err := shlex.Split(rebootSentinelCommand)
if err != nil {
log.Fatalf("Error parsing provided sentinel command: %v", err)
}
return cmd
}
return []string{"test", "-f", rebootSentinelFile}
}
// parseRebootCommand creates the shell command line which will need wrapping to escape
// the container boundaries
func parseRebootCommand(rebootCommand string) []string {
command, err := shlex.Split(rebootCommand)
if err != nil {
log.Fatalf("Error parsing provided reboot command: %v", err)
}
return command
}
func root(cmd *cobra.Command, args []string) {
if logFormat == "json" {
log.SetFormatter(&log.JSONFormatter{})
}
log.Infof("Kubernetes Reboot Daemon: %s", version)
nodeID := os.Getenv("KURED_NODE_ID")
if nodeID == "" {
log.Fatal("KURED_NODE_ID environment variable required")
}
window, err := timewindow.New(rebootDays, rebootStart, rebootEnd, timezone)
if err != nil {
log.Fatalf("Failed to build time window: %v", err)
}
sentinelCommand := buildSentinelCommand(rebootSentinelFile, rebootSentinelCommand)
restartCommand := parseRebootCommand(rebootCommand)
log.Infof("Node ID: %s", nodeID)
log.Infof("Lock Annotation: %s/%s:%s", dsNamespace, dsName, lockAnnotation)
log.Infof("Reboot Sentinel: %s every %v", rebootSentinel, period)
if lockTTL > 0 {
log.Infof("Lock TTL set, lock will expire after: %v", lockTTL)
} else {
log.Info("Lock TTL not set, lock will remain until being released")
}
if lockReleaseDelay > 0 {
log.Infof("Lock release delay set, lock release will be delayed by: %v", lockReleaseDelay)
} else {
log.Info("Lock release delay not set, lock will be released immediately after rebooting")
}
log.Infof("PreferNoSchedule taint: %s", preferNoScheduleTaintName)
log.Infof("Blocking Pod Selectors: %v", podSelectors)
log.Infof("Reboot schedule: %v", window)
log.Infof("Reboot check command: %s every %v", sentinelCommand, period)
log.Infof("Concurrency: %v", concurrency)
log.Infof("Reboot command: %s", restartCommand)
if annotateNodes {
log.Infof("Will annotate nodes during kured reboot operations")
}
go rebootAsRequired(nodeID)
go maintainRebootRequiredMetric(nodeID)
// To run those commands as it was the host, we'll use nsenter
// Relies on hostPID:true and privileged:true to enter host mount space
// PID set to 1, until we have a better discovery mechanism.
hostSentinelCommand := buildHostCommand(1, sentinelCommand)
hostRestartCommand := buildHostCommand(1, restartCommand)
go rebootAsRequired(nodeID, hostRestartCommand, hostSentinelCommand, window, lockTTL, lockReleaseDelay)
go maintainRebootRequiredMetric(nodeID, hostSentinelCommand)
http.Handle("/metrics", promhttp.Handler())
log.Fatal(http.ListenAndServe(":8080", nil))
log.Fatal(http.ListenAndServe(fmt.Sprintf("%s:%d", metricsHost, metricsPort), nil))
}

310
cmd/kured/main_test.go Normal file
View File

@@ -0,0 +1,310 @@
package main
import (
"reflect"
"testing"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/kubereboot/kured/pkg/alerts"
assert "gotest.tools/v3/assert"
papi "github.com/prometheus/client_golang/api"
)
type BlockingChecker struct {
blocking bool
}
func (fbc BlockingChecker) isBlocked() bool {
return fbc.blocking
}
var _ RebootBlocker = BlockingChecker{} // Verify that Type implements Interface.
var _ RebootBlocker = (*BlockingChecker)(nil) // Verify that *Type implements Interface.
func Test_flagCheck(t *testing.T) {
var cmd *cobra.Command
var args []string
slackHookURL = "https://hooks.slack.com/services/BLABLABA12345/IAM931A0VERY/COMPLICATED711854TOKEN1SET"
expected := "slack://BLABLABA12345/IAM931A0VERY/COMPLICATED711854TOKEN1SET"
flagCheck(cmd, args)
if notifyURL != expected {
t.Errorf("Slack URL Parsing is wrong: expecting %s but got %s\n", expected, notifyURL)
}
// validate that surrounding quotes are stripped
slackHookURL = "\"https://hooks.slack.com/services/BLABLABA12345/IAM931A0VERY/COMPLICATED711854TOKEN1SET\""
expected = "slack://BLABLABA12345/IAM931A0VERY/COMPLICATED711854TOKEN1SET"
flagCheck(cmd, args)
if notifyURL != expected {
t.Errorf("Slack URL Parsing is wrong: expecting %s but got %s\n", expected, notifyURL)
}
slackHookURL = "'https://hooks.slack.com/services/BLABLABA12345/IAM931A0VERY/COMPLICATED711854TOKEN1SET'"
expected = "slack://BLABLABA12345/IAM931A0VERY/COMPLICATED711854TOKEN1SET"
flagCheck(cmd, args)
if notifyURL != expected {
t.Errorf("Slack URL Parsing is wrong: expecting %s but got %s\n", expected, notifyURL)
}
slackHookURL = ""
notifyURL = "\"teams://79b4XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX@acd8XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/204cXXXXXXXXXXXXXXXXXXXXXXXXXXXX/a1f8XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX?host=XXXX.webhook.office.com\""
expected = "teams://79b4XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX@acd8XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/204cXXXXXXXXXXXXXXXXXXXXXXXXXXXX/a1f8XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX?host=XXXX.webhook.office.com"
flagCheck(cmd, args)
if notifyURL != expected {
t.Errorf("notifyURL Parsing is wrong: expecting %s but got %s\n", expected, notifyURL)
}
notifyURL = "'teams://79b4XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX@acd8XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/204cXXXXXXXXXXXXXXXXXXXXXXXXXXXX/a1f8XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX?host=XXXX.webhook.office.com'"
expected = "teams://79b4XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX@acd8XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/204cXXXXXXXXXXXXXXXXXXXXXXXXXXXX/a1f8XXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX?host=XXXX.webhook.office.com"
flagCheck(cmd, args)
if notifyURL != expected {
t.Errorf("notifyURL Parsing is wrong: expecting %s but got %s\n", expected, notifyURL)
}
}
func Test_stripQuotes(t *testing.T) {
tests := []struct {
name string
input string
expected string
}{
{
name: "string with no surrounding quotes is unchanged",
input: "Hello, world!",
expected: "Hello, world!",
},
{
name: "string with surrounding double quotes should strip quotes",
input: "\"Hello, world!\"",
expected: "Hello, world!",
},
{
name: "string with surrounding single quotes should strip quotes",
input: "'Hello, world!'",
expected: "Hello, world!",
},
{
name: "string with unbalanced surrounding quotes is unchanged",
input: "'Hello, world!\"",
expected: "'Hello, world!\"",
},
{
name: "string with length of one is unchanged",
input: "'",
expected: "'",
},
{
name: "string with length of zero is unchanged",
input: "",
expected: "",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := stripQuotes(tt.input); !reflect.DeepEqual(got, tt.expected) {
t.Errorf("stripQuotes() = %v, expected %v", got, tt.expected)
}
})
}
}
func Test_rebootBlocked(t *testing.T) {
noCheckers := []RebootBlocker{}
nonblockingChecker := BlockingChecker{blocking: false}
blockingChecker := BlockingChecker{blocking: true}
// Instantiate a prometheusClient with a broken_url
promClient, err := alerts.NewPromClient(papi.Config{Address: "broken_url"})
if err != nil {
log.Fatal("Can't create prometheusClient: ", err)
}
brokenPrometheusClient := PrometheusBlockingChecker{promClient: promClient, filter: nil, firingOnly: false}
type args struct {
blockers []RebootBlocker
}
tests := []struct {
name string
args args
want bool
}{
{
name: "Do not block on no blocker defined",
args: args{blockers: noCheckers},
want: false,
},
{
name: "Ensure a blocker blocks",
args: args{blockers: []RebootBlocker{blockingChecker}},
want: true,
},
{
name: "Ensure a non-blocker doesn't block",
args: args{blockers: []RebootBlocker{nonblockingChecker}},
want: false,
},
{
name: "Ensure one blocker is enough to block",
args: args{blockers: []RebootBlocker{nonblockingChecker, blockingChecker}},
want: true,
},
{
name: "Do block on error contacting prometheus API",
args: args{blockers: []RebootBlocker{brokenPrometheusClient}},
want: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := rebootBlocked(tt.args.blockers...); got != tt.want {
t.Errorf("rebootBlocked() = %v, want %v", got, tt.want)
}
})
}
}
func Test_buildHostCommand(t *testing.T) {
type args struct {
pid int
command []string
}
tests := []struct {
name string
args args
want []string
}{
{
name: "Ensure command will run with nsenter",
args: args{pid: 1, command: []string{"ls", "-Fal"}},
want: []string{"/usr/bin/nsenter", "-m/proc/1/ns/mnt", "--", "ls", "-Fal"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := buildHostCommand(tt.args.pid, tt.args.command); !reflect.DeepEqual(got, tt.want) {
t.Errorf("buildHostCommand() = %v, want %v", got, tt.want)
}
})
}
}
func Test_buildSentinelCommand(t *testing.T) {
type args struct {
rebootSentinelFile string
rebootSentinelCommand string
}
tests := []struct {
name string
args args
want []string
}{
{
name: "Ensure a sentinelFile generates a shell 'test' command with the right file",
args: args{
rebootSentinelFile: "/test1",
rebootSentinelCommand: "",
},
want: []string{"test", "-f", "/test1"},
},
{
name: "Ensure a sentinelCommand has priority over a sentinelFile if both are provided (because sentinelFile is always provided)",
args: args{
rebootSentinelFile: "/test1",
rebootSentinelCommand: "/sbin/reboot-required -r",
},
want: []string{"/sbin/reboot-required", "-r"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := buildSentinelCommand(tt.args.rebootSentinelFile, tt.args.rebootSentinelCommand); !reflect.DeepEqual(got, tt.want) {
t.Errorf("buildSentinelCommand() = %v, want %v", got, tt.want)
}
})
}
}
func Test_parseRebootCommand(t *testing.T) {
type args struct {
rebootCommand string
}
tests := []struct {
name string
args args
want []string
}{
{
name: "Ensure a reboot command is properly parsed",
args: args{
rebootCommand: "/sbin/systemctl reboot",
},
want: []string{"/sbin/systemctl", "reboot"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := parseRebootCommand(tt.args.rebootCommand); !reflect.DeepEqual(got, tt.want) {
t.Errorf("parseRebootCommand() = %v, want %v", got, tt.want)
}
})
}
}
func Test_rebootRequired(t *testing.T) {
type args struct {
sentinelCommand []string
}
tests := []struct {
name string
args args
want bool
}{
{
name: "Ensure rc = 0 means reboot required",
args: args{
sentinelCommand: []string{"true"},
},
want: true,
},
{
name: "Ensure rc != 0 means reboot NOT required",
args: args{
sentinelCommand: []string{"false"},
},
want: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := rebootRequired(tt.args.sentinelCommand); got != tt.want {
t.Errorf("rebootRequired() = %v, want %v", got, tt.want)
}
})
}
}
func Test_rebootRequired_fatals(t *testing.T) {
cases := []struct {
param []string
expectFatal bool
}{
{
param: []string{"true"},
expectFatal: false,
},
{
param: []string{"./babar"},
expectFatal: true,
},
}
defer func() { log.StandardLogger().ExitFunc = nil }()
var fatal bool
log.StandardLogger().ExitFunc = func(int) { fatal = true }
for _, c := range cases {
fatal = false
rebootRequired(c.param)
assert.Equal(t, c.expectFatal, fatal)
}
}

View File

@@ -1,23 +0,0 @@
package main
import (
"fmt"
"log"
"os"
"regexp"
"github.com/weaveworks/kured/pkg/alerts"
)
func main() {
if len(os.Args) != 3 {
log.Fatalf("USAGE: %s <prometheusURL> <filterRegexp>", os.Args[0])
}
count, err := alerts.PrometheusCountActive(os.Args[1], regexp.MustCompile(os.Args[2]))
if err != nil {
log.Fatal(err)
}
fmt.Println(count)
}

105
go.mod Normal file
View File

@@ -0,0 +1,105 @@
module github.com/kubereboot/kured
go 1.20
replace golang.org/x/net => golang.org/x/net v0.7.0
replace github.com/emicklei/go-restful/v3 => github.com/emicklei/go-restful/v3 v3.10.2
require (
github.com/containrrr/shoutrrr v0.7.1
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/google/uuid v1.3.0 // indirect
github.com/prometheus/client_golang v1.16.0
github.com/prometheus/common v0.44.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
gotest.tools/v3 v3.5.0
k8s.io/api v0.27.4
k8s.io/apimachinery v0.27.4
k8s.io/client-go v0.27.4
k8s.io/kubectl v0.27.4
)
require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/chai2010/gettext-go v1.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d // indirect
github.com/fatih/color v1.14.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.1 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.17 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/client_model v0.4.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/xlab/treeprint v1.1.0 // indirect
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sys v0.8.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.9.0 // indirect
golang.org/x/time v0.1.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/cli-runtime v0.27.4 // indirect
k8s.io/component-base v0.27.4 // indirect
k8s.io/klog/v2 v2.90.1 // indirect
k8s.io/kube-openapi v0.0.0-20230501164219-8b0f38b5fd1f // indirect
k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.2 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.1 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

1245
go.sum Normal file

File diff suppressed because it is too large Load Diff

BIN
img/cncf-color.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -1,32 +1,46 @@
apiVersion: extensions/v1beta1
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kured
namespace: kube-system
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: kured # Must match `--ds-name`
name: kured # Must match `--ds-name`
namespace: kube-system # Must match `--ds-namespace`
spec:
selector:
matchLabels:
name: kured
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
name: kured
spec:
serviceAccountName: kured
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
- key: node-role.kubernetes.io/master
effect: NoSchedule
hostPID: true # Facilitate entering the host mount namespace via init
restartPolicy: Always
containers:
- name: kured
image: quay.io/weaveworks/kured
# If you find yourself here wondering why there is no
# :latest tag on Docker Hub,see the FAQ in the README
image: ghcr.io/kubereboot/kured:1.14.0
imagePullPolicy: IfNotPresent
command:
- /usr/bin/kured
# args:
# - --alert-filter-regexp=^RebootRequired$
# - --ds-name=kured
# - --ds-namespace=kube-system
# - --lock-annotation=weave.works/kured-node-lock
# - --period=1h
# - --prometheus-url=http://prometheus.monitoring.svc.cluster.local
# - --reboot-sentinel=/var/run/reboot-required
# - --slack-hook-url=https://hooks.slack.com/...
# - --slack-username=prod
#
# NO USER SERVICEABLE PARTS BEYOND THIS POINT
securityContext:
privileged: true # Give permission to nsenter /proc/1/ns/mnt
readOnlyRootFilesystem: true
ports:
- containerPort: 8080
name: metrics
env:
# Pass in the name of the node on which this pod is scheduled
# for use with drain/uncordon operations and lock acquisition
@@ -34,14 +48,43 @@ spec:
valueFrom:
fieldRef:
fieldPath: spec.nodeName
volumeMounts:
# Needed for two purposes:
# * Testing for the existence of /var/run/reboot-required
# * Accessing /var/run/dbus/system_bus_socket to effect reboot
- name: hostrun
mountPath: /var/run
restartPolicy: Always
volumes:
- name: hostrun
hostPath:
path: /var/run
command:
- /usr/bin/kured
# - --force-reboot=false
# - --drain-grace-period=-1
# - --skip-wait-for-delete-timeout=0
# - --drain-timeout=0
# - --drain-pod-selector=""
# - --period=1h
# - --ds-namespace=kube-system
# - --ds-name=kured
# - --lock-annotation=weave.works/kured-node-lock
# - --lock-ttl=0
# - --prometheus-url=http://prometheus.monitoring.svc.cluster.local
# - --alert-filter-regexp=^RebootRequired$
# - --alert-filter-match-only=false
# - --alert-firing-only=false
# - --reboot-sentinel=/var/run/reboot-required
# - --prefer-no-schedule-taint=""
# - --reboot-sentinel-command=""
# - --slack-hook-url=https://hooks.slack.com/...
# - --slack-username=prod
# - --slack-channel=alerting
# - --notify-url="" # See also shoutrrr url format
# - --message-template-drain=Draining node %s
# - --message-template-reboot=Rebooting node %s
# - --message-template-uncordon=Node %s rebooted & uncordoned successfully!
# - --blocking-pod-selector=runtime=long,cost=expensive
# - --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
# - --annotate-nodes=false
# - --lock-release-delay=30m
# - --log-format=text
# - --metrics-host=""
# - --metrics-port=8080
# - --concurrency=1

63
kured-rbac.yaml Normal file
View File

@@ -0,0 +1,63 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: kured
rules:
# Allow kured to read spec.unschedulable
# Allow kubectl to drain/uncordon
#
# NB: These permissions are tightly coupled to the bundled version of kubectl; the ones below
# match https://github.com/kubernetes/kubernetes/blob/v1.19.4/staging/src/k8s.io/kubectl/pkg/cmd/drain/drain.go
#
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "patch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["list","delete","get"]
- apiGroups: ["apps"]
resources: ["daemonsets"]
verbs: ["get"]
- apiGroups: [""]
resources: ["pods/eviction"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: kured
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: kured
subjects:
- kind: ServiceAccount
name: kured
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: kube-system
name: kured
rules:
# Allow kured to lock/unlock itself
- apiGroups: ["apps"]
resources: ["daemonsets"]
resourceNames: ["kured"]
verbs: ["update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: kube-system
name: kured
subjects:
- kind: ServiceAccount
namespace: kube-system
name: kured
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: kured

View File

@@ -7,21 +7,39 @@ import (
"sort"
"time"
"github.com/prometheus/client_golang/api/prometheus"
papi "github.com/prometheus/client_golang/api"
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
"github.com/prometheus/common/model"
)
// Returns a list of names of active (e.g. pending or firing) alerts, filtered
// by the supplied regexp.
func PrometheusActiveAlerts(prometheusURL string, filter *regexp.Regexp) ([]string, error) {
client, err := prometheus.New(prometheus.Config{Address: prometheusURL})
// PromClient is a wrapper around the Prometheus Client interface and implements the api
// This way, the PromClient can be instantiated with the configuration the Client needs, and
// the ability to use the methods the api has, like Query and so on.
type PromClient struct {
papi papi.Client
api v1.API
}
// NewPromClient creates a new client to the Prometheus API.
// It returns an error on any problem.
func NewPromClient(conf papi.Config) (*PromClient, error) {
promClient, err := papi.NewClient(conf)
if err != nil {
return nil, err
}
client := PromClient{papi: promClient, api: v1.NewAPI(promClient)}
return &client, nil
}
queryAPI := prometheus.NewQueryAPI(client)
// ActiveAlerts is a method of type PromClient, it returns a list of names of active alerts
// (e.g. pending or firing), filtered by the supplied regexp or by the includeLabels query.
// filter by regexp means when the regex finds the alert-name; the alert is exluded from the
// block-list and will NOT block rebooting. query by includeLabel means,
// if the query finds an alert, it will include it to the block-list and it WILL block rebooting.
func (p *PromClient) ActiveAlerts(filter *regexp.Regexp, firingOnly, filterMatchOnly bool) ([]string, error) {
value, err := queryAPI.Query(context.Background(), "ALERTS", time.Now())
// get all alerts from prometheus
value, _, err := p.api.Query(context.Background(), "ALERTS", time.Now())
if err != nil {
return nil, err
}
@@ -31,17 +49,17 @@ func PrometheusActiveAlerts(prometheusURL string, filter *regexp.Regexp) ([]stri
activeAlertSet := make(map[string]bool)
for _, sample := range vector {
if alertName, isAlert := sample.Metric[model.AlertNameLabel]; isAlert && sample.Value != 0 {
if filter == nil || !filter.MatchString(string(alertName)) {
if matchesRegex(filter, string(alertName), filterMatchOnly) && (!firingOnly || sample.Metric["alertstate"] == "firing") {
activeAlertSet[string(alertName)] = true
}
}
}
var activeAlerts []string
for activeAlert, _ := range activeAlertSet {
for activeAlert := range activeAlertSet {
activeAlerts = append(activeAlerts, activeAlert)
}
sort.Sort(sort.StringSlice(activeAlerts))
sort.Strings(activeAlerts)
return activeAlerts, nil
}
@@ -49,3 +67,11 @@ func PrometheusActiveAlerts(prometheusURL string, filter *regexp.Regexp) ([]stri
return nil, fmt.Errorf("Unexpected value type: %v", value)
}
func matchesRegex(filter *regexp.Regexp, alertName string, filterMatchOnly bool) bool {
if filter == nil {
return true
}
return filter.MatchString(string(alertName)) == filterMatchOnly
}

View File

@@ -0,0 +1,166 @@
package alerts
import (
"log"
"net/http"
"net/http/httptest"
"regexp"
"testing"
"github.com/prometheus/client_golang/api"
"github.com/stretchr/testify/assert"
)
type MockResponse struct {
StatusCode int
Body []byte
}
// MockServerProperties ties a mock response to a url and a method
type MockServerProperties struct {
URI string
HTTPMethod string
Response MockResponse
}
// NewMockServer sets up a new MockServer with properties ad starts the server.
func NewMockServer(props ...MockServerProperties) *httptest.Server {
handler := http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
for _, proc := range props {
_, err := w.Write(proc.Response.Body)
if err != nil {
log.Fatal(err)
}
}
})
return httptest.NewServer(handler)
}
func TestActiveAlerts(t *testing.T) {
responsebody := `{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"ALERTS","alertname":"GatekeeperViolations","alertstate":"firing","severity":"warning","team":"platform-infra"},"value":[1622472933.973,"1"]},{"metric":{"__name__":"ALERTS","alertname":"PodCrashing-dev","alertstate":"firing","container":"deployment","instance":"1.2.3.4:8080","job":"kube-state-metrics","namespace":"dev","pod":"dev-deployment-78dcbmf25v","severity":"critical","team":"dev"},"value":[1622472933.973,"1"]},{"metric":{"__name__":"ALERTS","alertname":"PodRestart-dev","alertstate":"firing","container":"deployment","instance":"1.2.3.4:1234","job":"kube-state-metrics","namespace":"qa","pod":"qa-job-deployment-78dcbmf25v","severity":"warning","team":"qa"},"value":[1622472933.973,"1"]},{"metric":{"__name__":"ALERTS","alertname":"PrometheusTargetDown","alertstate":"firing","job":"kubernetes-pods","severity":"warning","team":"platform-infra"},"value":[1622472933.973,"1"]},{"metric":{"__name__":"ALERTS","alertname":"ScheduledRebootFailing","alertstate":"pending","severity":"warning","team":"platform-infra"},"value":[1622472933.973,"1"]}]}}`
addr := "http://localhost:10001"
for _, tc := range []struct {
it string
rFilter string
respBody string
aName string
wantN int
firingOnly bool
filterMatchOnly bool
}{
{
it: "should return no active alerts",
respBody: responsebody,
rFilter: "",
wantN: 0,
firingOnly: false,
filterMatchOnly: false,
},
{
it: "should return a subset of all alerts",
respBody: responsebody,
rFilter: "Pod",
wantN: 3,
firingOnly: false,
filterMatchOnly: false,
},
{
it: "should return a subset of all alerts",
respBody: responsebody,
rFilter: "Gatekeeper",
wantN: 1,
firingOnly: false,
filterMatchOnly: true,
},
{
it: "should return all active alerts by regex",
respBody: responsebody,
rFilter: "*",
wantN: 5,
firingOnly: false,
filterMatchOnly: false,
},
{
it: "should return all active alerts by regex filter",
respBody: responsebody,
rFilter: "*",
wantN: 5,
firingOnly: false,
filterMatchOnly: false,
},
{
it: "should return only firing alerts if firingOnly is true",
respBody: responsebody,
rFilter: "*",
wantN: 4,
firingOnly: true,
filterMatchOnly: false,
},
{
it: "should return ScheduledRebootFailing active alerts",
respBody: `{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"ALERTS","alertname":"ScheduledRebootFailing","alertstate":"pending","severity":"warning","team":"platform-infra"},"value":[1622472933.973,"1"]}]}}`,
aName: "ScheduledRebootFailing",
rFilter: "*",
wantN: 1,
firingOnly: false,
filterMatchOnly: false,
},
{
it: "should not return an active alert if RebootRequired is firing (regex filter)",
respBody: `{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"ALERTS","alertname":"RebootRequired","alertstate":"pending","severity":"warning","team":"platform-infra"},"value":[1622472933.973,"1"]}]}}`,
rFilter: "RebootRequired",
wantN: 0,
firingOnly: false,
filterMatchOnly: false,
},
{
it: "should not return an active alert if RebootRequired is firing (regex filter)",
respBody: `{"status":"success","data":{"resultType":"vector","result":[{"metric":{"__name__":"ALERTS","alertname":"RebootRequired","alertstate":"pending","severity":"warning","team":"platform-infra"},"value":[1622472933.973,"1"]}]}}`,
rFilter: "RebootRequired",
wantN: 1,
firingOnly: false,
filterMatchOnly: true,
},
} {
// Start mockServer
mockServer := NewMockServer(MockServerProperties{
URI: addr,
HTTPMethod: http.MethodPost,
Response: MockResponse{
Body: []byte(tc.respBody),
},
})
// Close mockServer after all connections are gone
defer mockServer.Close()
t.Run(tc.it, func(t *testing.T) {
// regex filter
regex, _ := regexp.Compile(tc.rFilter)
// instantiate the prometheus client with the mockserver-address
p, err := NewPromClient(api.Config{Address: mockServer.URL})
if err != nil {
log.Fatal(err)
}
result, err := p.ActiveAlerts(regex, tc.firingOnly, tc.filterMatchOnly)
if err != nil {
log.Fatal(err)
}
// assert
assert.Equal(t, tc.wantN, len(result), "expected amount of alerts %v, got %v", tc.wantN, len(result))
if tc.aName != "" {
assert.Equal(t, tc.aName, result[0], "expected active alert %v, got %v", tc.aName, result[0])
}
})
}
}

View File

@@ -1,15 +1,25 @@
package daemonsetlock
import (
"context"
"encoding/json"
"fmt"
"time"
v1 "k8s.io/api/apps/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/client-go/kubernetes"
)
const (
k8sAPICallRetrySleep = 5 * time.Second // How much time to wait in between retrying a k8s API call
k8sAPICallRetryTimeout = 5 * time.Minute // How long to wait until we determine that the k8s API is definitively unavailable
)
// DaemonSetLock holds all necessary information to do actions
// on the kured ds which holds lock info through annotations.
type DaemonSetLock struct {
client *kubernetes.Clientset
nodeID string
@@ -19,19 +29,28 @@ type DaemonSetLock struct {
}
type lockAnnotationValue struct {
NodeID string `json:"nodeID"`
Metadata interface{} `json:"metadata,omitempty"`
NodeID string `json:"nodeID"`
Metadata interface{} `json:"metadata,omitempty"`
Created time.Time `json:"created"`
TTL time.Duration `json:"TTL"`
}
type multiLockAnnotationValue struct {
MaxOwners int `json:"maxOwners"`
LockAnnotations []lockAnnotationValue `json:"locks"`
}
// New creates a daemonsetLock object containing the necessary data for follow up k8s requests
func New(client *kubernetes.Clientset, nodeID, namespace, name, annotation string) *DaemonSetLock {
return &DaemonSetLock{client, nodeID, namespace, name, annotation}
}
func (dsl *DaemonSetLock) Acquire(metadata interface{}) (acquired bool, owner string, err error) {
// Acquire attempts to annotate the kured daemonset with lock info from instantiated DaemonSetLock using client-go
func (dsl *DaemonSetLock) Acquire(metadata interface{}, TTL time.Duration) (bool, string, error) {
for {
ds, err := dsl.client.ExtensionsV1beta1().DaemonSets(dsl.namespace).Get(dsl.name, metav1.GetOptions{})
ds, err := dsl.GetDaemonSet(k8sAPICallRetrySleep, k8sAPICallRetryTimeout)
if err != nil {
return false, "", err
return false, "", fmt.Errorf("timed out trying to get daemonset %s in namespace %s: %w", dsl.name, dsl.namespace, err)
}
valueString, exists := ds.ObjectMeta.Annotations[dsl.annotation]
@@ -40,20 +59,23 @@ func (dsl *DaemonSetLock) Acquire(metadata interface{}) (acquired bool, owner st
if err := json.Unmarshal([]byte(valueString), &value); err != nil {
return false, "", err
}
return value.NodeID == dsl.nodeID, value.NodeID, nil
if !ttlExpired(value.Created, value.TTL) {
return value.NodeID == dsl.nodeID, value.NodeID, nil
}
}
if ds.ObjectMeta.Annotations == nil {
ds.ObjectMeta.Annotations = make(map[string]string)
}
value := lockAnnotationValue{NodeID: dsl.nodeID, Metadata: metadata}
value := lockAnnotationValue{NodeID: dsl.nodeID, Metadata: metadata, Created: time.Now().UTC(), TTL: TTL}
valueBytes, err := json.Marshal(&value)
if err != nil {
return false, "", err
}
ds.ObjectMeta.Annotations[dsl.annotation] = string(valueBytes)
_, err = dsl.client.ExtensionsV1beta1().DaemonSets(dsl.namespace).Update(ds)
_, err = dsl.client.AppsV1().DaemonSets(dsl.namespace).Update(context.TODO(), ds, metav1.UpdateOptions{})
if err != nil {
if se, ok := err.(*errors.StatusError); ok && se.ErrStatus.Reason == metav1.StatusReasonConflict {
// Something else updated the resource between us reading and writing - try again soon
@@ -67,10 +89,97 @@ func (dsl *DaemonSetLock) Acquire(metadata interface{}) (acquired bool, owner st
}
}
func (dsl *DaemonSetLock) Test(metadata interface{}) (holding bool, err error) {
ds, err := dsl.client.ExtensionsV1beta1().DaemonSets(dsl.namespace).Get(dsl.name, metav1.GetOptions{})
// AcquireMultiple creates and annotates the daemonset with a multiple owner lock
func (dsl *DaemonSetLock) AcquireMultiple(metadata interface{}, TTL time.Duration, maxOwners int) (bool, []string, error) {
for {
ds, err := dsl.GetDaemonSet(k8sAPICallRetrySleep, k8sAPICallRetryTimeout)
if err != nil {
return false, []string{}, fmt.Errorf("timed out trying to get daemonset %s in namespace %s: %w", dsl.name, dsl.namespace, err)
}
annotation := multiLockAnnotationValue{}
valueString, exists := ds.ObjectMeta.Annotations[dsl.annotation]
if exists {
if err := json.Unmarshal([]byte(valueString), &annotation); err != nil {
return false, []string{}, fmt.Errorf("error getting multi lock: %w", err)
}
}
lockPossible, newAnnotation := dsl.canAcquireMultiple(annotation, metadata, TTL, maxOwners)
if !lockPossible {
return false, nodeIDsFromMultiLock(newAnnotation), nil
}
if ds.ObjectMeta.Annotations == nil {
ds.ObjectMeta.Annotations = make(map[string]string)
}
newAnnotationBytes, err := json.Marshal(&newAnnotation)
if err != nil {
return false, []string{}, fmt.Errorf("error marshalling new annotation lock: %w", err)
}
ds.ObjectMeta.Annotations[dsl.annotation] = string(newAnnotationBytes)
_, err = dsl.client.AppsV1().DaemonSets(dsl.namespace).Update(context.Background(), ds, metav1.UpdateOptions{})
if err != nil {
if se, ok := err.(*errors.StatusError); ok && se.ErrStatus.Reason == metav1.StatusReasonConflict {
time.Sleep(time.Second)
continue
} else {
return false, []string{}, fmt.Errorf("error updating daemonset with multi lock: %w", err)
}
}
return true, nodeIDsFromMultiLock(newAnnotation), nil
}
}
func nodeIDsFromMultiLock(annotation multiLockAnnotationValue) []string {
nodeIDs := make([]string, 0, len(annotation.LockAnnotations))
for _, nodeLock := range annotation.LockAnnotations {
nodeIDs = append(nodeIDs, nodeLock.NodeID)
}
return nodeIDs
}
func (dsl *DaemonSetLock) canAcquireMultiple(annotation multiLockAnnotationValue, metadata interface{}, TTL time.Duration, maxOwners int) (bool, multiLockAnnotationValue) {
newAnnotation := multiLockAnnotationValue{MaxOwners: maxOwners}
freeSpace := false
if annotation.LockAnnotations == nil || len(annotation.LockAnnotations) < maxOwners {
freeSpace = true
newAnnotation.LockAnnotations = annotation.LockAnnotations
} else {
for _, nodeLock := range annotation.LockAnnotations {
if ttlExpired(nodeLock.Created, nodeLock.TTL) {
freeSpace = true
continue
}
newAnnotation.LockAnnotations = append(
newAnnotation.LockAnnotations,
nodeLock,
)
}
}
if freeSpace {
newAnnotation.LockAnnotations = append(
newAnnotation.LockAnnotations,
lockAnnotationValue{
NodeID: dsl.nodeID,
Metadata: metadata,
Created: time.Now().UTC(),
TTL: TTL,
},
)
return true, newAnnotation
}
return false, multiLockAnnotationValue{}
}
// Test attempts to check the kured daemonset lock status (existence, expiry) from instantiated DaemonSetLock using client-go
func (dsl *DaemonSetLock) Test(metadata interface{}) (bool, error) {
ds, err := dsl.GetDaemonSet(k8sAPICallRetrySleep, k8sAPICallRetryTimeout)
if err != nil {
return false, err
return false, fmt.Errorf("timed out trying to get daemonset %s in namespace %s: %w", dsl.name, dsl.namespace, err)
}
valueString, exists := ds.ObjectMeta.Annotations[dsl.annotation]
@@ -79,17 +188,45 @@ func (dsl *DaemonSetLock) Test(metadata interface{}) (holding bool, err error) {
if err := json.Unmarshal([]byte(valueString), &value); err != nil {
return false, err
}
return value.NodeID == dsl.nodeID, nil
if !ttlExpired(value.Created, value.TTL) {
return value.NodeID == dsl.nodeID, nil
}
}
return false, nil
}
// TestMultiple attempts to check the kured daemonset lock status for multi locks
func (dsl *DaemonSetLock) TestMultiple() (bool, error) {
ds, err := dsl.GetDaemonSet(k8sAPICallRetrySleep, k8sAPICallRetryTimeout)
if err != nil {
return false, fmt.Errorf("timed out trying to get daemonset %s in namespace %s: %w", dsl.name, dsl.namespace, err)
}
valueString, exists := ds.ObjectMeta.Annotations[dsl.annotation]
if exists {
value := multiLockAnnotationValue{}
if err := json.Unmarshal([]byte(valueString), &value); err != nil {
return false, err
}
for _, nodeLock := range value.LockAnnotations {
if nodeLock.NodeID == dsl.nodeID && !ttlExpired(nodeLock.Created, nodeLock.TTL) {
return true, nil
}
}
}
return false, nil
}
// Release attempts to remove the lock data from the kured ds annotations using client-go
func (dsl *DaemonSetLock) Release() error {
for {
ds, err := dsl.client.ExtensionsV1beta1().DaemonSets(dsl.namespace).Get(dsl.name, metav1.GetOptions{})
ds, err := dsl.GetDaemonSet(k8sAPICallRetrySleep, k8sAPICallRetryTimeout)
if err != nil {
return err
return fmt.Errorf("timed out trying to get daemonset %s in namespace %s: %w", dsl.name, dsl.namespace, err)
}
valueString, exists := ds.ObjectMeta.Annotations[dsl.annotation]
@@ -98,6 +235,7 @@ func (dsl *DaemonSetLock) Release() error {
if err := json.Unmarshal([]byte(valueString), &value); err != nil {
return err
}
if value.NodeID != dsl.nodeID {
return fmt.Errorf("Not lock holder: %v", value.NodeID)
}
@@ -107,7 +245,7 @@ func (dsl *DaemonSetLock) Release() error {
delete(ds.ObjectMeta.Annotations, dsl.annotation)
_, err = dsl.client.ExtensionsV1beta1().DaemonSets(dsl.namespace).Update(ds)
_, err = dsl.client.AppsV1().DaemonSets(dsl.namespace).Update(context.TODO(), ds, metav1.UpdateOptions{})
if err != nil {
if se, ok := err.(*errors.StatusError); ok && se.ErrStatus.Reason == metav1.StatusReasonConflict {
// Something else updated the resource between us reading and writing - try again soon
@@ -120,3 +258,77 @@ func (dsl *DaemonSetLock) Release() error {
return nil
}
}
// ReleaseMultiple attempts to remove the lock data from the kured ds annotations using client-go
func (dsl *DaemonSetLock) ReleaseMultiple() error {
for {
ds, err := dsl.GetDaemonSet(k8sAPICallRetrySleep, k8sAPICallRetryTimeout)
if err != nil {
return fmt.Errorf("timed out trying to get daemonset %s in namespace %s: %w", dsl.name, dsl.namespace, err)
}
valueString, exists := ds.ObjectMeta.Annotations[dsl.annotation]
modified := false
value := multiLockAnnotationValue{}
if exists {
if err := json.Unmarshal([]byte(valueString), &value); err != nil {
return err
}
for idx, nodeLock := range value.LockAnnotations {
if nodeLock.NodeID == dsl.nodeID {
value.LockAnnotations = append(value.LockAnnotations[:idx], value.LockAnnotations[idx+1:]...)
modified = true
break
}
}
}
if !exists || !modified {
return fmt.Errorf("Lock not held")
}
newAnnotationBytes, err := json.Marshal(value)
if err != nil {
return fmt.Errorf("error marshalling new annotation on release: %v", err)
}
ds.ObjectMeta.Annotations[dsl.annotation] = string(newAnnotationBytes)
_, err = dsl.client.AppsV1().DaemonSets(dsl.namespace).Update(context.TODO(), ds, metav1.UpdateOptions{})
if err != nil {
if se, ok := err.(*errors.StatusError); ok && se.ErrStatus.Reason == metav1.StatusReasonConflict {
// Something else updated the resource between us reading and writing - try again soon
time.Sleep(time.Second)
continue
} else {
return err
}
}
return nil
}
}
// GetDaemonSet returns the named DaemonSet resource from the DaemonSetLock's configured client
func (dsl *DaemonSetLock) GetDaemonSet(sleep, timeout time.Duration) (*v1.DaemonSet, error) {
var ds *v1.DaemonSet
var lastError error
err := wait.PollImmediate(sleep, timeout, func() (bool, error) {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
if ds, lastError = dsl.client.AppsV1().DaemonSets(dsl.namespace).Get(ctx, dsl.name, metav1.GetOptions{}); lastError != nil {
return false, nil
}
return true, nil
})
if err != nil {
return nil, fmt.Errorf("Timed out trying to get daemonset %s in namespace %s: %v", dsl.name, dsl.namespace, lastError)
}
return ds, nil
}
func ttlExpired(created time.Time, ttl time.Duration) bool {
if ttl > 0 && time.Since(created) >= ttl {
return true
}
return false
}

View File

@@ -0,0 +1,208 @@
package daemonsetlock
import (
"reflect"
"sort"
"testing"
"time"
)
func TestTtlExpired(t *testing.T) {
d := time.Date(2020, 05, 05, 14, 15, 0, 0, time.UTC)
second, _ := time.ParseDuration("1s")
zero, _ := time.ParseDuration("0m")
tests := []struct {
created time.Time
ttl time.Duration
result bool
}{
{d, second, true},
{time.Now(), second, false},
{d, zero, false},
}
for i, tst := range tests {
if ttlExpired(tst.created, tst.ttl) != tst.result {
t.Errorf("Test %d failed, expected %v but got %v", i, tst.result, !tst.result)
}
}
}
func multiLockAnnotationsAreEqualByNodes(src, dst multiLockAnnotationValue) bool {
srcNodes := []string{}
for _, srcLock := range src.LockAnnotations {
srcNodes = append(srcNodes, srcLock.NodeID)
}
sort.Strings(srcNodes)
dstNodes := []string{}
for _, dstLock := range dst.LockAnnotations {
dstNodes = append(dstNodes, dstLock.NodeID)
}
sort.Strings(dstNodes)
return reflect.DeepEqual(srcNodes, dstNodes)
}
func TestCanAcquireMultiple(t *testing.T) {
node1Name := "n1"
node2Name := "n2"
node3Name := "n3"
testCases := []struct {
name string
daemonSetLock DaemonSetLock
maxOwners int
current multiLockAnnotationValue
desired multiLockAnnotationValue
lockPossible bool
}{
{
name: "empty_lock",
daemonSetLock: DaemonSetLock{
nodeID: node1Name,
},
maxOwners: 2,
current: multiLockAnnotationValue{},
desired: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{NodeID: node1Name},
},
},
lockPossible: true,
},
{
name: "partial_lock",
daemonSetLock: DaemonSetLock{
nodeID: node1Name,
},
maxOwners: 2,
current: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{NodeID: node2Name},
},
},
desired: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{NodeID: node1Name},
{NodeID: node2Name},
},
},
lockPossible: true,
},
{
name: "full_lock",
daemonSetLock: DaemonSetLock{
nodeID: node1Name,
},
maxOwners: 2,
current: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{
NodeID: node2Name,
Created: time.Now().UTC().Add(-1 * time.Minute),
TTL: time.Hour,
},
{
NodeID: node3Name,
Created: time.Now().UTC().Add(-1 * time.Minute),
TTL: time.Hour,
},
},
},
desired: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{NodeID: node2Name},
{NodeID: node3Name},
},
},
lockPossible: false,
},
{
name: "full_with_one_expired_lock",
daemonSetLock: DaemonSetLock{
nodeID: node1Name,
},
maxOwners: 2,
current: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{
NodeID: node2Name,
Created: time.Now().UTC().Add(-1 * time.Hour),
TTL: time.Minute,
},
{
NodeID: node3Name,
Created: time.Now().UTC().Add(-1 * time.Minute),
TTL: time.Hour,
},
},
},
desired: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{NodeID: node1Name},
{NodeID: node3Name},
},
},
lockPossible: true,
},
{
name: "full_with_all_expired_locks",
daemonSetLock: DaemonSetLock{
nodeID: node1Name,
},
maxOwners: 2,
current: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{
NodeID: node2Name,
Created: time.Now().UTC().Add(-1 * time.Hour),
TTL: time.Minute,
},
{
NodeID: node3Name,
Created: time.Now().UTC().Add(-1 * time.Hour),
TTL: time.Minute,
},
},
},
desired: multiLockAnnotationValue{
MaxOwners: 2,
LockAnnotations: []lockAnnotationValue{
{NodeID: node1Name},
},
},
lockPossible: true,
},
}
for _, testCase := range testCases {
t.Run(testCase.name, func(t *testing.T) {
lockPossible, actual := testCase.daemonSetLock.canAcquireMultiple(testCase.current, struct{}{}, time.Minute, testCase.maxOwners)
if lockPossible != testCase.lockPossible {
t.Fatalf(
"unexpected result for lock possible (got %t expected %t new annotation %v",
lockPossible,
testCase.lockPossible,
actual,
)
}
if lockPossible && (!multiLockAnnotationsAreEqualByNodes(actual, testCase.desired) || testCase.desired.MaxOwners != actual.MaxOwners) {
t.Fatalf(
"expected lock %v but got %v",
testCase.desired,
actual,
)
}
})
}
}

View File

@@ -5,7 +5,7 @@ import (
"time"
)
// Tick regularly after an initial delay randomly distributed between d/2 and d + d/2
// New ticks regularly after an initial delay randomly distributed between d/2 and d + d/2
func New(s rand.Source, d time.Duration) <-chan time.Time {
c := make(chan time.Time)

View File

@@ -1,42 +0,0 @@
package slack
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"time"
)
var (
httpClient = &http.Client{Timeout: 5 * time.Second}
)
type body struct {
Text string `json:"text,omitempty"`
Username string `json:"username,omitempty"`
}
func NotifyReboot(hookURL, username, nodeID string) error {
msg := body{
Text: fmt.Sprintf("Rebooting node %s", nodeID),
Username: username,
}
var buf bytes.Buffer
if err := json.NewEncoder(&buf).Encode(&msg); err != nil {
return err
}
resp, err := httpClient.Post(hookURL, "application/json", &buf)
if err != nil {
return err
}
defer resp.Body.Close()
if resp.StatusCode < 200 || resp.StatusCode >= 300 {
return fmt.Errorf(resp.Status)
}
return nil
}

166
pkg/taints/taints.go Normal file
View File

@@ -0,0 +1,166 @@
package taints
import (
"context"
"encoding/json"
"fmt"
log "github.com/sirupsen/logrus"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/kubernetes"
)
// Taint allows to set soft and hard limitations for scheduling and executing pods on nodes.
type Taint struct {
client *kubernetes.Clientset
nodeID string
taintName string
effect v1.TaintEffect
exists bool
}
// New provides a new taint.
func New(client *kubernetes.Clientset, nodeID, taintName string, effect v1.TaintEffect) *Taint {
exists, _, _ := taintExists(client, nodeID, taintName)
return &Taint{
client: client,
nodeID: nodeID,
taintName: taintName,
effect: effect,
exists: exists,
}
}
// Enable creates the taint for a node. Creating an existing taint is a noop.
func (t *Taint) Enable() {
if t.taintName == "" {
return
}
if t.exists {
return
}
preferNoSchedule(t.client, t.nodeID, t.taintName, t.effect, true)
t.exists = true
}
// Disable removes the taint for a node. Removing a missing taint is a noop.
func (t *Taint) Disable() {
if t.taintName == "" {
return
}
if !t.exists {
return
}
preferNoSchedule(t.client, t.nodeID, t.taintName, t.effect, false)
t.exists = false
}
func taintExists(client *kubernetes.Clientset, nodeID, taintName string) (bool, int, *v1.Node) {
updatedNode, err := client.CoreV1().Nodes().Get(context.TODO(), nodeID, metav1.GetOptions{})
if err != nil || updatedNode == nil {
log.Fatalf("Error reading node %s: %v", nodeID, err)
}
for i, taint := range updatedNode.Spec.Taints {
if taint.Key == taintName {
return true, i, updatedNode
}
}
return false, 0, updatedNode
}
func preferNoSchedule(client *kubernetes.Clientset, nodeID, taintName string, effect v1.TaintEffect, shouldExists bool) {
taintExists, offset, updatedNode := taintExists(client, nodeID, taintName)
if taintExists && shouldExists {
log.Debugf("Taint %v exists already for node %v.", taintName, nodeID)
return
}
if !taintExists && !shouldExists {
log.Debugf("Taint %v already missing for node %v.", taintName, nodeID)
return
}
type patchTaints struct {
Op string `json:"op"`
Path string `json:"path"`
Value interface{} `json:"value,omitempty"`
}
taint := v1.Taint{
Key: taintName,
Effect: effect,
}
var patches []patchTaints
if len(updatedNode.Spec.Taints) == 0 {
// add first taint and ensure to keep current taints
patches = []patchTaints{
{
Op: "test",
Path: "/spec",
Value: updatedNode.Spec,
},
{
Op: "add",
Path: "/spec/taints",
Value: []v1.Taint{},
},
{
Op: "add",
Path: "/spec/taints/-",
Value: taint,
},
}
} else if taintExists {
// remove taint and ensure to test against race conditions
patches = []patchTaints{
{
Op: "test",
Path: fmt.Sprintf("/spec/taints/%d", offset),
Value: taint,
},
{
Op: "remove",
Path: fmt.Sprintf("/spec/taints/%d", offset),
},
}
} else {
// add missing taint to exsting list
patches = []patchTaints{
{
Op: "add",
Path: "/spec/taints/-",
Value: taint,
},
}
}
patchBytes, err := json.Marshal(patches)
if err != nil {
log.Fatalf("Error encoding taint patch for node %s: %v", nodeID, err)
}
_, err = client.CoreV1().Nodes().Patch(context.TODO(), nodeID, types.JSONPatchType, patchBytes, metav1.PatchOptions{})
if err != nil {
log.Fatalf("Error patching taint for node %s: %v", nodeID, err)
}
if shouldExists {
log.Info("Node taint added")
} else {
log.Info("Node taint removed")
}
}

91
pkg/timewindow/days.go Normal file
View File

@@ -0,0 +1,91 @@
package timewindow
import (
"fmt"
"strconv"
"strings"
"time"
)
// EveryDay contains all days of the week, and exports it
// for convenience use in the cmd line arguments.
var EveryDay = []string{"su", "mo", "tu", "we", "th", "fr", "sa"}
// dayStrings maps day strings to time.Weekdays
var dayStrings = map[string]time.Weekday{
"su": time.Sunday,
"sun": time.Sunday,
"sunday": time.Sunday,
"mo": time.Monday,
"mon": time.Monday,
"monday": time.Monday,
"tu": time.Tuesday,
"tue": time.Tuesday,
"tuesday": time.Tuesday,
"we": time.Wednesday,
"wed": time.Wednesday,
"wednesday": time.Wednesday,
"th": time.Thursday,
"thu": time.Thursday,
"thursday": time.Thursday,
"fr": time.Friday,
"fri": time.Friday,
"friday": time.Friday,
"sa": time.Saturday,
"sat": time.Saturday,
"saturday": time.Saturday,
}
type weekdays uint32
// parseWeekdays creates a set of weekdays from a string slice
func parseWeekdays(days []string) (weekdays, error) {
var result uint32
for _, day := range days {
if len(day) == 0 {
continue
}
weekday, err := parseWeekday(day)
if err != nil {
return weekdays(0), err
}
result |= 1 << uint32(weekday)
}
return weekdays(result), nil
}
// Contains returns true if the specified weekday is a member of this set.
func (w weekdays) Contains(day time.Weekday) bool {
return uint32(w)&(1<<uint32(day)) != 0
}
// String returns a string representation of the set of weekdays.
func (w weekdays) String() string {
var b strings.Builder
for i := uint32(0); i < 7; i++ {
if uint32(w)&(1<<i) != 0 {
b.WriteString(time.Weekday(i).String()[0:3])
} else {
b.WriteString("---")
}
}
return b.String()
}
func parseWeekday(day string) (time.Weekday, error) {
if n, err := strconv.Atoi(day); err == nil {
if n >= 0 && n < 7 {
return time.Weekday(n), nil
}
return time.Sunday, fmt.Errorf("Invalid weekday, number out of range: %s", day)
}
if weekday, ok := dayStrings[strings.ToLower(day)]; ok {
return weekday, nil
}
return time.Sunday, fmt.Errorf("Invalid weekday: %s", day)
}

View File

@@ -0,0 +1,46 @@
package timewindow
import (
"strings"
"testing"
)
func TestParseWeekdays(t *testing.T) {
tests := []struct {
input string
result string
}{
{"0,4", "Sun---------Thu------"},
{"su,mo,tu", "SunMonTue------------"},
{"sunday,tu,thu", "Sun---Tue---Thu------"},
{"THURSDAY", "------------Thu------"},
{"we,WED,WeDnEsDaY", "---------Wed---------"},
{"", "---------------------"},
{",,,", "---------------------"},
}
for _, tst := range tests {
res, err := parseWeekdays(strings.Split(tst.input, ","))
if err != nil {
t.Errorf("Received error for input %s: %v", tst.input, err)
} else if res.String() != tst.result {
t.Errorf("Test %s: Expected %s got %s", tst.input, tst.result, res.String())
}
}
}
func TestParseWeekdaysErrors(t *testing.T) {
tests := []string{
"15",
"-8",
"8",
"mon,tue,wed,fridayyyy",
}
for _, tst := range tests {
_, err := parseWeekdays(strings.Split(tst, ","))
if err == nil {
t.Errorf("Expected to receive error for input %s", tst)
}
}
}

View File

@@ -0,0 +1,81 @@
package timewindow
import (
"fmt"
"time"
)
// TimeWindow specifies a schedule of days and times.
type TimeWindow struct {
days weekdays
location *time.Location
startTime time.Time
endTime time.Time
}
// New creates a TimeWindow instance based on string inputs specifying a schedule.
func New(days []string, startTime, endTime, location string) (*TimeWindow, error) {
tw := &TimeWindow{}
var err error
if tw.days, err = parseWeekdays(days); err != nil {
return nil, err
}
if tw.location, err = time.LoadLocation(location); err != nil {
return nil, err
}
if tw.startTime, err = parseTime(startTime, tw.location); err != nil {
return nil, err
}
if tw.endTime, err = parseTime(endTime, tw.location); err != nil {
return nil, err
}
return tw, nil
}
// Contains determines whether the specified time is within this time window.
func (tw *TimeWindow) Contains(t time.Time) bool {
loctime := t.In(tw.location)
if !tw.days.Contains(loctime.Weekday()) {
return false
}
start := time.Date(loctime.Year(), loctime.Month(), loctime.Day(), tw.startTime.Hour(), tw.startTime.Minute(), tw.startTime.Second(), 0, tw.location)
end := time.Date(loctime.Year(), loctime.Month(), loctime.Day(), tw.endTime.Hour(), tw.endTime.Minute(), tw.endTime.Second(), 1e9-1, tw.location)
// Time Wrap validation
// First we check for start and end time, if start is after end time
// Next we need to validate if we want to wrap to the day before or to the day after
// For that we check the loctime value to see if it is before end time, we wrap with the day before
// Otherwise we wrap to the next day.
if tw.startTime.After(tw.endTime) {
if loctime.Before(end) {
start = start.Add(-24 * time.Hour)
} else {
end = end.Add(24 * time.Hour)
}
}
return (loctime.After(start) || loctime.Equal(start)) && (loctime.Before(end) || loctime.Equal(end))
}
// String returns a string representation of this time window.
func (tw *TimeWindow) String() string {
return fmt.Sprintf("%s between %02d:%02d and %02d:%02d %s", tw.days.String(), tw.startTime.Hour(), tw.startTime.Minute(), tw.endTime.Hour(), tw.endTime.Minute(), tw.location.String())
}
// parseTime tries to parse a time with several formats.
func parseTime(s string, loc *time.Location) (time.Time, error) {
fmts := []string{"15:04", "15:04:05", "03:04pm", "15", "03pm", "3pm"}
for _, f := range fmts {
if t, err := time.ParseInLocation(f, s, loc); err == nil {
return t, nil
}
}
return time.Now(), fmt.Errorf("Invalid time format: %s", s)
}

View File

@@ -0,0 +1,97 @@
package timewindow
import (
"strings"
"testing"
"time"
)
func TestTimeWindows(t *testing.T) {
type testcase struct {
time string
result bool
}
tests := []struct {
days string
start string
end string
loc string
cases []testcase
}{
{"mon,tue,wed,thu,fri", "9am", "5pm", "America/Los_Angeles", []testcase{
{"2019/03/31 10:00 PDT", false},
{"2019/04/04 00:49 PDT", false},
{"2019/04/04 12:00 PDT", true},
{"2019/04/04 11:59 UTC", false},
{"2019/04/05 08:59 PDT", false},
{"2019/04/05 9:01 PDT", true},
}},
{"mon,we,fri", "10:01", "11:30am", "America/Los_Angeles", []testcase{
{"2019/04/05 10:30 PDT", true},
{"2019/04/06 10:30 PDT", false},
{"2019/04/07 10:30 PDT", false},
{"2019/04/08 10:30 PDT", true},
{"2019/04/09 10:30 PDT", false},
{"2019/04/10 10:30 PDT", true},
{"2019/04/11 10:30 PDT", false},
}},
{"mo,tu,we,th,fr", "00:00", "23:59:59", "UTC", []testcase{
{"2019/04/18 00:00 UTC", true},
{"2019/04/18 23:59 UTC", true},
}},
{"mon,tue,wed,thu,fri", "9pm", "5am", "America/Los_Angeles", []testcase{
{"2019/03/30 04:00 PDT", false},
{"2019/03/31 10:00 PDT", false},
{"2019/03/31 22:00 PDT", false},
{"2019/04/04 00:49 PDT", true},
{"2019/04/04 12:00 PDT", false},
{"2019/04/04 22:49 PDT", true},
{"2019/04/05 00:49 PDT", true},
{"2019/04/05 08:59 PDT", false},
{"2019/04/05 9:01 PDT", false},
}},
{"mon,tue,wed,thu,fri", "11:59pm", "00:01am", "America/Los_Angeles", []testcase{
{"2019/04/04 23:58 PDT", false},
{"2019/04/04 23:59 PDT", true},
{"2019/04/05 00:00 PDT", true},
{"2019/04/05 00:01 PDT", true},
{"2019/04/05 00:02 PDT", false},
}},
{"mon,tue,wed,fri", "11:59pm", "00:01am", "America/Los_Angeles", []testcase{
{"2019/04/04 23:58 PDT", false},
{"2019/04/04 23:59 PDT", false}, // Even that this falls in the between the hours Thursday is not included so should not run
{"2019/04/05 00:00 PDT", true},
{"2019/04/05 00:02 PDT", false},
}},
{"mon,tue,wed,thu", "11:59pm", "00:01am", "America/Los_Angeles", []testcase{
{"2019/04/04 23:58 PDT", false},
{"2019/04/04 23:59 PDT", true},
{"2019/04/05 00:00 PDT", false}, // Even that this falls in the between the hours Friday is not included so should not run
{"2019/04/05 00:02 PDT", false},
}},
{"mon,tue,wed,thu,fri", "11:59pm", "00:01am", "UTC", []testcase{
{"2019/04/04 23:58 UTC", false},
{"2019/04/04 23:59 UTC", true},
{"2019/04/05 00:00 UTC", true},
{"2019/04/05 00:01 UTC", true},
{"2019/04/05 00:02 UTC", false},
}},
}
for i, tst := range tests {
tw, err := New(strings.Split(tst.days, ","), tst.start, tst.end, tst.loc)
if err != nil {
t.Errorf("Test [%d] failed to create TimeWindow: %v", i, err)
}
for _, cas := range tst.cases {
tm, err := time.ParseInLocation("2006/01/02 15:04 MST", cas.time, tw.location)
if err != nil {
t.Errorf("Failed to parse time \"%s\": %v", cas.time, err)
} else if cas.result != tw.Contains(tm) {
t.Errorf("(%s) contains (%s) didn't match expected result of %v", tw.String(), cas.time, cas.result)
}
}
}
}

View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# USE KUBECTL_CMD to pass context and/or namespaces.
KUBECTL_CMD="${KUBECTL_CMD:-kubectl}"
SENTINEL_FILE="${SENTINEL_FILE:-/var/run/reboot-required}"
echo "Creating reboot sentinel on all nodes"
for nodename in $("$KUBECTL_CMD" get nodes -o name); do
docker exec "${nodename/node\//}" hostname
docker exec "${nodename/node\//}" touch "${SENTINEL_FILE}"
done

View File

@@ -0,0 +1,91 @@
#!/usr/bin/env bash
NODECOUNT=${NODECOUNT:-5}
KUBECTL_CMD="${KUBECTL_CMD:-kubectl}"
DEBUG="${DEBUG:-false}"
CONTAINER_NAME_FORMAT=${CONTAINER_NAME_FORMAT:-"chart-testing-*"}
tmp_dir=$(mktemp -d -t kured-XXXX)
function gather_logs_and_cleanup {
if [[ -f "$tmp_dir"/node_output ]]; then
rm "$tmp_dir"/node_output
fi
rmdir "$tmp_dir"
# The next commands are useful regardless of success or failures.
if [[ "$DEBUG" == "true" ]]; then
echo "############################################################"
# This is useful to see if containers have crashed.
echo "docker ps -a:"
docker ps -a
echo "docker journal logs"
journalctl -u docker --no-pager
# This is useful to see if the nodes have _properly_ rebooted.
# It should show the reboot/two container starts per node.
for name in $(docker ps -a -f "name=${CONTAINER_NAME_FORMAT}" -q); do
echo "############################################################"
echo "docker logs for container $name:"
docker logs "$name"
done
fi
}
trap gather_logs_and_cleanup EXIT
declare -A was_unschedulable
declare -A has_recovered
max_attempts="60"
sleep_time=60
attempt_num=1
set +o errexit
echo "There are $NODECOUNT nodes in the cluster"
until [ ${#was_unschedulable[@]} == "$NODECOUNT" ] && [ ${#has_recovered[@]} == "$NODECOUNT" ]
do
echo "${#was_unschedulable[@]} nodes were removed from pool once:" "${!was_unschedulable[@]}"
echo "${#has_recovered[@]} nodes removed from the pool are now back:" "${!has_recovered[@]}"
#"$KUBECTL_CMD" logs -n kube-system -l name=kured --ignore-errors > "$tmp_dir"/node_output
#if [[ "$DEBUG" == "true" ]]; then
# echo "Kured pod logs:"
# cat "$tmp_dir"/node_output
#fi
"$KUBECTL_CMD" get nodes -o custom-columns=NAME:.metadata.name,SCHEDULABLE:.spec.unschedulable --no-headers > "$tmp_dir"/node_output
if [[ "$DEBUG" == "true" ]]; then
# This is useful to see if a node gets stuck after drain, and doesn't
# come back up.
echo "Result of command $KUBECTL_CMD get nodes ... showing unschedulable nodes:"
cat "$tmp_dir"/node_output
fi
while read -r node; do
unschedulable=$(echo "$node" | grep true | cut -f 1 -d ' ')
if [ -n "$unschedulable" ] && [ -z ${was_unschedulable["$unschedulable"]+x} ] ; then
echo "$unschedulable is now unschedulable!"
was_unschedulable["$unschedulable"]=1
fi
schedulable=$(echo "$node" | grep '<none>' | cut -f 1 -d ' ')
if [ -n "$schedulable" ] && [ ${was_unschedulable["$schedulable"]+x} ] && [ -z ${has_recovered["$schedulable"]+x} ]; then
echo "$schedulable has recovered!"
has_recovered["$schedulable"]=1
fi
done < "$tmp_dir"/node_output
if [[ "${#has_recovered[@]}" == "$NODECOUNT" ]]; then
echo "All nodes recovered."
break
else
if (( attempt_num == max_attempts ))
then
echo "Attempt $attempt_num failed and there are no more attempts left!"
exit 1
else
echo "Attempt $attempt_num failed! Trying again in $sleep_time seconds..."
sleep "$sleep_time"
fi
fi
(( attempt_num++ ))
done
echo "Test successful"

19
tests/kind/test-metrics.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
expected="$1"
if [[ "$expected" != "0" && "$expected" != "1" ]]; then
echo "You should give an argument to this script, the gauge value (0 or 1)"
exit 1
fi
HOST="${HOST:-localhost}"
PORT="${PORT:-30000}"
NODENAME="${NODENAME-chart-testing-control-plane}"
reboot_required=$(docker exec "$NODENAME" curl "http://$HOST:$PORT/metrics" | awk '/^kured_reboot_required/{print $2}')
if [[ "$reboot_required" == "$expected" ]]; then
echo "Test success"
else
echo "Test failed"
exit 1
fi