From fb735b68b511698d6f41e628efa01b41659215d8 Mon Sep 17 00:00:00 2001 From: Steve Hipwell Date: Wed, 17 Jan 2024 10:36:35 +0000 Subject: [PATCH] chore(node-config): Updated readme (#865) Signed-off-by: Steve Hipwell --- .helmdocsignore | 1 - charts/node-config/Chart.yaml | 2 +- charts/node-config/README.md | 106 ++++++++++++++++------------ charts/node-config/README.md.gotmpl | 35 +++++++++ charts/node-config/values.yaml | 51 +++++++++++-- 5 files changed, 143 insertions(+), 52 deletions(-) create mode 100644 charts/node-config/README.md.gotmpl diff --git a/.helmdocsignore b/.helmdocsignore index 07926e47..7a08db08 100644 --- a/.helmdocsignore +++ b/.helmdocsignore @@ -1,7 +1,6 @@ confluence-server jira-software nexus3 -node-config overprovisioner sonarqube thanos diff --git a/charts/node-config/Chart.yaml b/charts/node-config/Chart.yaml index c337d1fa..96170a27 100644 --- a/charts/node-config/Chart.yaml +++ b/charts/node-config/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: node-config -description: Helm chart for configuring Kubernetes nodes with a DaemonSet. +description: Helm chart for configuring Kubernetes nodes via a DaemonSet init container. type: application version: 0.5.0 appVersion: 0.1.0 diff --git a/charts/node-config/README.md b/charts/node-config/README.md index c099302f..cc81aea7 100644 --- a/charts/node-config/README.md +++ b/charts/node-config/README.md @@ -1,58 +1,72 @@ -# Node Config +# node-config -The _Node Config_ chart is designed to run an init container as a DaemonSet to configure Kubernetes nodes. +![Version: 0.5.0](https://img.shields.io/badge/Version-0.5.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) + +Helm chart for configuring Kubernetes nodes via a DaemonSet init container. + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| stevehipwell | | | + +## Source Code + +* ## Installing the Chart -Before you can install the chart you will need to add the `stevehipwell` repo to [Helm](https://helm.sh/). +To install the chart using the recommended OCI method you can use the following command. ```shell -helm repo add stevehipwell https://stevehipwell.github.io/helm-charts/ +helm upgrade --install node-config oci://ghcr.io/stevehipwell/helm-charts/node-config --version 0.5.0 ``` -After you've installed the repo you can install the chart. +Alternatively you can use the legacy non-OCI method via the following commands. ```shell -helm upgrade --install --namespace default --values ./my-values.yaml my-release stevehipwell/node-config +helm repo add stevehipwell https://stevehipwell.github.io/helm-charts/ +helm upgrade --install node-config stevehipwell/node-config --version 0.5.0 ``` -## Configuration - -The following table lists the configurable parameters of the _Node Config_ chart and their default values. - -| Parameter | Description | Default | -| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | -| `nameOverride` | Override the `name` of the chart. | | -| `fullnameOverride` | Override the `fullname` of the chart. | | -| `commonLabels` | Labels to add to all chart resources. | `{}` | -| `imagePullSecrets` | Image pull secrets. | `[]` | -| `serviceAccount.create` | If `true`, create a new service account. | `true` | -| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the full name template. | | -| `serviceAccount.labels` | Labels to add to the service account. | `{}` | -| `serviceAccount.annotations` | Annotations to add to the service account. | `{}` | -| `serviceAccount.automountToken` | If `true`, mount the ServiceAccount token. | `false` | -| `scripts.name` | Name of the script to create. | | -| `scripts.filename` | Filename of the script to create. | | -| `scripts.content` | Content of the script to create. | | -| `extraVolumes` | Extra volumes for the pod. | `[]` | -| `podLabels` | Labels to add to the pod. | `{}` | -| `podAnnotations` | Annotations to add to the pod. | `{}` | -| `hostPID` | If the pod should use the host PID. | `false` | -| `podSecurityContext` | Security context for the pod. | `{}` | -| `priorityClassName` | Priority class name to use. | | -| `terminationGracePeriodSeconds` | Termination grace period of the pod in seconds. | | -| `config.image.repository` | Image repository for the _config_ container image. | `docker.io/alpine` | -| `config.image.tag` | Image tag for the _config_ container image. | `latest` | -| `config.image.pullPolicy` | Image pull policy for the _config_ container image. | `IfNotPresent` | -| `config.securityContext` | Security context for the _config_ container. | `{}` | -| `config.env` | Environment variables for the _config_ container. | `[]` | -| `config.command` | Command for the _config_ container. | _See values.yaml_ | -| `config.extraVolumeMounts` | Extra volume mounts for the _config_ container. | `[]` | -| `config.resources` | Resource requests and limits for the _config_ container. | `{}` | -| `pause.image.repository` | Image repository for the _pause_ container image. | `registry.k8s.io/pause` | -| `pause.image.tag` | Image tag for the _pause_ container image. | `3.9` | -| `pause.image.pullPolicy` | Image pull policy for the _pause_ container image. | `IfNotPresent` | -| `pause.resources` | Resource requests and limits for the _pause_ container. | _See values.yaml_ | -| `nodeSelector` | Node labels for pod assignment. | `{ kubernetes.io/os: linux }` | -| `affinity.nodeAffinity` | Node affinity settings for pod assignment. | `{}` | -| `tolerations` | Toleration labels for pod assignment. | `[]` | +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity.nodeAffinity | object | `{}` | Node affinity for scheduling. | +| commonLabels | object | `{}` | Labels to add to all chart resources. | +| config.command | list | `["sh","-c","/opt/config.sh"]` | Command for the config container | +| config.env | list | `[]` | Environment variables for the config container. | +| config.extraVolumeMounts | list | `[]` | Extra volume mounts for the config container. | +| config.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy for the config container. | +| config.image.repository | string | `"docker.io/alpine"` | Image repository for the config container. | +| config.image.tag | string | `"latest"` | Image tag for the config container | +| config.resources | object | `{}` | Resources for the config container. | +| config.securityContext | object | See _values.yaml_ | Security context for the config container. | +| extraVolumes | list | `[]` | Extra volumes for the pod. | +| fullnameOverride | string | `nil` | Override the full name of the chart. | +| hostPID | bool | `false` | If `true`, allow the pod access to the host process ID namespace. | +| imagePullSecrets | list | `[]` | Image pull secrets. | +| nameOverride | string | `nil` | Override the name of the chart. | +| nodeSelector | object | `{"kubernetes.io/os":"linux"}` | Node selector labels for scheduling. | +| pause.image.pullPolicy | string | `"IfNotPresent"` | Image pull policy for the pause container. | +| pause.image.repository | string | `"registry.k8s.io/pause"` | Image repository for the pause container. | +| pause.image.tag | float | `3.9` | Image tag for the pause container | +| pause.resources | object | `{"limits":{"cpu":"100m","memory":"8Mi"},"requests":{"cpu":"10m","memory":"8Mi"}}` | Resources for the pause container. | +| podAnnotations | object | `{}` | Annotations to add to the pod. | +| podLabels | object | `{}` | Labels to add to the pod. | +| podSecurityContext | object | See _values.yaml_ | Security context for the pod. | +| priorityClassName | string | `nil` | Priority class name for the pod. | +| scripts | list | See _values.yaml_ | Scripts to create and mount. | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account. | +| serviceAccount.create | bool | `true` | If `true`, create a new `ServiceAccount`. | +| serviceAccount.labels | object | `{}` | Labels to add to the service account. | +| serviceAccount.name | string | `nil` | If this is set and `serviceAccount.create` is `true` this will be used for the created `ServiceAccount` name, if set and `serviceAccount.create` is `false` then this will define an existing `ServiceAccount` to use. | +| terminationGracePeriodSeconds | int | `nil` | Termination grace period for the pod in seconds. | +| tolerations | list | `[]` | Node taints that will be tolerated for scheduling. | + +---------------------------------------------- + +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs/). diff --git a/charts/node-config/README.md.gotmpl b/charts/node-config/README.md.gotmpl new file mode 100644 index 00000000..e5eee599 --- /dev/null +++ b/charts/node-config/README.md.gotmpl @@ -0,0 +1,35 @@ +{{ template "chart.header" . }} +{{ template "chart.deprecationWarning" . }} + +{{ template "chart.badgesSection" . }} + +{{ template "chart.description" . }} + +{{ template "chart.homepageLine" . }} + +{{ template "chart.maintainersSection" . }} + +{{ template "chart.sourcesSection" . }} + +## Installing the Chart + +To install the chart using the recommended OCI method you can use the following command. + +```shell +helm upgrade --install {{ template "chart.name" . }} oci://ghcr.io/stevehipwell/helm-charts/{{ template "chart.name" . }} --version {{ template "chart.version" . }} +``` + +Alternatively you can use the legacy non-OCI method via the following commands. + +```shell +helm repo add stevehipwell https://stevehipwell.github.io/helm-charts/ +helm upgrade --install {{ template "chart.name" . }} stevehipwell/{{ template "chart.name" . }} --version {{ template "chart.version" . }} +``` + +{{ template "chart.requirementsSection" . }} + +{{ template "chart.valuesSection" . }} + +---------------------------------------------- + +Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs/). diff --git a/charts/node-config/values.yaml b/charts/node-config/values.yaml index 512d4229..47ee629f 100644 --- a/charts/node-config/values.yaml +++ b/charts/node-config/values.yaml @@ -1,17 +1,31 @@ +# Default values for node-config. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# -- (string) Override the name of the chart. nameOverride: + +# -- (string) Override the full name of the chart. fullnameOverride: +# -- Labels to add to all chart resources. commonLabels: {} +# -- Image pull secrets. imagePullSecrets: [] serviceAccount: + # -- If `true`, create a new `ServiceAccount`. create: true - name: + # -- Labels to add to the service account. labels: {} + # -- Annotations to add to the service account. annotations: {} - automountToken: false + # -- (string) If this is set and `serviceAccount.create` is `true` this will be used for the created `ServiceAccount` name, if set and `serviceAccount.create` is `false` then this will define an existing `ServiceAccount` to use. + name: +# -- Scripts to create and mount. +# @default -- See _values.yaml_ scripts: - name: config filename: config.sh @@ -20,40 +34,66 @@ scripts: set -eu echo "Hello World!" -extraVolumes: [] - +# -- Labels to add to the pod. podLabels: {} + +# -- Annotations to add to the pod. podAnnotations: {} + +# -- If `true`, allow the pod access to the host process ID namespace. hostPID: false + +# -- Security context for the pod. +# @default -- See _values.yaml_ podSecurityContext: {} + +# -- (string) Priority class name for the pod. priorityClassName: + +# -- (int) Termination grace period for the pod in seconds. terminationGracePeriodSeconds: +# -- Extra volumes for the pod. +extraVolumes: [] + config: image: + # -- Image repository for the config container. repository: docker.io/alpine + # -- Image tag for the config container tag: latest + # -- Image pull policy for the config container. pullPolicy: IfNotPresent + # -- Security context for the config container. + # @default -- See _values.yaml_ securityContext: {} + # -- Environment variables for the config container. env: [] + # -- Command for the config container command: - sh - -c - /opt/config.sh + # -- Extra volume mounts for the config container. extraVolumeMounts: [] + # -- Resources for the config container. resources: {} pause: image: + # -- Image repository for the pause container. repository: registry.k8s.io/pause + # -- Image tag for the pause container tag: 3.9 + # -- Image pull policy for the pause container. pullPolicy: IfNotPresent + # -- Resources for the pause container. resources: requests: cpu: 10m @@ -62,10 +102,13 @@ pause: cpu: 100m memory: 8Mi +# -- Node selector labels for scheduling. nodeSelector: kubernetes.io/os: linux affinity: + # -- Node affinity for scheduling. nodeAffinity: {} +# -- Node taints that will be tolerated for scheduling. tolerations: []