Browse Source

docs: document correct htpasswd function usage (#6177)

Co-authored-by: Gergely Bräutigam <gergely.brautigam@sap.com>
Leon Welchert 1 week ago
parent
commit
b5ad341483
2 changed files with 3 additions and 1 deletions
  1. 2 0
      docs/guides/templating.md
  2. 1 1
      docs/snippets/template-v2-literal-example.yaml

+ 2 - 0
docs/guides/templating.md

@@ -69,6 +69,8 @@ Suppose you have multiple key-value pairs within your provider secret like
 }
 ```
 
+You may either pass `bcrypt`, to use that hashing algorithm, or `sha`, to use the `SHA-1` hashing algorithm, as an argument. `bcrypt` is considered more secure, but some applications may not support it.
+
 ```yaml
 {% include 'template-v2-literal-example.yaml' %}
 ```

+ 1 - 1
docs/snippets/template-v2-literal-example.yaml

@@ -14,7 +14,7 @@ spec:
         literal: |-
           {{- $creds := list }}
           {{- range $user, $pw := . }}
-            {{- $creds = append $creds (printf "%s" (htpasswd $user $pw)) }}
+            {{- $creds = append $creds (printf "%s" (htpasswd $user $pw "bcrypt")) }}
           {{- end }}
           auth: {{ $creds | join "\n" | quote }}
   dataFrom: