From 82142f4d6a8b01f8559c57ce0f47bfe80f11afe1 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Evrard Date: Tue, 20 Sep 2022 12:42:30 +0200 Subject: [PATCH] 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 --- .github/ct.yaml | 7 - .github/workflows/on-main-push-charts.yaml | 19 -- .github/workflows/on-pr-charts.yaml | 78 ------- .github/workflows/on-pr.yaml | 165 -------------- .github/workflows/periodics-daily.yaml | 71 ------ DEVELOPMENT.md | 45 +--- Makefile | 8 +- charts/kured/.helmignore | 21 -- charts/kured/Chart.yaml | 14 -- charts/kured/README.md | 154 ------------- charts/kured/ci/prometheus-values.yaml | 13 -- charts/kured/templates/NOTES.txt | 3 - charts/kured/templates/_helpers.tpl | 72 ------- charts/kured/templates/clusterrole.yaml | 30 --- .../kured/templates/clusterrolebinding.yaml | 16 -- charts/kured/templates/daemonset.yaml | 203 ------------------ charts/kured/templates/podsecuritypolicy.yaml | 21 -- charts/kured/templates/role.yaml | 30 --- charts/kured/templates/rolebinding.yaml | 17 -- charts/kured/templates/service.yaml | 29 --- charts/kured/templates/serviceaccount.yaml | 9 - charts/kured/templates/servicemonitor.yaml | 31 --- charts/kured/values.minikube.yaml | 34 --- charts/kured/values.yaml | 102 --------- 24 files changed, 9 insertions(+), 1183 deletions(-) delete mode 100644 .github/ct.yaml delete mode 100644 .github/workflows/on-main-push-charts.yaml delete mode 100644 .github/workflows/on-pr-charts.yaml delete mode 100644 charts/kured/.helmignore delete mode 100644 charts/kured/Chart.yaml delete mode 100644 charts/kured/README.md delete mode 100644 charts/kured/ci/prometheus-values.yaml delete mode 100644 charts/kured/templates/NOTES.txt delete mode 100644 charts/kured/templates/_helpers.tpl delete mode 100644 charts/kured/templates/clusterrole.yaml delete mode 100644 charts/kured/templates/clusterrolebinding.yaml delete mode 100644 charts/kured/templates/daemonset.yaml delete mode 100644 charts/kured/templates/podsecuritypolicy.yaml delete mode 100644 charts/kured/templates/role.yaml delete mode 100644 charts/kured/templates/rolebinding.yaml delete mode 100644 charts/kured/templates/service.yaml delete mode 100644 charts/kured/templates/serviceaccount.yaml delete mode 100644 charts/kured/templates/servicemonitor.yaml delete mode 100644 charts/kured/values.minikube.yaml delete mode 100644 charts/kured/values.yaml diff --git a/.github/ct.yaml b/.github/ct.yaml deleted file mode 100644 index f0dec45..0000000 --- a/.github/ct.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# See https://github.com/helm/chart-testing#configuration -remote: origin -target-branch: main -chart-dirs: - - charts -chart-repos: [] -helm-extra-args: --timeout 600s diff --git a/.github/workflows/on-main-push-charts.yaml b/.github/workflows/on-main-push-charts.yaml deleted file mode 100644 index 6a787da..0000000 --- a/.github/workflows/on-main-push-charts.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Publish helm chart -on: - push: - branches: - - "main" - paths: - - "charts/**" - -jobs: - publish-helm-chart: - name: Publish latest chart - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Publish Helm chart - uses: stefanprodan/helm-gh-pages@master - with: - token: ${{ secrets.GITHUB_TOKEN }} - charts_dir: charts diff --git a/.github/workflows/on-pr-charts.yaml b/.github/workflows/on-pr-charts.yaml deleted file mode 100644 index 34ddca6..0000000 --- a/.github/workflows/on-pr-charts.yaml +++ /dev/null @@ -1,78 +0,0 @@ -#This is just extra testing, for lint check, and basic installation -#Those can fail earlier than functional tests (shorter tests) -# and give developer feedback soon if they didn't test themselves -name: PR - charts -on: - pull_request: - paths: - - "charts/**" -jobs: - # We create two jobs (with a matrix) instead of one to make those parallel. - # We don't need to conditionally check if something has changed, due to github actions - # tackling that for us. - # Fail-fast ensures that if one of those matrix job fail, the other one gets cancelled. - test-chart: - name: Test helm chart changes - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - test-action: - - lint - - install - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: "0" - - - uses: actions/setup-python@v4 - with: - python-version: 3.7 - - # Helm is already present in github actions, so do not re-install it - - name: Setup chart testing - uses: helm/chart-testing-action@v2.3.0 - - - name: Create default kind cluster - uses: helm/kind-action@v1.3.0 - with: - version: v0.14.0 - if: ${{ matrix.test-action == 'install' }} - - - name: Run chart tests - run: ct ${{ matrix.test-action }} --config .github/ct.yaml - - # This doesn't re-use the ct actions, due to many limitations (auto tear down, no real testing) - deploy-chart: - name: Functional test of helm chart in its current state (needs published image of the helm chart) - runs-on: ubuntu-latest - needs: test-chart - steps: - - uses: actions/checkout@v3 - - # Default name for helm/kind-action kind clusters is "chart-testing" - - name: Create 1 node kind cluster - uses: helm/kind-action@v1.3.0 - with: - version: v0.14.0 - - - 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/main/scripts/get-helm-3 | bash - # Refresh bins - hash -r - helm install kured ./charts/kured/ --set configuration.period=1m --wait - kubectl config set-context kind-chart-testing - kubectl get ds --all-namespaces - kubectl describe ds kured - - - name: Test if successful deploy - uses: nick-invision/retry@v2.8.1 - with: - timeout_minutes: 10 - max_attempts: 10 - retry_wait_seconds: 10 - # DESIRED CURRENT READY UP-TO-DATE AVAILABLE should all be = to cluster_size - command: "kubectl get ds kured | grep -E 'kured.*1.*1.*1.*1.*1'" \ No newline at end of file diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 5a722f5..e130d29 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -177,168 +177,3 @@ jobs: DEBUG: true run: | ./tests/kind/follow-coordinated-reboot.sh - - scenario-prom-helm: - name: Test prometheus with latest code from HEAD (=overrides image of the helm chart) - runs-on: ubuntu-latest - # only build with oldest and newest supported, it should be good enough. - strategy: - fail-fast: false - matrix: - kubernetes: - - "1.22" - steps: - - uses: actions/checkout@v3 - - name: Find go version - run: | - GO_VERSION=$(awk '/^go/ {print $2};' go.mod) - echo "::set-output name=version::${GO_VERSION}" - id: awk_gomod - - name: Ensure go version - uses: actions/setup-go@v3 - with: - go-version: "${{ steps.awk_gomod.outputs.version }}" - check-latest: true - - name: Build artifacts - run: | - make DH_ORG="${{ github.repository_owner }}" VERSION="${{ github.sha }}" image - make DH_ORG="${{ github.repository_owner }}" VERSION="${{ github.sha }}" helm-chart - - - 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 1 node kind cluster - uses: helm/kind-action@v1.3.0 - with: - version: v0.14.0 - - - name: Preload previously built images onto kind cluster - run: kind load docker-image docker.io/${{ github.repository_owner }}/kured:${{ github.sha }} --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/main/scripts/get-helm-3 | bash - # Refresh bins - hash -r - helm install kured ./charts/kured/ --wait --values ./charts/kured/ci/prometheus-values.yaml - kubectl config set-context kind-chart-testing - kubectl get ds --all-namespaces - kubectl describe ds kured - - - name: Ensure kured is ready - uses: nick-invision/retry@v2.8.1 - with: - timeout_minutes: 10 - max_attempts: 10 - retry_wait_seconds: 60 - # DESIRED CURRENT READY UP-TO-DATE AVAILABLE - command: "kubectl get ds kured | grep -E 'kured.*1.*1.*1.*1.*1' " - - - name: Get metrics (healthy) - uses: nick-invision/retry@v2.8.1 - with: - timeout_minutes: 2 - max_attempts: 12 - retry_wait_seconds: 5 - command: "./tests/kind/test-metrics.sh 0" - - - name: Create reboot sentinel files - run: | - ./tests/kind/create-reboot-sentinels.sh - - - name: Get metrics (need reboot) - uses: nick-invision/retry@v2.8.1 - with: - timeout_minutes: 15 - max_attempts: 10 - retry_wait_seconds: 60 - command: "./tests/kind/test-metrics.sh 1" - - - # TEMPLATE Scenario testing. - # Note: keep in mind that the helm chart's appVersion is overriden to test your HEAD of the branch, - # if you `make helm-chart`. - # This will allow you to test properly your scenario and not use an existing image which will not - # contain your feature. - - # scenario--helm: - # #example: Testing with helm chart and code from HEAD" - # name: "" - # runs-on: ubuntu-latest - # strategy: - # fail-fast: false - # # You can define your own kubernetes versions. For example if your helm chart change should behave differently with different kubernetes versions. - # matrix: - # kubernetes: - # - "1.20" - # steps: - # - uses: actions/checkout@v3 - # - name: Find go version - # run: | - # GO_VERSION=$(awk '/^go/ {print $2};' go.mod) - # echo "::set-output name=version::${GO_VERSION}" - # id: awk_gomod - # - name: Ensure go version - # uses: actions/setup-go@v3 - # with: - # go-version: "${{ steps.awk_gomod.outputs.version }}.x" - # - name: Build artifacts - # run: | - # make DH_ORG="${{ github.repository_owner }}" VERSION="${{ github.sha }}" image - # make DH_ORG="${{ github.repository_owner }}" VERSION="${{ github.sha }}" helm-chart - # - # - 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 5 node kind cluster - # uses: helm/kind-action@master - # with: - # 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:${{ github.sha }} --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/main/scripts/get-helm-3 | bash - # # Refresh bins - # hash -r - # helm install kured ./charts/kured/ --wait --values ./charts/kured/ci/-values.yaml - # kubectl config set-context kind-chart-testing - # kubectl get ds --all-namespaces - # kubectl describe ds kured - # - # - name: Ensure kured is ready - # uses: nick-invision/retry@v2.8.1 - # with: - # timeout_minutes: 10 - # max_attempts: 10 - # retry_wait_seconds: 60 - # # DESIRED CURRENT READY UP-TO-DATE AVAILABLE should all be = 5 - # command: "kubectl get ds kured | grep -E 'kured.*5.*5.*5.*5.*5' " - # - # - name: Create reboot sentinel files - # run: | - # ./tests/kind/create-reboot-sentinels.sh - # - # - name: Test - # env: - # DEBUG: true - # run: | - # diff --git a/.github/workflows/periodics-daily.yaml b/.github/workflows/periodics-daily.yaml index 9d262d5..f5eb0b7 100644 --- a/.github/workflows/periodics-daily.yaml +++ b/.github/workflows/periodics-daily.yaml @@ -70,74 +70,3 @@ jobs: DOCKLE_HOST: "unix:///var/run/docker.sock" with: image-name: docker.io/${{ github.repository_owner }}/kured:${{ github.sha }} - - deploy-helm: - name: Ensure our currently released helm chart works on all kubernetes versions - runs-on: ubuntu-latest - # only build with oldest and newest supported, it should be good enough. - strategy: - matrix: - kubernetes: - - "1.22" - - "1.23" - - "1.24" - steps: - - uses: actions/checkout@v3 - - name: Find go version - run: | - GO_VERSION=$(awk '/^go/ {print $2};' go.mod) - echo "::set-output name=version::${GO_VERSION}" - id: awk_gomod - - name: Ensure go version - uses: actions/setup-go@v3 - with: - go-version: "${{ steps.awk_gomod.outputs.version }}" - check-latest: true - - - 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 5 node kind cluster - uses: helm/kind-action@v1.3.0 - with: - config: .github/kind-cluster-${{ matrix.kubernetes }}.yaml - version: v0.14.0 - - - 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/main/scripts/get-helm-3 | bash - # Refresh bins - hash -r - helm install kured ./charts/kured/ --set configuration.period=1m - kubectl config set-context kind-chart-testing - kubectl get ds --all-namespaces - kubectl get nodes -o yaml - sleep 5 - kubectl describe ds kured - - - name: Ensure kured is ready - uses: nick-invision/retry@v2.8.1 - with: - timeout_minutes: 10 - max_attempts: 10 - retry_wait_seconds: 60 - # DESIRED CURRENT READY UP-TO-DATE AVAILABLE should all be = 5 - command: "kubectl get ds 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 diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6b51542..97b0c71 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -77,15 +77,17 @@ If your change involves a user facing change (change in flags of kured for examp please include expose your new feature in our default manifest (`kured-ds.yaml`), as a comment. -Do not update the helm chart directly. -Helm charts and our release manifests (see below) are our stable interfaces. -Any user facing changes will therefore have to wait for a while before being +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 `charts/` to make your feature available for our next kured version. -In this change, you can directly bump the appVersion to the next minor version. -(for example, if current appVersion is 1.6.x, make sure you update your appVersion +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 @@ -96,11 +98,6 @@ testing to full functional testing (even using helm charts) We are welcoming any change to increase our test coverage. See also our github issues for the label `testing`. -### Updating helm charts - -Helm charts are continuously published. Any change in `charts/` will be immediately -pushed in production. - ## Automated testing Our CI is covered by github actions. @@ -113,11 +110,6 @@ We currently run: - 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 -- basic deployment using our helm chart on any chart change - -Changes in helm charts are not functionally tested on PRs. We assume that -the PRs to implement the feature are properly tested by our users and -contributors before merge. To test your code manually, follow the section Manual testing. @@ -161,10 +153,6 @@ minikube kubectl -- apply -f kured-rbac.yaml minikube kubectl -- apply -f kured-ds.yaml minikube kubectl -- logs daemonset.apps/kured -n kube-system -f -# Alternatively use helm to install the chart -# edit values-local.yaml to change any chart parameters -helm install kured ./charts/kured --namespace kube-system -f ./charts/kured/values.minikube.yaml - # In separate terminal minikube ssh sudo touch /var/run/reboot-required @@ -234,20 +222,3 @@ 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.) - -### Update the Helm chart - -You can automatically bump the helm chart's application version -with the latest image tag by running: - -```sh -make DH_ORG="weaveworks" VERSION="1.3.0" helm-chart -``` - -A change in the helm chart requires a bump of the `version` -in `charts/kured/Chart.yaml` (following the versioning rules). -Update it, and issue a PR. Upon merge, that PR will automatically -publish the chart to the gh-pages branch. - -When there are open helm-chart PRs which are on hold until the helm-chart has been updated -with the new kured version, they can be merged now (unless a rebase is needed from the contributor). diff --git a/Makefile b/Makefile index 111713f..6e480a7 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .DEFAULT: all -.PHONY: all clean image publish-image minikube-publish manifest helm-chart test tests kured-multi +.PHONY: all clean image publish-image minikube-publish manifest test tests kured-multi DH_ORG=weaveworks VERSION=$(shell git symbolic-ref --short HEAD)-$(shell git rev-parse --short HEAD) @@ -43,12 +43,6 @@ manifest: sed -i "s#image: docker.io/.*kured.*#image: docker.io/$(DH_ORG)/kured:$(VERSION)#g" kured-ds.yaml echo "Please generate combined manifest if necessary" -helm-chart: - sed -i "s#repository:.*/kured#repository: $(DH_ORG)/kured#g" charts/kured/values.yaml - sed -i "s#appVersion:.*#appVersion: \"$(VERSION)\"#g" charts/kured/Chart.yaml - sed -i "s#\`[0-9]*\.[0-9]*\.[0-9]*\`#\`$(VERSION)\`#g" charts/kured/README.md - echo "Please bump version in charts/kured/Chart.yaml" - test: tests echo "Running go tests" go test ./... diff --git a/charts/kured/.helmignore b/charts/kured/.helmignore deleted file mode 100644 index f0c1319..0000000 --- a/charts/kured/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/charts/kured/Chart.yaml b/charts/kured/Chart.yaml deleted file mode 100644 index e86a22f..0000000 --- a/charts/kured/Chart.yaml +++ /dev/null @@ -1,14 +0,0 @@ -apiVersion: v1 -appVersion: "1.10.2" -description: A Helm chart for kured -name: kured -version: 3.0.1 -home: https://github.com/weaveworks/kured -maintainers: - - name: ckotzbauer - email: christian.kotzbauer@gmail.com - - name: davidkarlsen - email: david@davidkarlsen.com -sources: - - https://github.com/weaveworks/kured -icon: https://raw.githubusercontent.com/weaveworks/kured/main/img/logo.png diff --git a/charts/kured/README.md b/charts/kured/README.md deleted file mode 100644 index cffbb8f..0000000 --- a/charts/kured/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Kured (KUbernetes REboot Daemon) - -## Introduction -This chart installs the "Kubernetes Reboot Daemon" using the Helm Package Manager. - -## Prerequisites -- Kubernetes 1.9+ - -## Installing the Chart -To install the chart with the release name `my-release`: -```bash -$ helm repo add kured https://weaveworks.github.io/kured -$ helm install my-release kured/kured -``` - -## Uninstalling the Chart -To uninstall/delete the `my-release` deployment: -```bash -$ helm delete my-release -``` - -The command removes all the Kubernetes components associated with the chart and deletes the release. - -## Upgrade Notes - -### From 2.x to 3.x - -The Helm chart labels have been realigned to conform with the [standard labels](https://helm.sh/docs/chart_best_practices/labels/#standard-labels) in the current Helm Chart Best Practices guide, so this upgrade will fail unless the DaemonSet is deleted and recreated. The only way that Helm supports delete and recreate is by uninstalling, so please uninstall the Kured Helm chart before installing again with `v3.x`. - -If you use any GitOps tool, please check and understand how to do a reinstall beforehand. - -Supposing users want to enable metrics and use a `ServiceMonitor` with the `kube-prometheus-stack` chart's default `prometheus` instance. Starting with a chart that has values: - -``` -metrics: - create: true - labels: - release: kube-prometheus-stack -``` - -A "ServiceMonitor" needs a "release" label to be discovered by the Prometheus-Operator with the default configuration of `kube-prometheus-stack` and this chart (in the prior `v2.x` chart) already sets a `release` label hardcoded. This is changed by applying the best-practise labels in the chart `v3.x`. Now the user can decide which `release` label-value should be used. - -With this update, it's more readily possible to make use of the Kured chart with `kube-prometheus-stack`'s default `ServiceMonitor` selector configuration. - -## Migrate from stable Helm-Chart - -### From 1.x to 2.x - -The following changes have been made compared to the stable chart: -- **[BREAKING CHANGE]** The `autolock` feature was removed. Use `configuration.startTime` and `configuration.endTime` instead. -- Role inconsistencies have been fixed (allowed verbs for modifying the `DaemonSet`, apiGroup of `PodSecurityPolicy`) -- Added support for affinities. -- Configuration of cli-flags can be made through a `configuration` object. -- Added optional `Service` and `ServiceMonitor` support for metrics endpoint. -- Previously static Slack channel, hook URL and username values are now made dynamic using `tpl` function. - -## Configuration - -| Config | Description | Default | -| ------ | ----------- | ------- | -| `image.repository` | Image repository | `weaveworks/kured` | -| `image.tag` | Image tag | `1.10.2` | -| `image.pullPolicy` | Image pull policy | `IfNotPresent` | -| `image.pullSecrets` | Image pull secrets | `[]` | -| `updateStrategy` | Daemonset update strategy | `RollingUpdate` | -| `maxUnavailable` | The max pods unavailable during a rolling update | `1` | -| `podAnnotations` | Annotations to apply to pods (eg to add Prometheus annotations) | `{}` | -| `dsAnnotations` | Annotations to apply to the kured DaemonSet | `{}` | -| `extraArgs` | Extra arguments to pass to `/usr/bin/kured`. See below. | `{}` | -| `extraEnvVars` | Array of environment variables to pass to the daemonset. | `{}` | -| `configuration.lockTtl` | cli-parameter `--lock-ttl` | `0` | -| `configuration.lockReleaseDelay` | cli-parameter `--lock-release-delay` | `0` | -| `configuration.alertFilterRegexp` | cli-parameter `--alert-filter-regexp` | `""` | -| `configuration.alertFiringOnly` | cli-parameter `--alert-firing-only` | `false` | -| `configuration.blockingPodSelector` | Array of selectors for multiple cli-parameters `--blocking-pod-selector` | `[]` | -| `configuration.endTime` | cli-parameter `--end-time` | `""` | -| `configuration.lockAnnotation` | cli-parameter `--lock-annotation` | `""` | -| `configuration.period` | cli-parameter `--period` | `""` | -| `configuration.forceReboot` | cli-parameter `--force-reboot` | `false` | -| `configuration.drainGracePeriod` | cli-parameter `--drain-grace-period` | `""` | -| `configuration.drainTimeout` | cli-parameter `--drain-timeout` | `""` | -| `configuration.skipWaitForDeleteTimeout` | cli-parameter `--skip-wait-for-delete-timeout` | `""` | -| `configuration.prometheusUrl` | cli-parameter `--prometheus-url` | `""` | -| `configuration.rebootDays` | Array of days for multiple cli-parameters `--reboot-days` | `[]` | -| `configuration.rebootSentinel` | cli-parameter `--reboot-sentinel` | `""` | -| `configuration.rebootSentinelCommand` | cli-parameter `--reboot-sentinel-command` | `""` | -| `configuration.rebootCommand` | cli-parameter `--reboot-command` | `""` | -| `configuration.rebootDelay` | cli-parameter `--reboot-delay` | `""` | -| `configuration.slackChannel` | cli-parameter `--slack-channel`. Passed through `tpl` | `""` | -| `configuration.slackHookUrl` | cli-parameter `--slack-hook-url`. Passed through `tpl` | `""` | -| `configuration.slackUsername` | cli-parameter `--slack-username`. Passed through `tpl` | `""` | -| `configuration.notifyUrl` | cli-parameter `--notify-url` | `""` | -| `configuration.messageTemplateDrain` | cli-parameter `--message-template-drain` | `""` | -| `configuration.messageTemplateReboot` | cli-parameter `--message-template-reboot` | `""` | -| `configuration.messageTemplateUncordon` | cli-parameter `--message-template-uncordon` | `""` | -| `configuration.startTime` | cli-parameter `--start-time` | `""` | -| `configuration.timeZone` | cli-parameter `--time-zone` | `""` | -| `configuration.annotateNodes` | cli-parameter `--annotate-nodes` | `false` | -| `configuration.logFormat` | cli-parameter `--log-format` | `"text"` | -| `configuration.preferNoScheduleTaint` | Taint name applied during pending node reboot | `""` | -| `configuration.preRebootNodeLabels` | Array of key-value-pairs to add to nodes before cordoning for multiple cli-parameters `--pre-reboot-node-labels` | `[]` | -| `configuration.postRebootNodeLabels` | Array of key-value-pairs to add to nodes after uncordoning for multiple cli-parameters `--post-reboot-node-labels` | `[]` | -| `rbac.create` | Create RBAC roles | `true` | -| `serviceAccount.create` | Create a service account | `true` | -| `serviceAccount.name` | Service account name to create (or use if `serviceAccount.create` is false) | (chart fullname) | -| `podSecurityPolicy.create` | Create podSecurityPolicy | `false` | -| `containerSecurityContext.privileged ` | Enables `privileged` in container-specific security context | `true` | -| `containerSecurityContext.allowPrivilegeEscalation`| Enables `allowPrivilegeEscalation` in container-specific security context. If not set it won't be configured. | | -| `resources` | Resources requests and limits. | `{}` | -| `metrics.create` | Create a ServiceMonitor for prometheus-operator | `false` | -| `metrics.namespace` | The namespace to create the ServiceMonitor in | `""` | -| `metrics.labels` | Additional labels for the ServiceMonitor | `{}` | -| `metrics.interval` | Interval prometheus should scrape the endpoint | `60s` | -| `metrics.scrapeTimeout` | A custom scrapeTimeout for prometheus | `""` | -| `service.create` | Create a Service for the metrics endpoint | `false` | -| `service.name ` | Service name for the metrics endpoint | `""` | -| `service.port` | Port of the service to expose | `8080` | -| `service.annotations` | Annotations to apply to the service (eg to add Prometheus annotations) | `{}` | -| `podLabels` | Additional labels for pods (e.g. CostCenter=IT) | `{}` | -| `priorityClassName` | Priority Class to be used by the pods | `""` | -| `tolerations` | Tolerations to apply to the daemonset (eg to allow running on master) | `[{"key": "node-role.kubernetes.io/control-plane", "effect": "NoSchedule"}]` for Kubernetes 1.24.0 and greater, otherwise `[{"key": "node-role.kubernetes.io/master", "effect": "NoSchedule"}]`| -| `affinity` | Affinity for the daemonset (ie, restrict which nodes kured runs on) | `{}` | -| `nodeSelector` | Node Selector for the daemonset (ie, restrict which nodes kured runs on) | `{}` | -| `volumeMounts` | Maps of volumes mount to mount | `{}` | -| `volumes` | Maps of volumes to mount | `{}` | -See https://github.com/weaveworks/kured#configuration for values (not contained in the `configuration` object) for `extraArgs`. Note that -```yaml -extraArgs: - foo: 1 - bar-baz: 2 -``` -becomes `/usr/bin/kured ... --foo=1 --bar-baz=2`. - - -## Prometheus Metrics - -Kured exposes a single prometheus metric indicating whether a reboot is required or not (see [kured docs](https://github.com/weaveworks/kured#prometheus-metrics)) for details. - -#### Prometheus-Operator - -```yaml -metrics: - create: true -``` - -#### Prometheus Annotations - -```yaml -service: - annotations: - prometheus.io/scrape: "true" - prometheus.io/path: "/metrics" - prometheus.io/port: "8080" -``` diff --git a/charts/kured/ci/prometheus-values.yaml b/charts/kured/ci/prometheus-values.yaml deleted file mode 100644 index 9b418a2..0000000 --- a/charts/kured/ci/prometheus-values.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# This is tested twice: -# Basic install test with chart-testing (on charts PRs) -# Functional testing in PRs (other PRs) - -service: - create: true - name: kured-prometheus-endpoint - port: 8080 - type: NodePort - nodePort: 30000 - -# Do not override the configuration: period in this, so that -# We can test prometheus exposed metrics without rebooting. diff --git a/charts/kured/templates/NOTES.txt b/charts/kured/templates/NOTES.txt deleted file mode 100644 index da2a02d..0000000 --- a/charts/kured/templates/NOTES.txt +++ /dev/null @@ -1,3 +0,0 @@ -Kured will check for /var/run/reboot-required, and reboot nodes when needed. - -See https://github.com/weaveworks/kured/ for details. diff --git a/charts/kured/templates/_helpers.tpl b/charts/kured/templates/_helpers.tpl deleted file mode 100644 index 9476d6b..0000000 --- a/charts/kured/templates/_helpers.tpl +++ /dev/null @@ -1,72 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "kured.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "kured.fullname" -}} -{{- if .Values.fullnameOverride -}} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- if contains $name .Release.Name -}} -{{- .Release.Name | trunc 63 | trimSuffix "-" -}} -{{- else -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} -{{- end -}} -{{- end -}} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "kured.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create the name of the service account to use -*/}} -{{- define "kured.serviceAccountName" -}} -{{- if .Values.serviceAccount.create -}} - {{ default (include "kured.fullname" .) .Values.serviceAccount.name }} -{{- else -}} - {{ default "default" .Values.serviceAccount.name }} -{{- end -}} -{{- end -}} - -{{/* -Return the appropriate apiVersion for podsecuritypolicy. -*/}} -{{- define "kured.psp.apiVersion" -}} -{{- if semverCompare "<1.10-0" .Capabilities.KubeVersion.GitVersion -}} -{{- print "extensions/v1beta1" -}} -{{- else -}} -{{- print "policy/v1beta1" -}} -{{- end -}} -{{- end -}} - -{{/* -Returns a set of labels applied to each resource. -*/}} -{{- define "kured.labels" -}} -app.kubernetes.io/name: {{ template "kured.name" . }} -helm.sh/chart: {{ template "kured.chart" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end -}} - -{{/* -Returns a set of matchLabels applied. -*/}} -{{- define "kured.matchLabels" -}} -app.kubernetes.io/name: {{ template "kured.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end -}} diff --git a/charts/kured/templates/clusterrole.yaml b/charts/kured/templates/clusterrole.yaml deleted file mode 100644 index bdefec7..0000000 --- a/charts/kured/templates/clusterrole.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: {{ template "kured.fullname" . }} - labels: - {{- include "kured.labels" . | nindent 4 }} -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: ["extensions"] - resources: ["daemonsets"] - verbs: ["get"] -- apiGroups: ["apps"] - resources: ["daemonsets"] - verbs: ["get"] -- apiGroups: [""] - resources: ["pods/eviction"] - verbs: ["create"] -{{- end -}} diff --git a/charts/kured/templates/clusterrolebinding.yaml b/charts/kured/templates/clusterrolebinding.yaml deleted file mode 100644 index 1b2e45b..0000000 --- a/charts/kured/templates/clusterrolebinding.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ template "kured.fullname" . }} - labels: - {{- include "kured.labels" . | nindent 4 }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "kured.fullname" . }} -subjects: -- kind: ServiceAccount - name: {{ template "kured.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} -{{- end -}} diff --git a/charts/kured/templates/daemonset.yaml b/charts/kured/templates/daemonset.yaml deleted file mode 100644 index 0d0caa9..0000000 --- a/charts/kured/templates/daemonset.yaml +++ /dev/null @@ -1,203 +0,0 @@ -apiVersion: apps/v1 -kind: DaemonSet -metadata: - name: {{ template "kured.fullname" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "kured.labels" . | nindent 4 }} - {{- if .Values.dsAnnotations }} - annotations: - {{- range $key, $value := .Values.dsAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} -spec: - updateStrategy: - type: {{ .Values.updateStrategy }} -{{- if eq .Values.updateStrategy "RollingUpdate"}} - rollingUpdate: - maxUnavailable: {{ .Values.maxUnavailable }} -{{- end}} - selector: - matchLabels: - {{- include "kured.matchLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "kured.labels" . | nindent 8 }} - {{- if .Values.podLabels }} - {{- toYaml .Values.podLabels | nindent 8 }} - {{- end }} - {{- if .Values.podAnnotations }} - annotations: - {{- range $key, $value := .Values.podAnnotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} - spec: - serviceAccountName: {{ template "kured.serviceAccountName" . }} - hostPID: true - restartPolicy: Always - {{- with .Values.image.pullSecrets }} - imagePullSecrets: -{{ toYaml . | indent 8 }} - {{- end }} - {{- if .Values.priorityClassName }} - priorityClassName: {{ .Values.priorityClassName }} - {{- end }} - containers: - - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: -{{ toYaml .Values.containerSecurityContext | indent 12 }} - resources: -{{ toYaml .Values.resources | indent 12 }} - command: - - /usr/bin/kured - args: - - --ds-name={{ template "kured.fullname" . }} - - --ds-namespace={{ .Release.Namespace }} - {{- if .Values.configuration.lockTtl }} - - --lock-ttl={{ .Values.configuration.lockTtl }} - {{- end }} - {{- if .Values.configuration.lockReleaseDelay }} - - --lock-release-delay={{ .Values.configuration.lockReleaseDelay }} - {{- end }} - {{- if .Values.configuration.alertFilterRegexp }} - - --alert-filter-regexp={{ .Values.configuration.alertFilterRegexp }} - {{- end }} - {{- if .Values.configuration.alertFiringOnly }} - - --alert-firing-only={{ .Values.configuration.alertFiringOnly }} - {{- end }} - {{- range .Values.configuration.blockingPodSelector }} - - --blocking-pod-selector={{ . }} - {{- end }} - {{- if .Values.configuration.endTime }} - - --end-time={{ .Values.configuration.endTime }} - {{- end }} - {{- if .Values.configuration.lockAnnotation }} - - --lock-annotation={{ .Values.configuration.lockAnnotation }} - {{- end }} - {{- if .Values.configuration.period }} - - --period={{ .Values.configuration.period }} - {{- end }} - {{- if .Values.configuration.forceReboot }} - - --force-reboot - {{- end }} - {{- if .Values.configuration.drainGracePeriod }} - - --drain-grace-period={{ .Values.configuration.drainGracePeriod }} - {{- end }} - {{- if .Values.configuration.drainTimeout }} - - --drain-timeout={{ .Values.configuration.drainTimeout }} - {{- end }} - {{- if .Values.configuration.skipWaitForDeleteTimeout }} - - --skip-wait-for-delete-timeout={{ .Values.configuration.skipWaitForDeleteTimeout }} - {{- end }} - {{- if .Values.configuration.prometheusUrl }} - - --prometheus-url={{ .Values.configuration.prometheusUrl }} - {{- end }} - {{- range .Values.configuration.rebootDays }} - - --reboot-days={{ . }} - {{- end }} - {{- range .Values.configuration.preRebootNodeLabels }} - - --pre-reboot-node-labels={{ . }} - {{- end }} - {{- range .Values.configuration.postRebootNodeLabels }} - - --post-reboot-node-labels={{ . }} - {{- end }} - {{- if .Values.configuration.rebootSentinel }} - - --reboot-sentinel={{ .Values.configuration.rebootSentinel }} - {{- end }} - {{- if .Values.configuration.rebootSentinelCommand }} - - --reboot-sentinel-command={{ .Values.configuration.rebootSentinelCommand }} - {{- end }} - {{- if .Values.configuration.rebootCommand }} - - --reboot-command={{ .Values.configuration.rebootCommand }} - {{- end }} - {{- if .Values.configuration.rebootDelay }} - - --reboot-delay={{ .Values.configuration.rebootDelay }} - {{- end }} - {{- if .Values.configuration.slackChannel }} - - --slack-channel={{ tpl .Values.configuration.slackChannel . }} - {{- end }} - {{- if .Values.configuration.slackHookUrl }} - - --slack-hook-url={{ tpl .Values.configuration.slackHookUrl . }} - {{- end }} - {{- if .Values.configuration.slackUsername }} - - --slack-username={{ tpl .Values.configuration.slackUsername . }} - {{- end }} - {{- if .Values.configuration.notifyUrl }} - - --notify-url={{ .Values.configuration.notifyUrl }} - {{- end }} - {{- if .Values.configuration.messageTemplateDrain }} - - --message-template-drain={{ .Values.configuration.messageTemplateDrain }} - {{- end }} - {{- if .Values.configuration.messageTemplateReboot }} - - --message-template-reboot={{ .Values.configuration.messageTemplateReboot }} - {{- end }} - {{- if .Values.configuration.messageTemplateUncordon }} - - --message-template-uncordon={{ .Values.configuration.messageTemplateUncordon }} - {{- end }} - {{- if .Values.configuration.startTime }} - - --start-time={{ .Values.configuration.startTime }} - {{- end }} - {{- if .Values.configuration.timeZone }} - - --time-zone={{ .Values.configuration.timeZone }} - {{- end }} - {{- if .Values.configuration.annotateNodes }} - - --annotate-nodes={{ .Values.configuration.annotateNodes }} - {{- end }} - {{- if .Values.configuration.preferNoScheduleTaint }} - - --prefer-no-schedule-taint={{ .Values.configuration.preferNoScheduleTaint }} - {{- end }} - {{- if .Values.configuration.logFormat }} - - --log-format={{ .Values.configuration.logFormat }} - {{- end }} - {{- range $key, $value := .Values.extraArgs }} - {{- if $value }} - - --{{ $key }}={{ $value }} - {{- else }} - - --{{ $key }} - {{- end }} - {{- end }} -{{- if .Values.volumeMounts }} - volumeMounts: -{{- toYaml .Values.volumeMounts | nindent 12 }} -{{- end }} - 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 - - name: KURED_NODE_ID - valueFrom: - fieldRef: - fieldPath: spec.nodeName - {{- if .Values.extraEnvVars }} - {{ toYaml .Values.extraEnvVars | nindent 12 }} - {{- end }} - tolerations: - {{- if .Values.tolerations }} - {{- with .Values.tolerations }} -{{ toYaml . | indent 8 }} - {{- end }} - {{- else }} - - key: node-role.kubernetes.io/control-plane - effect: NoSchedule - - key: node-role.kubernetes.io/master - effect: NoSchedule - {{- end }} - {{- with .Values.nodeSelector }} - nodeSelector: -{{ toYaml . | indent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: -{{ toYaml . | indent 8 }} - {{- end }} -{{- if .Values.volumes }} - volumes: -{{- toYaml .Values.volumes | nindent 8 }} -{{- end }} diff --git a/charts/kured/templates/podsecuritypolicy.yaml b/charts/kured/templates/podsecuritypolicy.yaml deleted file mode 100644 index 71a3095..0000000 --- a/charts/kured/templates/podsecuritypolicy.yaml +++ /dev/null @@ -1,21 +0,0 @@ -{{- if .Values.podSecurityPolicy.create}} -apiVersion: {{ template "kured.psp.apiVersion" . }} -kind: PodSecurityPolicy -metadata: - name: {{ template "kured.fullname" . }} - labels: - {{- include "kured.labels" . | nindent 4 }} -spec: - privileged: true - hostPID: true - allowedCapabilities: ['*'] - fsGroup: - rule: RunAsAny - runAsUser: - rule: RunAsAny - seLinux: - rule: RunAsAny - supplementalGroups: - rule: RunAsAny - volumes: ['*'] -{{- end }} diff --git a/charts/kured/templates/role.yaml b/charts/kured/templates/role.yaml deleted file mode 100644 index d937ed7..0000000 --- a/charts/kured/templates/role.yaml +++ /dev/null @@ -1,30 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - namespace: {{ .Release.Namespace }} - name: {{ template "kured.fullname" . }} - labels: - {{- include "kured.labels" . | nindent 4 }} -rules: - # Allow kured to lock/unlock itself - - apiGroups: ["extensions"] - resources: ["daemonsets"] - resourceNames: ["{{ template "kured.fullname" . }}"] - verbs: ["update", "patch"] - - apiGroups: ["apps"] - resources: ["daemonsets"] - resourceNames: ["{{ template "kured.fullname" . }}"] - verbs: ["update", "patch"] -{{- if .Values.podSecurityPolicy.create }} - - apiGroups: ["extensions"] - resources: ["podsecuritypolicies"] - resourceNames: ["{{ template "kured.fullname" . }}"] - verbs: ["use"] - - apiGroups: ["policy"] - resources: ["podsecuritypolicies"] - resourceNames: ["{{ template "kured.fullname" . }}"] - verbs: ["use"] -{{- end }} - -{{- end -}} diff --git a/charts/kured/templates/rolebinding.yaml b/charts/kured/templates/rolebinding.yaml deleted file mode 100644 index 58f1b26..0000000 --- a/charts/kured/templates/rolebinding.yaml +++ /dev/null @@ -1,17 +0,0 @@ -{{- if .Values.rbac.create -}} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - namespace: {{ .Release.Namespace }} - name: {{ template "kured.fullname" . }} - labels: - {{- include "kured.labels" . | nindent 4 }} -subjects: -- kind: ServiceAccount - namespace: {{ .Release.Namespace }} - name: {{ template "kured.serviceAccountName" . }} -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ template "kured.fullname" . }} -{{- end -}} diff --git a/charts/kured/templates/service.yaml b/charts/kured/templates/service.yaml deleted file mode 100644 index 0a6e437..0000000 --- a/charts/kured/templates/service.yaml +++ /dev/null @@ -1,29 +0,0 @@ -{{- if or .Values.service.create .Values.metrics.create }} -apiVersion: v1 -kind: Service -metadata: - {{- if .Values.service.name }} - name: {{ .Values.service.name }} - {{- else }} - name: {{ template "kured.fullname" . }} - {{- end }} - labels: - {{- include "kured.labels" . | nindent 4 }} - {{- if .Values.service.annotations }} - annotations: - {{- range $key, $value := .Values.service.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} - {{- end }} -spec: - type: {{ .Values.service.type }} - ports: - - name: metrics - port: {{ .Values.service.port }} - targetPort: 8080 - {{- if eq .Values.service.type "NodePort" }} - nodePort: {{ .Values.service.nodePort }} - {{- end }} - selector: - {{- include "kured.matchLabels" . | nindent 4 }} -{{- end }} diff --git a/charts/kured/templates/serviceaccount.yaml b/charts/kured/templates/serviceaccount.yaml deleted file mode 100644 index 4ce53b9..0000000 --- a/charts/kured/templates/serviceaccount.yaml +++ /dev/null @@ -1,9 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ template "kured.serviceAccountName" . }} - namespace: {{ .Release.Namespace }} - labels: - {{- include "kured.labels" . | nindent 4 }} -{{- end -}} diff --git a/charts/kured/templates/servicemonitor.yaml b/charts/kured/templates/servicemonitor.yaml deleted file mode 100644 index 7e36a0e..0000000 --- a/charts/kured/templates/servicemonitor.yaml +++ /dev/null @@ -1,31 +0,0 @@ -{{- if .Values.metrics.create }} -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ template "kured.fullname" . }} - {{- if .Values.metrics.namespace }} - namespace: {{ .Values.metrics.namespace }} - {{- end }} - labels: - {{- include "kured.labels" . | nindent 4 }} - {{- if .Values.metrics.labels }} - {{- toYaml .Values.metrics.labels | nindent 4 }} - {{- end }} -spec: - endpoints: - - interval: {{ .Values.metrics.interval }} - {{- if .Values.metrics.scrapeTimeout }} - scrapeTimeout: {{ .Values.metrics.scrapeTimeout }} - {{- end }} - honorLabels: true - targetPort: 8080 - path: /metrics - scheme: http - jobLabel: "{{ .Release.Name }}" - selector: - matchLabels: - {{- include "kured.matchLabels" . | nindent 6 }} - namespaceSelector: - matchNames: - - {{ .Release.Namespace }} -{{- end }} diff --git a/charts/kured/values.minikube.yaml b/charts/kured/values.minikube.yaml deleted file mode 100644 index 15168f9..0000000 --- a/charts/kured/values.minikube.yaml +++ /dev/null @@ -1,34 +0,0 @@ -image: - repository: weaveworks/kured - tag: latest - -configuration: - # annotationTtl: 0 # force clean annotation after this amount of time (default 0, disabled) - # alertFilterRegexp: "" # alert names to ignore when checking for active alerts - # alertFiringOnly: false # only consider firing alerts when checking for active alerts - # blockingPodSelector: [] # label selector identifying pods whose presence should prevent reboots - # endTime: "" # only reboot before this time of day (default "23:59") - # lockAnnotation: "" # annotation in which to record locking node (default "weave.works/kured-node-lock") - period: "1m" # reboot check period (default 1h0m0s) - # forceReboot: false # force a reboot even if the drain fails or times out (default: false) - # drainGracePeriod: "" # time in seconds given to each pod to terminate gracefully, if negative, the default value specified in the pod will be used (default: -1) - # drainTimeout: "" # timeout after which the drain is aborted (default: 0, infinite time) - # skipWaitForDeleteTimeout: "" # when time is greater than zero, skip waiting for the pods whose deletion timestamp is older than N seconds while draining a node (default: 0) - # prometheusUrl: "" # Prometheus instance to probe for active alerts - # rebootDays: [] # only reboot on these days (default [su,mo,tu,we,th,fr,sa]) - # rebootSentinel: "" # path to file whose existence signals need to reboot (default "/var/run/reboot-required") - # rebootSentinelCommand: "" # command for which a successful run signals need to reboot (default ""). If non-empty, sentinel file will be ignored. - # slackChannel: "" # slack channel for reboot notfications - # slackHookUrl: "" # slack hook URL for reboot notfications - # slackUsername: "" # slack username for reboot notfications (default "kured") - # notifyUrl: "" # notification URL with the syntax as follows: https://containrrr.dev/shoutrrr/services/overview/ - # messageTemplateDrain: "" # slack message template when notifying about a node being drained (default "Draining node %s") - # messageTemplateReboot: "" # slack message template when notifying about a node being rebooted (default "Rebooted node %s") - # messageTemplateUncordon: "" # slack message template when notifying about a node being drained (default "Node %s rebooted & uncordoned successfully!") - # startTime: "" # only reboot after this time of day (default "0:00") - # timeZone: "" # time-zone to use (valid zones from "time" golang package) - # annotateNodes: false # enable 'weave.works/kured-reboot-in-progress' and 'weave.works/kured-most-recent-reboot-needed' node annotations to signify kured reboot operations - # lockReleaseDelay: "5m" # hold lock after reboot by this amount of time (default 0, disabled) - # logFormat: "text" # log format specified as text or json, defaults to text - # preRebootNodeLabels: [] # labels to add to nodes before cordoning (default []) - # postRebootNodeLabels: [] # labels to add to nodes after uncordoning (default []) diff --git a/charts/kured/values.yaml b/charts/kured/values.yaml deleted file mode 100644 index 9b52518..0000000 --- a/charts/kured/values.yaml +++ /dev/null @@ -1,102 +0,0 @@ -image: - repository: weaveworks/kured - tag: "" # will default to the appVersion in Chart.yaml - pullPolicy: IfNotPresent - pullSecrets: [] - -updateStrategy: RollingUpdate -# requires RollingUpdate updateStrategy -maxUnavailable: 1 - -podAnnotations: {} -dsAnnotations: {} - -extraArgs: {} - -extraEnvVars: -# - name: slackHookUrl -# valueFrom: -# secretKeyRef: -# name: secret_name -# key: secret_key -# - name: regularEnvVariable -# value: 123 - -configuration: - lockTtl: 0 # force clean annotation after this amount of time (default 0, disabled) - alertFilterRegexp: "" # alert names to ignore when checking for active alerts - alertFiringOnly: false # only consider firing alerts when checking for active alerts - blockingPodSelector: [] # label selector identifying pods whose presence should prevent reboots - endTime: "" # only reboot before this time of day (default "23:59") - lockAnnotation: "" # annotation in which to record locking node (default "weave.works/kured-node-lock") - period: "" # reboot check period (default 1h0m0s) - forceReboot: false # force a reboot even if the drain fails or times out (default: false) - drainGracePeriod: "" # time in seconds given to each pod to terminate gracefully, if negative, the default value specified in the pod will be used (default: -1) - drainTimeout: "" # timeout after which the drain is aborted (default: 0, infinite time) - skipWaitForDeleteTimeout: "" # when time is greater than zero, skip waiting for the pods whose deletion timestamp is older than N seconds while draining a node (default: 0) - prometheusUrl: "" # Prometheus instance to probe for active alerts - rebootDays: [] # only reboot on these days (default [su,mo,tu,we,th,fr,sa]) - rebootSentinel: "" # path to file whose existence signals need to reboot (default "/var/run/reboot-required") - rebootSentinelCommand: "" # command for which a successful run signals need to reboot (default ""). If non-empty, sentinel file will be ignored. - rebootCommand: "/bin/systemctl reboot" # command to run when a reboot is required by the sentinel - rebootDelay: "" # add a delay after drain finishes but before the reboot command is issued - slackChannel: "" # slack channel for reboot notfications - slackHookUrl: "" # slack hook URL for reboot notfications - slackUsername: "" # slack username for reboot notfications (default "kured") - notifyUrl: "" # notification URL with the syntax as follows: https://containrrr.dev/shoutrrr/services/overview/ - messageTemplateDrain: "" # slack message template when notifying about a node being drained (default "Draining node %s") - messageTemplateReboot: "" # slack message template when notifying about a node being rebooted (default "Rebooted node %s") - messageTemplateUncordon: "" # slack message template when notifying about a node being uncordoned (default "Node %s rebooted & uncordoned successfully!") - startTime: "" # only reboot after this time of day (default "0:00") - timeZone: "" # time-zone to use (valid zones from "time" golang package) - annotateNodes: false # enable 'weave.works/kured-reboot-in-progress' and 'weave.works/kured-most-recent-reboot-needed' node annotations to signify kured reboot operations - lockReleaseDelay: 0 # hold lock after reboot by this amount of time (default 0, disabled) - preferNoScheduleTaint: "" # Taint name applied during pending node reboot (to prevent receiving additional pods from other rebooting nodes). Disabled by default. Set e.g. to "weave.works/kured-node-reboot" to enable tainting. - logFormat: "text" # log format specified as text or json, defaults to text - preRebootNodeLabels: [] # labels to add to nodes before cordoning (default []) - postRebootNodeLabels: [] # labels to add to nodes after uncordoning (default []) - - -rbac: - create: true - -serviceAccount: - create: true - name: - -podSecurityPolicy: - create: false - -containerSecurityContext: - privileged: true # Give permission to nsenter /proc/1/ns/mnt -# allowPrivilegeEscalation: true # Needed when using defaultAllowPrivilegedEscalation: false in psp - -resources: {} - -metrics: - create: false - namespace: "" - labels: {} - interval: 60s - scrapeTimeout: "" - -service: - create: false - port: 8080 - annotations: {} - name: "" - type: ClusterIP - -podLabels: {} - -priorityClassName: "" - -tolerations: [] - -affinity: {} - -nodeSelector: {} - -volumeMounts: [] - -volumes: []