-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ccremer/helm-docs
Trying out helm-docs
- Loading branch information
Showing
5 changed files
with
107 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
HELM_DOCS_VERSION="0.11.1" | ||
|
||
# install helm-docs | ||
curl --silent --show-error --fail --location --output /tmp/helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz | ||
tar -xf /tmp/helm-docs.tar.gz helm-docs | ||
|
||
# validate docs | ||
./helm-docs | ||
git diff --exit-code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,52 @@ | ||
# Znapzend Chart | ||
|
||
[Znapzend](https://github.com/oetiker/znapzend) - zfs backup with remote capabilities and mbuffer integration. http://www.znapzend.org | ||
|
||
[Znapzend Exporter](https://github.com/ccremer/znapzend-exporter) - a Znapzend exporter for Prometheus | ||
|
||
## TL;DR; | ||
|
||
```console | ||
helm install ccremer/znapzend | ||
``` | ||
|
||
> **Important**: By default, znapzend runs as a privileged container in order to access ZFS. | ||
## Configuration | ||
|
||
The following table lists the configurable chart specific parameters. For default values consult `values.yaml`. | ||
|
||
| Parameter | Description | | ||
| --- | --- | | ||
| `host.zfsDevice` | Path of the ZFS device on the host (bind-mounted to container) | | ||
| `ssh.path` | Path where the SSH files are being mounted | | ||
| `ssh.config` | Specify the contents of the `ssh_config(5)` config file | | ||
| `ssh.identities` | List all private keys to access remote SSH server for znapzend targets | | ||
| `ssh.knownHosts` | List of known_hosts entries | | ||
| `ssh.knownHosts[].host` | Hostname of the known Host | | ||
| `ssh.knownHosts[].pubKey` | Public Key of the known Host (e.g. `ssh-rsa AA...`) | | ||
| `ssh.externalSecretName` | Specify the name of the existing secret with the private keys, makes `ssh.knownHosts`, `ssh.config` and `ssh.identities` ineffective | | ||
| `metrics.enabled` | If the znapzend-exporter should be enabled | | ||
| `metrics.jobs.register[]` | List of ZFS datasets that are expected in the metrics | | ||
| `metrics.env` | Additional environment Variables for znapzend-exporter | | ||
| `metrics.service.enabled` | Whether the metrics service is enabled for Prometheus scrapes | | ||
|
||
There are far more parameters, including common ones (`image.tag`, etc.) | ||
|
||
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. | ||
|
||
Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example, | ||
|
||
```console | ||
helm install --name my-release -f values.yaml ccremer/znapzend | ||
``` | ||
|
||
> **Tip**: You can use the default [values.yaml](values.yaml) | ||
## Testing | ||
|
||
### Template testing | ||
|
||
This chart uses some Go code to test the generated templates against the | ||
Kubernetes client API. With this we are more flexible than `helm lint`, as | ||
linting would not catch errors such as: "If we are in clustered mode, we expect | ||
an init container, otherwise not". The test code would also catch typos in a | ||
limited manner (e.g. if `initContainer` is spelled `initcontainer`, it will | ||
generate an error). | ||
|
||
```console | ||
cd znapzend | ||
helm dep build | ||
cd test | ||
go test ./... | ||
``` | ||
znapzend | ||
======== | ||
Znapzend Helm Chart for automated ZFS snapshot & replication | ||
|
||
Current chart version is `0.3.2` | ||
|
||
|
||
|
||
|
||
|
||
## Chart Values | ||
|
||
| Key | Type | Default | Description | | ||
|-----|------|---------|-------------| | ||
| affinity | object | `{}` | | | ||
| env | object | `{}` | A dict with KEY: VALUE pairs | | ||
| fullnameOverride | string | `""` | | | ||
| host.zfsDevice | string | `"/dev/zfs"` | The device on the host which is used by the 'zfs' binary within the container | | ||
| image.pullPolicy | string | `"IfNotPresent"` | | | ||
| image.repository | string | `"docker.io/oetiker/znapzend"` | Znapzend image repository | | ||
| image.tag | string | `"master"` | Znapzend image tag (version) | | ||
| imagePullSecrets | list | `[]` | List of image pull secrets if you use a privately hosted image | | ||
| metrics.enabled | bool | `true` | Enable the znapzend metrics exporter for Prometheus | | ||
| metrics.env | object | `{}` | A dict with KEY: VALUE pairs as environment variables for the exporter | | ||
| metrics.image.pullPolicy | string | `"IfNotPresent"` | | | ||
| metrics.image.repository | string | `"docker.io/braindoctor/znapzend-exporter"` | Exporter image repository | | ||
| metrics.image.tag | string | `"v0.1.0"` | Exporter image tag | | ||
| metrics.ingress.annotations | object | `{}` | | | ||
| metrics.ingress.enabled | bool | `false` | Useful if your Prometheus is outside of the cluster | | ||
| metrics.ingress.hosts | list | `[{"host":null,"paths":[]}]` | See Kubernetes Docs for a guide to setup TLS on Ingress | | ||
| metrics.ingress.tls | list | `[]` | | | ||
| metrics.jobs.register | list | `[]` | String list of datasets that should be registered right at startup | | ||
| metrics.resources | object | `{}` | | | ||
| metrics.service.enabled | bool | `true` | Whether to enable a Service object for metrics endpoint if metrics.enabled is true | | ||
| metrics.service.nodePort | int | `0` | NodePort if service type is not ClusterIP | | ||
| metrics.service.port | int | `8080` | Port on which the service is reachable | | ||
| metrics.service.type | string | `"ClusterIP"` | | | ||
| nameOverride | string | `""` | | | ||
| nodeSelector | object | `{}` | | | ||
| podSecurityContext | object | `{}` | | | ||
| replicaCount | int | `1` | Only increase if you have multiple Nodes with AntiAffinity, otherwise it does not make sense to run > 1 replicas on the same node | | ||
| resources | object | `{}` | | | ||
| securityContext | object | `{"allowPrivilegeEscalation":true,"privileged":true}` | The current image requires to run privileged in order to access ZFS | | ||
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | | ||
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | | ||
| serviceAccount.name | string | `nil` | If not set and create is true, a name is generated using the fullname template | | ||
| ssh.config | string | `nil` | ssh_config(5)-compatible file content to configure SSH options when connecting | | ||
| ssh.externalSecretName | string | `nil` | Set this value if you provide your own secret with SSH config | | ||
| ssh.identities | object | `{}` | Provide a private key for each SSH identity, see values.yaml for an example | | ||
| ssh.knownHosts | string | `nil` | List of {host, pubKey} dicts where the public key of each host is configured | | ||
| ssh.path | string | `"/root/.ssh"` | Path where your SSH config and identities get mounted in the container | | ||
| tolerations | list | `[]` | | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters