diff --git a/charts/stable/generic-device-plugin/.helmignore b/charts/stable/generic-device-plugin/.helmignore new file mode 100644 index 00000000000..feb7464da6f --- /dev/null +++ b/charts/stable/generic-device-plugin/.helmignore @@ -0,0 +1,32 @@ +# 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 +# docs folder +/docs +# icon +icon.png +icon.webp +icon-small.webp diff --git a/charts/stable/generic-device-plugin/Chart.yaml b/charts/stable/generic-device-plugin/Chart.yaml new file mode 100644 index 00000000000..1956acc5b1d --- /dev/null +++ b/charts/stable/generic-device-plugin/Chart.yaml @@ -0,0 +1,37 @@ +annotations: + max_scale_version: 24.04.1 + min_scale_version: 24.04.0 + truecharts.org/category: media + truecharts.org/max_helm_version: "3.15" + truecharts.org/min_helm_version: "3.11" + truecharts.org/train: stable +apiVersion: v2 +appVersion: latest +dependencies: + - name: common + version: 25.1.5 + repository: oci://tccr.io/truecharts + condition: "" + alias: "" + tags: [] + import-values: [] +deprecated: false +description: Device Plugin to expose tun-device on talos +home: https://truecharts.org/charts/stable/generic-device-plugin +icon: https://truecharts.org/img/hotlink-ok/chart-icons/generic-device-plugin.webp +keywords: + - jackett + - torrent + - usenet +kubeVersion: '>=1.24.0-0' +maintainers: + - name: TrueCharts + email: info@truecharts.org + url: https://truecharts.org +name: generic-device-plugin +sources: + - https://ghcr.io/squat/generic-device-plugin + - https://github.com/squat/generic-device-plugin + - https://github.com/truecharts/charts/tree/master/charts/stable/generic-device-plugin +type: application +version: 1.0.0 diff --git a/charts/stable/generic-device-plugin/README.md b/charts/stable/generic-device-plugin/README.md new file mode 100644 index 00000000000..2b8cc49d247 --- /dev/null +++ b/charts/stable/generic-device-plugin/README.md @@ -0,0 +1,3 @@ +--- +title: README +--- diff --git a/charts/stable/generic-device-plugin/docs/setup.md b/charts/stable/generic-device-plugin/docs/setup.md new file mode 100644 index 00000000000..7fd1431e21e --- /dev/null +++ b/charts/stable/generic-device-plugin/docs/setup.md @@ -0,0 +1,37 @@ +--- +title: Setup +--- + +This chart requires a privileged namespace. + +After adding this chart you can add your tun device to charts like this: + +```yaml +resources: + limits: + kernel.org/tun: 1 +``` + +For addons like our gluetun addon you can add it like this if you are using fluxcd: + +```yaml +apiVersion: helm.toolkit.fluxcd.io/v2 +kind: HelmRelease +metadata: + name: chart + namespace: namespace +spec: + postRenderers: + - kustomize: + patches: + - target: + version: v1 + kind: Deployment + name: qbittorrent + patch: | + - op: add + path: /spec/template/spec/containers/1/resources/limits/truecharts.org~1tun + value: 1 + interval: 5m + chart: +``` diff --git a/charts/stable/generic-device-plugin/icon.png b/charts/stable/generic-device-plugin/icon.png new file mode 100644 index 00000000000..c7e5593841b Binary files /dev/null and b/charts/stable/generic-device-plugin/icon.png differ diff --git a/charts/stable/generic-device-plugin/templates/NOTES.txt b/charts/stable/generic-device-plugin/templates/NOTES.txt new file mode 100644 index 00000000000..efcb74cb772 --- /dev/null +++ b/charts/stable/generic-device-plugin/templates/NOTES.txt @@ -0,0 +1 @@ +{{- include "tc.v1.common.lib.chart.notes" $ -}} diff --git a/charts/stable/generic-device-plugin/templates/common.yaml b/charts/stable/generic-device-plugin/templates/common.yaml new file mode 100644 index 00000000000..b51394e00a4 --- /dev/null +++ b/charts/stable/generic-device-plugin/templates/common.yaml @@ -0,0 +1 @@ +{{ include "tc.v1.common.loader.all" . }} diff --git a/charts/stable/generic-device-plugin/values.yaml b/charts/stable/generic-device-plugin/values.yaml new file mode 100644 index 00000000000..c38ba485ec8 --- /dev/null +++ b/charts/stable/generic-device-plugin/values.yaml @@ -0,0 +1,46 @@ +image: + repository: ghcr.io/squat/generic-device-plugin + pullPolicy: IfNotPresent + tag: latest@sha256:ba6f0b4cf6c858d6ad29ba4d32e4da11638abbc7d96436bf04f582a97b2b8821 +portal: + open: + enabled: false +workload: + main: + podSpec: + containers: + main: + args: + - --domain + - truecharts.org + - --device + - | + name: tun + groups: + - count: 1000 + paths: + - path: /dev/net/tun +securityContext: + container: + readOnlyRootFilesystem: true + privileged: true + runAsNonRoot: false + runAsGroup: 0 + runAsUser: 0 +persistence: + dev: + enabled: true + type: hostPath + hostPath: /dev + mountPath: /dev + device-plugin: + enabled: true + type: hostPath + hostPath: /var/lib/kubelet/device-plugins + mountPath: /var/lib/kubelet/device-plugins +service: + main: + ports: + main: + port: 8080 + protocol: tcp diff --git a/website/src/content/docs/guides/vpn-setup.md b/website/src/content/docs/guides/vpn-setup.md index 63d3d1edd8a..9f1ee8cefa3 100644 --- a/website/src/content/docs/guides/vpn-setup.md +++ b/website/src/content/docs/guides/vpn-setup.md @@ -213,20 +213,20 @@ In talos in order to use the tun interface for Gluetun a workaround is needed ot ### Step 1: Add the generic-device-plugin -you can find the steps [here](https://www.talos.dev/v1.8/kubernetes-guides/configuration/device-plugins/#deploying-the-device-plugin) +Install the generic-device-plugin from our helm chart repository. Make sure to make the namespace privileged. ### Step 2: Add this into your helm-release.yaml for your app -Here is an example snippet for qbittorrent +Here is an example snippet on how to add it: ```yaml apiVersion: helm.toolkit.fluxcd.io/v2 kind: HelmRelease metadata: - name: qbittorrent - namespace: qbittorrent + name: chart + namespace: namespace spec: - postRenderers: + postRenderers: - kustomize: patches: - target: @@ -235,6 +235,8 @@ spec: name: qbittorrent patch: | - op: add - path: /spec/template/spec/containers/1/resources/limits/squat.ai~1tun + path: /spec/template/spec/containers/1/resources/limits/truecharts.org~1tun value: 1 + interval: 5m + chart: ```