From 22ca1e7c38b1434ef932ccc8a30eaa92676a3e70 Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:18:07 +0200 Subject: [PATCH 1/2] remove unused scripts and files Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- .pre-commit-config.yaml | 12 ------ builder.dockerfile | 39 ------------------- .../charts/venafi-kubernetes-agent/README.md | 4 -- .../venafi-kubernetes-agent/README.md.gotmpl | 18 --------- make/util/checkhash.sh | 20 ---------- make/util/hash.sh | 8 ---- 6 files changed, 101 deletions(-) delete mode 100644 .pre-commit-config.yaml delete mode 100644 builder.dockerfile delete mode 100644 deploy/charts/venafi-kubernetes-agent/README.md.gotmpl delete mode 100755 make/util/checkhash.sh delete mode 100755 make/util/hash.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 334d8c0e..00000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,12 +0,0 @@ -repos: - - repo: https://github.com/norwoodj/helm-docs - rev: v1.11.3 - hooks: - - id: helm-docs - args: - - --chart-search-root=deploy/charts/ - - # Repeating the flag adds this to the list, now [./_templates.gotmpl, README.md.gotmpl] - # A base filename makes it relative to each chart directory found - - --template-files=README.md.gotmpl - - --log-level=trace diff --git a/builder.dockerfile b/builder.dockerfile deleted file mode 100644 index b8de692a..00000000 --- a/builder.dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM golang:1.23.1 as builder - -WORKDIR /go/github.com/jetstack/preflight - -# Run a dependency resolve with just the go mod files present for -# better caching -COPY go.mod go.sum . - -COPY < 📖 Read the [Venafi Kubernetes Agent documentation](https://docs.venafi.cloud/vaas/k8s-components/c-tlspk-agent-overview/), -> to learn how install and configure this Helm chart. - -{{ template "chart.requirementsSection" . }} - -{{ template "chart.valuesSection" . }} - -{{ template "helm-docs.versionFooter" . }} diff --git a/make/util/checkhash.sh b/make/util/checkhash.sh deleted file mode 100755 index 3f1907b8..00000000 --- a/make/util/checkhash.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -set -eu -o pipefail - -# This script takes the hash of its first argument and verifies it against the -# hex hash given in its second argument - -SHASUM=$(./make/util/hash.sh "$1") - -# When running 'make learn-sha-tools', we don't want this script to fail. -# Instead we log what sha values are wrong, so the make.mk file can be updated. -if [ "$SHASUM" != "$2" ] && [ "${LEARN_FILE:-}" != "" ]; then - echo "s/$2/$SHASUM/g" >> "${LEARN_FILE:-}" - exit 0 -fi - -if [ "$SHASUM" != "$2" ]; then - echo "invalid checksum for \"$1\": wanted \"$2\" but got \"$SHASUM\"" - exit 1 -fi diff --git a/make/util/hash.sh b/make/util/hash.sh deleted file mode 100755 index 50364102..00000000 --- a/make/util/hash.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -eu -o pipefail - -# This script is a wrapper for outputting purely the sha256 hash of the input file, -# ideally in a portable way. - -sha256sum "$1" | cut -d" " -f1 From 336a8022d1db0e04e46d52304490d36658ed9279 Mon Sep 17 00:00:00 2001 From: Tim Ramlot <42113979+inteon@users.noreply.github.com> Date: Mon, 30 Sep 2024 17:21:58 +0200 Subject: [PATCH 2/2] fix bug in values.yaml Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com> --- .../charts/venafi-kubernetes-agent/README.md | 25 ++++++++----------- .../values.schema.json | 5 ++-- .../venafi-kubernetes-agent/values.yaml | 7 ++---- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/deploy/charts/venafi-kubernetes-agent/README.md b/deploy/charts/venafi-kubernetes-agent/README.md index e34273b2..8064c0bb 100644 --- a/deploy/charts/venafi-kubernetes-agent/README.md +++ b/deploy/charts/venafi-kubernetes-agent/README.md @@ -440,6 +440,16 @@ Control Plane. > ``` Enable or disable the PodDisruptionBudget resource, which helps prevent downtime during voluntary disruptions such as during a Node upgrade. +#### **podDisruptionBudget.minAvailable** ~ `number` + +Configure the minimum available pods for disruptions. Can either be set to an integer (e.g. 1) or a percentage value (e.g. 25%). +Cannot be used if `maxUnavailable` is set. + +#### **podDisruptionBudget.maxUnavailable** ~ `number` + +Configure the maximum unavailable pods for disruptions. Can either be set to an integer (e.g. 1) or a percentage value (e.g. 25%). +Cannot be used if `minAvailable` is set. + ### CRDs @@ -465,20 +475,5 @@ This option makes it so that the "helm.sh/resource-policy": keep annotation is a > ``` When set to false, the rendered output does not contain the. VenafiConnection CRDs and RBAC. This is useful for when the. Venafi Connection resources are already installed separately. -#### **podDisruptionBudget.enabled** ~ `bool` -> Default value: -> ```yaml -> false -> ``` -#### **podDisruptionBudget.minAvailable** ~ `number` -> Default value: -> ```yaml -> 1 -> ``` -#### **podDisruptionBudget.maxUnavailable** ~ `number` -> Default value: -> ```yaml -> 1 -> ``` \ No newline at end of file diff --git a/deploy/charts/venafi-kubernetes-agent/values.schema.json b/deploy/charts/venafi-kubernetes-agent/values.schema.json index 38174f31..a6e2c0b5 100644 --- a/deploy/charts/venafi-kubernetes-agent/values.schema.json +++ b/deploy/charts/venafi-kubernetes-agent/values.schema.json @@ -477,14 +477,15 @@ }, "helm-values.podDisruptionBudget.enabled": { "default": false, + "description": "Enable or disable the PodDisruptionBudget resource, which helps prevent downtime during voluntary disruptions such as during a Node upgrade.", "type": "boolean" }, "helm-values.podDisruptionBudget.maxUnavailable": { - "default": 1, + "description": "Configure the maximum unavailable pods for disruptions. Can either be set to an integer (e.g. 1) or a percentage value (e.g. 25%).\nCannot be used if `minAvailable` is set.", "type": "number" }, "helm-values.podDisruptionBudget.minAvailable": { - "default": 1, + "description": "Configure the minimum available pods for disruptions. Can either be set to an integer (e.g. 1) or a percentage value (e.g. 25%).\nCannot be used if `maxUnavailable` is set.", "type": "number" }, "helm-values.podSecurityContext": { diff --git a/deploy/charts/venafi-kubernetes-agent/values.yaml b/deploy/charts/venafi-kubernetes-agent/values.yaml index c626f334..b0fc45ef 100644 --- a/deploy/charts/venafi-kubernetes-agent/values.yaml +++ b/deploy/charts/venafi-kubernetes-agent/values.yaml @@ -254,11 +254,13 @@ podDisruptionBudget: # Configure the minimum available pods for disruptions. Can either be set to # an integer (e.g. 1) or a percentage value (e.g. 25%). # Cannot be used if `maxUnavailable` is set. + # +docs:property # minAvailable: 1 # Configure the maximum unavailable pods for disruptions. Can either be set to # an integer (e.g. 1) or a percentage value (e.g. 25%). # Cannot be used if `minAvailable` is set. + # +docs:property # maxUnavailable: 1 # +docs:section=CRDs @@ -284,8 +286,3 @@ crds: # VenafiConnection CRDs and RBAC. This is useful for when the # Venafi Connection resources are already installed separately. include: false - -podDisruptionBudget: - enabled: false - minAvailable: 1 - maxUnavailable: 1 \ No newline at end of file