diff --git a/.github/workflows/release-chart.yaml b/.github/workflows/release-chart.yaml new file mode 100644 index 0000000..3c968fe --- /dev/null +++ b/.github/workflows/release-chart.yaml @@ -0,0 +1,30 @@ +name: Release Charts + +on: + push: + branches: + - master + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v3 + with: + version: v3.4.0 + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.5.0 + env: + CR_TOKEN: "${{ secrets.GH_TOKEN }}" diff --git a/chart/.helmignore b/charts/nodetaint/.helmignore similarity index 100% rename from chart/.helmignore rename to charts/nodetaint/.helmignore diff --git a/chart/Chart.yaml b/charts/nodetaint/Chart.yaml similarity index 89% rename from chart/Chart.yaml rename to charts/nodetaint/Chart.yaml index d446be4..0e26cf0 100644 --- a/chart/Chart.yaml +++ b/charts/nodetaint/Chart.yaml @@ -3,6 +3,6 @@ name: nodetaint description: A Helm chart for nodetaint controller type: application -version: 0.1.0 +version: 0.2.0 appVersion: "v0.0.3" diff --git a/charts/nodetaint/README.md b/charts/nodetaint/README.md new file mode 100644 index 0000000..3a964ae --- /dev/null +++ b/charts/nodetaint/README.md @@ -0,0 +1,83 @@ +# nodetaint + +![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v0.0.3](https://img.shields.io/badge/AppVersion-v0.0.3-informational?style=flat-square) + +A Helm chart for nodetaint controller + +## How to install this chart + +Chart can be verified using the following commands: +```console +curl https://helm.kube.jamf.build/helmsigner.gpg -o helmsigner.gpg +helm pull helm-kube/nodetaint --verify --keyring helmsigner.gpg +``` + +Add helm.kube.jamf.build chart repo: + +```console +helm repo add helm-kube https://helm.kube.jamf.build/ +``` + +A simple install with default values: + +```console +helm install helm-kube/nodetaint +``` + +To install the chart with the release name `my-release`: + +```console +helm install my-release helm-kube/nodetaint +``` + +To install with some set values: + +```console +helm install my-release helm-kube/nodetaint --set values_key1=value1 --set values_key2=value2 +``` + +To install with custom values file: + +```console +helm install my-release helm-kube/nodetaint -f values.yaml +``` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| config.DAEMONSET_ANNOTATION | string | `"nodetaint/crucial"` | | +| config.LOG_LEVEL | string | `"info"` | | +| config.NODE_TAINT | string | `"nodetaint/blocking"` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.registry | string | `"quay.io/"` | | +| image.repository | string | `"wish/nodetaint"` | | +| image.tag | string | `"v0.0.3"` | | +| imagePullSecrets | list | `[]` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podDisruptionBudget.maxUnavailable | int | `1` | | +| podSecurityContext | object | `{}` | | +| rbac.create | bool | `true` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `80` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | + +## How to build and release this chart + +Chart is built and released on each merge to `main` branch. + +Release version is stored in `Chart.yaml` and should be bumped with each release + +Before pushing your commits, make sure to regenerate docs with: +```console +docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest --template-files=ci/README.md.gotmpl +``` diff --git a/chart/templates/_helpers.tpl b/charts/nodetaint/templates/_helpers.tpl similarity index 100% rename from chart/templates/_helpers.tpl rename to charts/nodetaint/templates/_helpers.tpl diff --git a/chart/templates/clusterrole.yaml b/charts/nodetaint/templates/clusterrole.yaml similarity index 100% rename from chart/templates/clusterrole.yaml rename to charts/nodetaint/templates/clusterrole.yaml diff --git a/chart/templates/clusterrolebinding.yaml b/charts/nodetaint/templates/clusterrolebinding.yaml similarity index 100% rename from chart/templates/clusterrolebinding.yaml rename to charts/nodetaint/templates/clusterrolebinding.yaml diff --git a/chart/templates/deployment.yaml b/charts/nodetaint/templates/deployment.yaml similarity index 100% rename from chart/templates/deployment.yaml rename to charts/nodetaint/templates/deployment.yaml diff --git a/chart/templates/poddisruptionbudget.yaml b/charts/nodetaint/templates/poddisruptionbudget.yaml similarity index 94% rename from chart/templates/poddisruptionbudget.yaml rename to charts/nodetaint/templates/poddisruptionbudget.yaml index dc3ad48..ed52ccf 100644 --- a/chart/templates/poddisruptionbudget.yaml +++ b/charts/nodetaint/templates/poddisruptionbudget.yaml @@ -1,5 +1,5 @@ {{- if .Values.podDisruptionBudget }} -apiVersion: policy/v1beta1 +apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: {{ include "nodetaint.fullname" . }} diff --git a/chart/templates/service.yaml b/charts/nodetaint/templates/service.yaml similarity index 100% rename from chart/templates/service.yaml rename to charts/nodetaint/templates/service.yaml diff --git a/chart/templates/serviceaccount.yaml b/charts/nodetaint/templates/serviceaccount.yaml similarity index 100% rename from chart/templates/serviceaccount.yaml rename to charts/nodetaint/templates/serviceaccount.yaml diff --git a/chart/values.yaml b/charts/nodetaint/values.yaml similarity index 100% rename from chart/values.yaml rename to charts/nodetaint/values.yaml diff --git a/ci/README.md.gotmpl b/ci/README.md.gotmpl new file mode 100644 index 0000000..23cd348 --- /dev/null +++ b/ci/README.md.gotmpl @@ -0,0 +1,58 @@ +{{ template "chart.header" . }} + +{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }} + +{{ template "chart.description" . }} + +## How to install this chart + +Chart can be verified using the following commands: +```console +curl https://helm.kube.jamf.build/helmsigner.gpg -o helmsigner.gpg +helm pull helm-kube/{{ template "chart.name" . }} --verify --keyring helmsigner.gpg +``` + +Add helm.kube.jamf.build chart repo: + +```console +helm repo add helm-kube https://helm.kube.jamf.build/ +``` + +A simple install with default values: + +```console +helm install helm-kube/{{ template "chart.name" . }} +``` + +To install the chart with the release name `my-release`: + +```console +helm install my-release helm-kube/{{ template "chart.name" . }} +``` + +To install with some set values: + +```console +helm install my-release helm-kube/{{ template "chart.name" . }} --set values_key1=value1 --set values_key2=value2 +``` + +To install with custom values file: + +```console +helm install my-release helm-kube/{{ template "chart.name" . }} -f values.yaml +``` + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +## How to build and release this chart + +Chart is built and released on each merge to `main` branch. + +Release version is stored in `Chart.yaml` and should be bumped with each release + +Before pushing your commits, make sure to regenerate docs with: +```console +docker run --rm --volume "$(pwd):/helm-docs" -u $(id -u) jnorwood/helm-docs:latest --template-files=ci/README.md.gotmpl +```