From 56a26a2f25e8351b0d6b7a0e37c6569e8a92a926 Mon Sep 17 00:00:00 2001 From: Daniel Holbach Date: Tue, 6 Apr 2021 10:33:02 +0200 Subject: [PATCH] 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 --- ...h-charts.yaml => on-main-push-charts.yaml} | 2 +- ...{on-master-push.yaml => on-main-push.yaml} | 6 ++-- .github/workflows/on-pr.yaml | 4 +-- .github/workflows/on-tag.yaml | 2 +- .github/workflows/periodics-daily.yaml | 10 +++--- README.md | 33 ++++++++++--------- charts/kured/Chart.yaml | 4 +-- 7 files changed, 31 insertions(+), 30 deletions(-) rename .github/workflows/{on-master-push-charts.yaml => on-main-push-charts.yaml} (95%) rename .github/workflows/{on-master-push.yaml => on-main-push.yaml} (92%) diff --git a/.github/workflows/on-master-push-charts.yaml b/.github/workflows/on-main-push-charts.yaml similarity index 95% rename from .github/workflows/on-master-push-charts.yaml rename to .github/workflows/on-main-push-charts.yaml index 9dbefe5..be42da0 100644 --- a/.github/workflows/on-master-push-charts.yaml +++ b/.github/workflows/on-main-push-charts.yaml @@ -2,7 +2,7 @@ name: Publish helm chart on: push: branches: - - "master" + - "main" paths: - "charts/**" diff --git a/.github/workflows/on-master-push.yaml b/.github/workflows/on-main-push.yaml similarity index 92% rename from .github/workflows/on-master-push.yaml rename to .github/workflows/on-main-push.yaml index 2d5a826..ddb301d 100644 --- a/.github/workflows/on-master-push.yaml +++ b/.github/workflows/on-main-push.yaml @@ -1,16 +1,16 @@ # We publish every merged commit in the form of an image # named kured:- -name: Push image of latest master +name: Push image of latest main on: push: branches: - - master + - main jobs: tag-scan-and-push-final-image: name: "Build, scan, and publish tagged image" runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Find go version run: | diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index c69b27a..7f0beb3 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -53,7 +53,7 @@ jobs: name: Check docs for incorrect links runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Link Checker id: lc uses: peter-evans/link-checker@v1 @@ -131,7 +131,7 @@ jobs: - name: Deploy kured on default namespace with its helm chart run: | # Documented in official helm doc to live on the edge - curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash + curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash # Refresh bins hash -r helm install kured ./charts/kured/ --set configuration.period=1m diff --git a/.github/workflows/on-tag.yaml b/.github/workflows/on-tag.yaml index ccc2e97..ebd3f5e 100644 --- a/.github/workflows/on-tag.yaml +++ b/.github/workflows/on-tag.yaml @@ -12,7 +12,7 @@ jobs: name: "Build, scan, and publish tagged image" runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - uses: actions/checkout@v2 - name: Find go version run: | GO_VERSION=$(awk '/^go/ {print $2};' go.mod) diff --git a/.github/workflows/periodics-daily.yaml b/.github/workflows/periodics-daily.yaml index 8aaee2f..403420c 100644 --- a/.github/workflows/periodics-daily.yaml +++ b/.github/workflows/periodics-daily.yaml @@ -39,7 +39,7 @@ jobs: name: Check docs for incorrect links runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Link Checker id: lc uses: peter-evans/link-checker@v1 @@ -90,8 +90,8 @@ jobs: go-version: "${{ steps.awk_gomod.outputs.version }}" - name: Build artifacts run: | - make DH_ORG="${{ github.repository_owner }}" VERSION="master" image - make DH_ORG="${{ github.repository_owner }}" VERSION="master" helm-chart + make DH_ORG="${{ github.repository_owner }}" VERSION="main" image + make DH_ORG="${{ github.repository_owner }}" VERSION="main" helm-chart - name: "Workaround 'Failed to attach 1 to compat systemd cgroup /actions_job/...' on gh actions" run: | @@ -109,12 +109,12 @@ jobs: config: .github/kind-cluster-${{ matrix.kubernetes }}.yaml - name: Preload previously built images onto kind cluster - run: kind load docker-image docker.io/${{ github.repository_owner }}/kured:master --name chart-testing + run: kind load docker-image docker.io/${{ github.repository_owner }}/kured:main --name chart-testing - name: Deploy kured on default namespace with its helm chart run: | # Documented in official helm doc to live on the edge - curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash + curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash # Refresh bins hash -r helm install kured ./charts/kured/ --set configuration.period=1m diff --git a/README.md b/README.md index 446cf4f..44836ac 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # kured - Kubernetes Reboot Daemon - + * [Introduction](#introduction) * [Kubernetes & OS Compatibility](#kubernetes-&-os-compatibility) @@ -44,16 +44,16 @@ maintaining the lock and draining worker nodes. Kubernetes aims to provide forwards and backwards compatibility of one minor version between client and server: -| kured | kubectl | k8s.io/client-go | k8s.io/apimachinery | expected kubernetes compatibility | -|--------|---------|------------------|---------------------|-----------------------------------| -| master | 1.20.1 | v0.20.1 | v0.20.1 | 1.19.x, 1.20.x, 1.21.x | -| 1.6.0 | 1.19.4 | v0.19.4 | v0.19.4 | 1.18.x, 1.19.x, 1.20.x | -| 1.5.1 | 1.18.8 | v0.18.8 | v0.18.8 | 1.17.x, 1.18.x, 1.19.x | -| 1.4.4 | 1.17.7 | v0.17.0 | v0.17.0 | 1.16.x, 1.17.x, 1.18.x | -| 1.3.0 | 1.15.10 | v12.0.0 | release-1.15 | 1.15.x, 1.16.x, 1.17.x | -| 1.2.0 | 1.13.6 | v10.0.0 | release-1.13 | 1.12.x, 1.13.x, 1.14.x | -| 1.1.0 | 1.12.1 | v9.0.0 | release-1.12 | 1.11.x, 1.12.x, 1.13.x | -| 1.0.0 | 1.7.6 | v4.0.0 | release-1.7 | 1.6.x, 1.7.x, 1.8.x | +| kured | kubectl | k8s.io/client-go | k8s.io/apimachinery | expected kubernetes compatibility | +|-------|---------|------------------|---------------------|-----------------------------------| +| main | 1.20.1 | v0.20.1 | v0.20.1 | 1.19.x, 1.20.x, 1.21.x | +| 1.6.1 | 1.19.4 | v0.19.4 | v0.19.4 | 1.18.x, 1.19.x, 1.20.x | +| 1.5.1 | 1.18.8 | v0.18.8 | v0.18.8 | 1.17.x, 1.18.x, 1.19.x | +| 1.4.4 | 1.17.7 | v0.17.0 | v0.17.0 | 1.16.x, 1.17.x, 1.18.x | +| 1.3.0 | 1.15.10 | v12.0.0 | release-1.15 | 1.15.x, 1.16.x, 1.17.x | +| 1.2.0 | 1.13.6 | v10.0.0 | release-1.13 | 1.12.x, 1.13.x, 1.14.x | +| 1.1.0 | 1.12.1 | v9.0.0 | release-1.12 | 1.11.x, 1.12.x, 1.13.x | +| 1.0.0 | 1.7.6 | v4.0.0 | release-1.7 | 1.6.x, 1.7.x, 1.8.x | See the [release notes](https://github.com/weaveworks/kured/releases) for specific version compatibility information, including which @@ -222,11 +222,13 @@ probe for active alerts before rebooting, be sure to specify ### Notifications When you specify a formatted URL using `--notify-url`, kured will notify -about draining and rebooting nodes across a list of technologies. +about draining and rebooting nodes across a list of technologies. + ![Notification](img/slack-notification.png) Alternatively you can use the `--message-template-drain` and `--message-template-reboot` to customize the text of the message, e.g. -``` + +```cli --message-template-drain="Draining node %s part of *my-cluster* in region *xyz*" ``` @@ -241,8 +243,7 @@ teams: `teams://token-a/token-b/token-c` Email: `smtp://username:password@host:port/?fromAddress=fromAddress&toAddresses=recipient1[,recipient2,...]` -More details here: https://github.com/containrrr/shoutrrr/blob/master/docs/services/overview.md - +More details here: ### Overriding Lock Configuration @@ -332,7 +333,7 @@ our [development][development] docs. Use of `latest` for production deployments is bad practice - see [here](https://kubernetes.io/docs/concepts/configuration/overview) for -details. The manifest on `master` refers to `latest` for local +details. The manifest on `main` refers to `latest` for local development testing with minikube only; for production use choose a versioned manifest from the [release page](https://github.com/weaveworks/kured/releases/). diff --git a/charts/kured/Chart.yaml b/charts/kured/Chart.yaml index 2e119c8..1f3c240 100644 --- a/charts/kured/Chart.yaml +++ b/charts/kured/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.6.1" description: A Helm chart for kured name: kured -version: 2.4.1 +version: 2.4.2 home: https://github.com/weaveworks/kured maintainers: - name: ckotzbauer @@ -11,4 +11,4 @@ maintainers: email: david@davidkarlsen.com sources: - https://github.com/weaveworks/kured -icon: https://raw.githubusercontent.com/weaveworks/kured/master/img/logo.png +icon: https://raw.githubusercontent.com/weaveworks/kured/main/img/logo.png