From 09ade9adb226bbfc0e0d98ec4f5475acb8471b74 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 85c403f..c848041 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.1 +version: 0.1.2 # 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 354b599..902494c 100644 --- a/charts/cloudflare-tunnel-remote/templates/deployment.yaml +++ b/charts/cloudflare-tunnel-remote/templates/deployment.yaml @@ -40,7 +40,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..93accf4 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 and (.Values.cloudflare.tunnel_token) (not .Values.cloudflare.secretName) }} 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 c2e1565..481af6d 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: null image: repository: cloudflare/cloudflared