From e8e34afecfc666852033f292a2560cfae47d6f0a Mon Sep 17 00:00:00 2001 From: Romain Pluciennik Date: Thu, 22 Aug 2024 19:23:48 +0200 Subject: [PATCH] feat(cloudflare): Changed cloudflared command when testing the Chart (#19) --- charts/cloudflare-tunnel/Chart.yaml | 6 +++--- charts/cloudflare-tunnel/README.md | 4 ++-- charts/cloudflare-tunnel/templates/common.yaml | 5 +++++ charts/cloudflare-tunnel/values.yaml | 2 ++ 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/charts/cloudflare-tunnel/Chart.yaml b/charts/cloudflare-tunnel/Chart.yaml index c03624a..6632230 100644 --- a/charts/cloudflare-tunnel/Chart.yaml +++ b/charts/cloudflare-tunnel/Chart.yaml @@ -4,7 +4,7 @@ description: Connect your resources to Cloudflare without a publicly routable IP home: https://github.com/plcnk/charts/tree/master/charts/cloudflare-tunnel icon: https://raw.githubusercontent.com/plcnk/charts/master/charts/cloudflare-tunnel/icon.svg type: application -version: 0.1.0 +version: 0.1.1 # renovate datasource=docker depName=cloudflare/cloudflared appVersion: "2024.8.2" kubeVersion: ">=1.22.0-0" @@ -21,8 +21,8 @@ sources: - https://github.com/cloudflare/cloudflared annotations: artifacthub.io/changes: |- - - kind: added - description: Initial release + - kind: changed + description: Changed cloudflared command when testing the Chart. artifacthub.io/links: |- - name: App Source url: https://github.com/cloudflare/cloudflared diff --git a/charts/cloudflare-tunnel/README.md b/charts/cloudflare-tunnel/README.md index 3e104f3..64ca6c3 100644 --- a/charts/cloudflare-tunnel/README.md +++ b/charts/cloudflare-tunnel/README.md @@ -102,8 +102,8 @@ helm install cloudflare-tunnel plcnk/cloudflare-tunnel -f values.yaml | controllers.main.type | string | `"deployment"` | Controller type | | logLevel | string | `"info"` | Set the container log level. Accepted values: `debug`, `info`, `warn`, `error`, `fatal` | | metrics | object | `{"enabled":false,"port":""}` | Enable Metrics Monitor under this key. | -| tunnel.existingSecret | object | `{"enabled":false,"key":"","name":""}` | You can set the token as an existing secret here. | -| tunnel.token | string | `"your-token-here"` | Set the Cloudflare Tunnel token here. | +| tunnel.existingSecret | object | `{"enabled":false,"key":"","name":""}` | You can set the token as an existing secret here. Cannot coexist with `tunnel.token` | +| tunnel.token | string | `"your-token-here"` | Set the Cloudflare Tunnel token here. Cannot coexist with `tunnel.existingSecret.enabled` set to `true`. | --- Autogenerated from chart metadata using [helm-docs](https://github.com/norwoodj/helm-docs) diff --git a/charts/cloudflare-tunnel/templates/common.yaml b/charts/cloudflare-tunnel/templates/common.yaml index edeae92..375a3e5 100644 --- a/charts/cloudflare-tunnel/templates/common.yaml +++ b/charts/cloudflare-tunnel/templates/common.yaml @@ -34,6 +34,7 @@ controllers: key: {{ .Values.tunnel.existingSecret.key }} {{- end }} args: + {{- if ne .Values.tunnel.token "your-token-here" }} - tunnel - --no-autoupdate {{- if .Values.logLevel }} @@ -47,6 +48,10 @@ controllers: - run - --token - $(TUNNEL_TOKEN) + {{- else }} + - --url + - localhost:8080 + {{- end }} {{- end -}} {{- $tmplVars := deepCopy . -}} diff --git a/charts/cloudflare-tunnel/values.yaml b/charts/cloudflare-tunnel/values.yaml index f5e47dc..d05a1ad 100644 --- a/charts/cloudflare-tunnel/values.yaml +++ b/charts/cloudflare-tunnel/values.yaml @@ -59,8 +59,10 @@ controllers: tunnel: # -- Set the Cloudflare Tunnel token here. + # Cannot coexist with `tunnel.existingSecret.enabled` set to `true`. token: "your-token-here" # -- You can set the token as an existing secret here. + # Cannot coexist with `tunnel.token` existingSecret: enabled: false name: ""