You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you share what version of Helm you are using? Helm v2 uses Sprig v2 which goes not have the htpasswd function. Helm v3 uses Sprig v3 which does include that function.
Speaking as a Sprig maintainer, I would be willing to merge a backport of that function to Sprig v2 if someone wants to work on it.
% helm-2.16.1 template .
Error: parse error in "test/templates/NOTES.txt": template: test/templates/NOTES.txt:1: function "htpasswd" not defined
% helm-3.0.3 template .
Error: parse error at (test/templates/NOTES.txt:1): function "htpasswd" not defined
I'd love to have htpasswd backported to v2, but it is probably worth pointing out that htpasswd doesn't appear to be available in helm v3 either
i got a ingress with basic auth on my K8S:
here is the yaml:
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: basic-auth
namespace: t
data:
auth: >-
{{ .Values.basicAuth.authString | b64enc }}
Activity
mattfarina commentedon Feb 6, 2020
Can you share what version of Helm you are using? Helm v2 uses Sprig v2 which goes not have the htpasswd function. Helm v3 uses Sprig v3 which does include that function.
Speaking as a Sprig maintainer, I would be willing to merge a backport of that function to Sprig v2 if someone wants to work on it.
alice-sawatzky commentedon Feb 7, 2020
So, I made a simple chart with a single template:
I'd love to have
htpasswdbackported to v2, but it is probably worth pointing out thathtpasswddoesn't appear to be available in helm v3 eitherbacongobbler commentedon Feb 7, 2020
It looks like Masterminds/sprig#225 was merged only 2 weeks ago, so it's not yet in a sprig release.
Helm 3.0.3 currently relies on Sprig 3.0.2.
https://github.com/helm/helm/blob/v3.0.3/go.mod#L9
Once a new release of sprig is available, we can bump Helm to the latest version aand
htpasswdshould become available.alice-sawatzky commentedon Feb 11, 2020
i think this would be better labelled as a feature request, rather than question/support
mattfarina commentedon Feb 13, 2020
Oh, @technosophos merged that. Let's see about bringing this into Helm 3.2.0. I can make that happen.
technosophos commentedon Apr 14, 2020
Friendly reminder that 3.2 is right around the bend.
Updating sprig and semver to newer versions
nezed commentedon Apr 23, 2020
works since 3.2.0 🎉
Feat/oci dependencies (#1)
Updating sprig and semver to newer versions
bonpapajosie commentedon Sep 28, 2021
Hello everyone,
Can someone help me, pls?
i got a ingress with basic auth on my K8S:
here is the yaml:
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: basic-auth
namespace: t
data:
auth: >-
{{ .Values.basicAuth.authString | b64enc }}
value.yaml
basicAuth:
authString: |
htpwd1:b7NRGSot585DjHtXjlqusep
htpwd2:fpzefczfzz585DjHtXjlquver
But I want to do that with helm: like
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: basic-auth
namespace: t
data:
auth: >-
{{ htpasswd .Values.basicAuth.auth1.username .Values.basicAuth.auth1.password | b64enc | quote }}
{{ htpasswd .Values.basicAuth.auth2.username .Values.basicAuth.auth2.password | b64enc | quote }}
value.yaml
basicAuth:
auth1:
username
password
auth2:
username
password
Can someone help, please?
arthtux commentedon Feb 14, 2022
Hello @bonpapajosie
For use the multi user/password you can use this sample.
On your ingress annotation:
For the secret:
And for your values: