From 5b05d9854040f16bc89efc38ef986e3ae043ad13 Mon Sep 17 00:00:00 2001 From: Sebastian Plattner Date: Thu, 15 Jun 2023 14:18:18 +0200 Subject: [PATCH] user alternative basic-auth format when ingressclass is haproxy --- deploy/charts/webshell/Chart.yaml | 4 ++-- deploy/charts/webshell/templates/secret-basicauth.yaml | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy/charts/webshell/Chart.yaml b/deploy/charts/webshell/Chart.yaml index 31ca5ae..0ec03f2 100644 --- a/deploy/charts/webshell/Chart.yaml +++ b/deploy/charts/webshell/Chart.yaml @@ -2,5 +2,5 @@ apiVersion: v2 name: webshell description: A Helm chart to deploy a webshell environment type: application -version: 0.2.25 -appVersion: "0.2.25" +version: 0.3.0 +appVersion: "0.3.0" diff --git a/deploy/charts/webshell/templates/secret-basicauth.yaml b/deploy/charts/webshell/templates/secret-basicauth.yaml index a2d16b7..6a718fe 100644 --- a/deploy/charts/webshell/templates/secret-basicauth.yaml +++ b/deploy/charts/webshell/templates/secret-basicauth.yaml @@ -7,4 +7,8 @@ metadata: {{- include "webshell.labels" . | nindent 4 }} type: Opaque data: +{{ if .Values.ingress.className == "haproxy"}} + {{ .Values.user }}: {{ .Values.password | b64enc | quote }} +{{ else }} auth: {{ (htpasswd .Values.user .Values.password) | b64enc | quote }} +{{ end }} \ No newline at end of file