-
Notifications
You must be signed in to change notification settings - Fork 2
add htpasswd function for clusterbom to deploy yaml #12
Comments
Thanks @gowrisankar22 for creating this enhancement request. We will look into this and get back to you. |
I'm not sure if I understand your use case the right way. Could you perhaps add the clusterbom you want to deploy? htpasswd used in a template of a helm chart should be already supported. |
@achimweigel Yes, helm supports it but if I want to deploy plain yaml via clusterbom with htpasswd it won't work. apiVersion: v1
kind: Secret
metadata:
name: basicauth
type: Opaque
data:
REGISTRY_HTPASSWD: {{ htpasswd .Values.registry.credentials.username .Values.registry.credentials.password | b64enc | quote }}
clusterbom section:
--------
- id: basicauth
configType: kapp
typeSpecificData:
fetch:
- inline:
paths:
basicauth.yml: |
{{ generateTemplate $basicAuth . | indent 18 }}
template:
- ytt: {}
deploy:
- kapp:
intoNs: xxxx
|
Hello @gowrisankar22, can you give u please the name of the project and the name of the clusterbom? |
Currently, you are using |
@robertgraeff |
@gowrisankar22 we just use the kapp controller syntax here. You find the documentation for it here. We haven't tried this use case so far and do not know if this works. Your example from above looks quite strange. Is it really allowed to reference a secret this way in the kapp syntax?
|
What would you like to be added:
The htpasswd function takes a username and password and generates a bcrypt hash of the password. The result can be used for basic authentication on Prometheus, alert manager,thanos etc.
Why is this needed:
We are using potter to deploy helm/plain yaml based deployments etc. Right now we are doing some manual work to generate htpasswd for Prometheus, alert manager,thanos, etc to have basic auth via plain yamls. it would be great if you can enable this function via cluster bomb
helm already support htpasswd function. Reference from helm: https://helm.sh/docs/chart_template_guide/function_list/#htpasswd
The text was updated successfully, but these errors were encountered: