From 8e766046a52be68ef4dd5a3f4e1a40590a6c91b3 Mon Sep 17 00:00:00 2001 From: Meno Abels Date: Wed, 8 Jun 2022 12:40:33 +0200 Subject: [PATCH] [Mabels] New chart for zerotier network --- charts/incubator/zerotier/.helmignore | 26 ++++ charts/incubator/zerotier/Chart.yaml | 27 ++++ charts/incubator/zerotier/README.md | 118 ++++++++++++++++++ .../zerotier/README_CONFIG.md.gotmpl | 12 ++ charts/incubator/zerotier/templates/NOTES.txt | 2 + .../incubator/zerotier/templates/common.yaml | 5 + charts/incubator/zerotier/values.yaml | 101 +++++++++++++++ 7 files changed, 291 insertions(+) create mode 100644 charts/incubator/zerotier/.helmignore create mode 100644 charts/incubator/zerotier/Chart.yaml create mode 100644 charts/incubator/zerotier/README.md create mode 100644 charts/incubator/zerotier/README_CONFIG.md.gotmpl create mode 100644 charts/incubator/zerotier/templates/NOTES.txt create mode 100644 charts/incubator/zerotier/templates/common.yaml create mode 100644 charts/incubator/zerotier/values.yaml diff --git a/charts/incubator/zerotier/.helmignore b/charts/incubator/zerotier/.helmignore new file mode 100644 index 00000000..4379e2b3 --- /dev/null +++ b/charts/incubator/zerotier/.helmignore @@ -0,0 +1,26 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ +# OWNERS file for Kubernetes +OWNERS +# helm-docs templates +*.gotmpl diff --git a/charts/incubator/zerotier/Chart.yaml b/charts/incubator/zerotier/Chart.yaml new file mode 100644 index 00000000..7e4db0c7 --- /dev/null +++ b/charts/incubator/zerotier/Chart.yaml @@ -0,0 +1,27 @@ +--- +apiVersion: v2 +appVersion: 1.8.10 +description: securely connected any device +name: zerotier +version: 1.8.10 +kubeVersion: ">=1.16.0-0" +keywords: + - vpn + - privacy + - security + - zerotier +sources: + - https://github.com/k8s-at-home/container-images + - https://github.com/k8s-at-home/charts +icon: https://www.zerotier.com/wp-content/uploads/2020/08/cropped-ZeroTierIcon-192x192-1.png +maintainers: + - name: fastandfearless + email: meno.abels@adviser.com +dependencies: + - name: common + version: 4.4.2 + repository: https://library-charts.k8s-at-home.com +annotations: + artifacthub.io/changes: |- + - kind: changed + description: Upgraded `common` chart dependency to version 4.4.2 diff --git a/charts/incubator/zerotier/README.md b/charts/incubator/zerotier/README.md new file mode 100644 index 00000000..0bf0f552 --- /dev/null +++ b/charts/incubator/zerotier/README.md @@ -0,0 +1,118 @@ +# zerotier + +![Version: 1.8.10](https://img.shields.io/badge/Version-1.8.10-informational?style=flat-square) ![AppVersion: 1.8.10](https://img.shields.io/badge/AppVersion-1.8.10-informational?style=flat-square) + +securely connected any device + +**This chart is not maintained by the upstream project and any issues with the chart should be raised [here](https://github.com/k8s-at-home/charts/issues/new/choose)** + +## Source Code + +* + +## Requirements + +Kubernetes: `>=1.16.0-0` + +## Dependencies + +| Repository | Name | Version | +|------------|------|---------| +| https://library-charts.k8s-at-home.com | common | 4.4.2 | + +## TL;DR + +```console +helm repo add k8s-at-home https://k8s-at-home.com/charts/ +helm repo update +helm install zerotier k8s-at-home/zerotier --set +'args={ZeroTierNetworkId}' --set 'image.tag=1.8.10-[arm64|amd64]' +``` + +## Installing the Chart + +To install the chart with the release name `zerotier` + +```console +helm install zerotier k8s-at-home/zerotier +``` + +## Uninstalling the Chart + +To uninstall the `zerotier` deployment + +```console +helm uninstall zerotier +``` + +The command removes all the Kubernetes components associated with the chart **including persistent volumes** and deletes the release. + +## Configuration + +Read through the [values.yaml](./values.yaml) file. It has several commented out suggested values. +Other values may be used from the [values.yaml](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml) from the [common library](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common). + +Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. + +```console +helm install zerotier \ + --set env.TZ="America/New York" \ + k8s-at-home/zerotier +``` + +Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. + +```console +helm install zerotier k8s-at-home/zerotier -f values.yaml +``` + +## Custom configuration + +You need to set the ZeroTier network ID --set 'args={NetworkId}'. +Be aware the hostNetwork is set to true by default. +And if you want the configure somewhere set persistence.config.hostPath.path=... +Don't forget to set the image.tag=1.8.10-[arm64|amd64] + + +```console + +## Values + +**Important**: When deploying an application Helm chart you can add more values from our common library chart [here](https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common) + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| args | array | [] | ZeroTier network ID | +| hostNetwork | bool | `true` | ZeroTier should join the Hosts Network | +| persistence.config.hostPath | string | `/var/lib/zerotier-one` | path to zerotier configuration | +| image.tag | string | `latest` | latest-[arch] | + +## Changelog + +### Version 1.3.3 + +#### Added + +N/A + +#### Changed + +* Upgraded `common` chart dependency to version 4.4.2 + +#### Fixed + +N/A + +### Older versions + +A historical overview of changes can be found on [ArtifactHUB](https://artifacthub.io/packages/helm/k8s-at-home/wireguard?modal=changelog) + +## Support + +- See the [Docs](https://docs.k8s-at-home.com/our-helm-charts/getting-started/) +- Open an [issue](https://github.com/k8s-at-home/charts/issues/new/choose) +- Ask a [question](https://github.com/k8s-at-home/organization/discussions) +- Join our [Discord](https://discord.gg/sTMX7Vh) community + +---------------------------------------------- +Autogenerated from chart metadata using [helm-docs v0.1.1](https://github.com/k8s-at-home/helm-docs/releases/v0.1.1) diff --git a/charts/incubator/zerotier/README_CONFIG.md.gotmpl b/charts/incubator/zerotier/README_CONFIG.md.gotmpl new file mode 100644 index 00000000..eead2101 --- /dev/null +++ b/charts/incubator/zerotier/README_CONFIG.md.gotmpl @@ -0,0 +1,12 @@ +{{- define "custom.custom.configuration.header" -}} +## Custom configuration +{{- end -}} + +{{- define "custom.custom.configuration" -}} +{{ template "custom.custom.configuration.header" . }} + +ZeroTier Network Id: {{ .args[0] }} +HostNetwork: {{ .hostNetwork }} +HostPath: {{ .persistence.config.hostPath }} + +{{- end -}} diff --git a/charts/incubator/zerotier/templates/NOTES.txt b/charts/incubator/zerotier/templates/NOTES.txt new file mode 100644 index 00000000..c7804945 --- /dev/null +++ b/charts/incubator/zerotier/templates/NOTES.txt @@ -0,0 +1,2 @@ +{{- include "common.notes.defaultNotes" . -}} + diff --git a/charts/incubator/zerotier/templates/common.yaml b/charts/incubator/zerotier/templates/common.yaml new file mode 100644 index 00000000..64e027ac --- /dev/null +++ b/charts/incubator/zerotier/templates/common.yaml @@ -0,0 +1,5 @@ +{{/* Make sure all variables are set properly */}} +{{- include "common.values.setup" . }} + +{{/* Render the templates */}} +{{ include "common.all" . }} diff --git a/charts/incubator/zerotier/values.yaml b/charts/incubator/zerotier/values.yaml new file mode 100644 index 00000000..8ff84698 --- /dev/null +++ b/charts/incubator/zerotier/values.yaml @@ -0,0 +1,101 @@ +# +# IMPORTANT NOTE +# +# This chart inherits from our common library chart. You can check the default values/options here: +# https://github.com/k8s-at-home/library-charts/tree/main/charts/stable/common/values.yaml +# + +image: + # -- image repository + repository: zerotier/zerotier + # -- image tag + # currently there is no zerotier manifest which + # allow to have a arch generic tag + tag: 1.8.10-arm64 + # -- image pull policy + pullPolicy: IfNotPresent +args: + # the only arg which need's to be parse is the network id + # which you want to join + - "ZeroTierNetworkId" + +hostNetwork: true + +# @default -- See below +env: + # -- Set the container timezone + TZ: UTC + # + # ZEROTIER_API_SECRET: replaces the authtoken.secret before booting and allows you to manage the control socket's authentication key. + # ZEROTIER_IDENTITY_PUBLIC: the identity.public file for zerotier-one. Use zerotier-idtool to generate one of these for you. + # ZEROTIER_IDENTITY_SECRET: the identity.secret file for zerotier-one. Use zerotier-idtool to generate one of these for you. + + +# -- Configures service settings for the chart. +# @default -- See values.yaml +service: + main: + enabled: false + ports: + vpnudp: + enabled: true + port: 9993 + protocol: UDP + vpntcp: + enabled: true + port: 9993 + protocol: TCP + +ingress: + # -- Enable and configure ingress settings for the chart under this key. + # @default -- See values.yaml + main: + enabled: false + +# -- Configure persistence settings for the chart under this key. +# @default -- See values.yaml +persistence: + # You need for every pod a hostPath to store the + # hostKey and the configuration parameters + config: + enabled: true + type: hostPath + mountPath: /var/lib/zerotier-one + hostPath: /mam-wl-m1/zerotier + tun: + enabled: true + type: hostPath + mountPath: /dev/net/tun + hostPath: /dev/net/tun + + +# -- Security contexts required for container. +# @default -- see values.yaml +securityContext: + capabilities: + add: + - NET_ADMIN + - SYS_MODULE + +# -- Configures the probes for the main Pod. +# @default -- See values.yaml +probes: + liveness: + enabled: false + # won't work without a API-Key + # zerotier returns without at anytime 40x + #spec: + # failureThreshold: 3 + # httpGet: + # path: / + # port: 9993 + # scheme: HTTP + # initialDelaySeconds: 10 + # periodSeconds: 10 + # successThreshold: 1 + # timeoutSeconds: 2 + readiness: + enabled: false + startup: + enabled: false +