From 24ebaabb966efc141ce8bba40b0d25c69592449d Mon Sep 17 00:00:00 2001 From: Artem Babii Date: Fri, 8 Mar 2024 00:46:11 +0200 Subject: [PATCH] Add eso support --- charts/cloudflare-tunnel-remote/Chart.yaml | 2 +- charts/cloudflare-tunnel-remote/templates/deployment.yaml | 2 +- charts/cloudflare-tunnel-remote/templates/secret.yaml | 2 ++ charts/cloudflare-tunnel-remote/values.yaml | 2 ++ 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/charts/cloudflare-tunnel-remote/Chart.yaml b/charts/cloudflare-tunnel-remote/Chart.yaml index c848041..751fb90 100644 --- a/charts/cloudflare-tunnel-remote/Chart.yaml +++ b/charts/cloudflare-tunnel-remote/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.2 +version: 0.1.3 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/cloudflare-tunnel-remote/templates/deployment.yaml b/charts/cloudflare-tunnel-remote/templates/deployment.yaml index d4e8a46..17e6f58 100644 --- a/charts/cloudflare-tunnel-remote/templates/deployment.yaml +++ b/charts/cloudflare-tunnel-remote/templates/deployment.yaml @@ -43,7 +43,7 @@ spec: - name: TUNNEL_TOKEN valueFrom: secretKeyRef: - name: {{ include "cloudflare-tunnel-remote.fullname" . }} + name: {{ .Values.cloudflare.secretName | default (include "cloudflare-tunnel-remote.fullname" .) }} key: tunnelToken livenessProbe: httpGet: diff --git a/charts/cloudflare-tunnel-remote/templates/secret.yaml b/charts/cloudflare-tunnel-remote/templates/secret.yaml index 709cce9..206fb31 100644 --- a/charts/cloudflare-tunnel-remote/templates/secret.yaml +++ b/charts/cloudflare-tunnel-remote/templates/secret.yaml @@ -1,5 +1,6 @@ # This credentials secret allows cloudflared to authenticate itself # to the Cloudflare infrastructure. +{{- if .Values.cloudflare.tunnel_token }} apiVersion: v1 kind: Secret metadata: @@ -8,3 +9,4 @@ metadata: {{- include "cloudflare-tunnel-remote.labels" . | nindent 4 }} stringData: tunnelToken: {{ .Values.cloudflare.tunnel_token }} +{{- end }} diff --git a/charts/cloudflare-tunnel-remote/values.yaml b/charts/cloudflare-tunnel-remote/values.yaml index 53c2b98..741a28f 100644 --- a/charts/cloudflare-tunnel-remote/values.yaml +++ b/charts/cloudflare-tunnel-remote/values.yaml @@ -3,6 +3,8 @@ # Cloudflare parameters. cloudflare: tunnel_token: "" + # If defined, no secret is created for the credentials, and instead, the secret referenced is used + secretName: "" image: repository: cloudflare/cloudflared