nats-io / k8s

NATS on Kubernetes with Helm Charts
Apache License 2.0
444 stars 300 forks source link

Modify the surveyor chart so that it can connect using the parameters --user --password #905

Open MilkyWay-core opened 2 months ago

MilkyWay-core commented 2 months ago

What motivated this proposal?

We using helm secrets and argoCD vault plugin. We need the ability to encrypt the password in the parameters separately from the entire string nats://login:pass@server:port doesn't work for us

What is the proposed change?

Change the chart

deployment.yaml

       args:
       {{- with .Values.config.basicCredentials }}
        - --user={{ .user }}
       {{- if .password }}
        - --password={{ .password }}
       {{- end }}
       {{- end }}

values.yaml

config:
  # Required if NATS basic auth is enabled
  # basicCredentials:
  #   user: admin
  #   password: password

Who benefits from this change?

The correct way to transfer credentials will avoid storing the password in clear text in the values.yaml

What alternatives have you evaluated?

-