Skip to content

Commit

Permalink
chore(node-config): Updated readme (#865)
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Hipwell <[email protected]>
  • Loading branch information
stevehipwell authored Jan 17, 2024
1 parent 60de06f commit fb735b6
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 52 deletions.
1 change: 0 additions & 1 deletion .helmdocsignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
confluence-server
jira-software
nexus3
node-config
overprovisioner
sonarqube
thanos
Expand Down
2 changes: 1 addition & 1 deletion charts/node-config/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
106 changes: 60 additions & 46 deletions charts/node-config/README.md
Original file line number Diff line number Diff line change
@@ -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:** <https://github.com/stevehipwell/helm-charts/>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| stevehipwell | <[email protected]> | |

## Source Code

* <https://github.com/stevehipwell/helm-charts/>

## 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/).
35 changes: 35 additions & 0 deletions charts/node-config/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -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/).
51 changes: 47 additions & 4 deletions charts/node-config/values.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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: []

0 comments on commit fb735b6

Please sign in to comment.