nats-box template - add env variables for credentials and certs
Hi, this is my very first issue, so i hope i'm doing this right. When using the nats-box, it would be great if the environment variables for credentials (NATS_CREDS) and the tls cert (NATS_CERT, NATS_KEY, and NATS_CA) would automatically be set. The template for the nats-box already sets an env variable for the credentials (USER_CREDS), but unfortunately it does not match the nats variable.
I would simply add/edit here:
env:
- name: NATS_URL
value: {{ template "nats.fullname" . }}
{{- if .Values.natsbox.credentials }}
- name: USER_CREDS
value: /etc/nats-config/creds/{{ .Values.natsbox.credentials.secret.key }}
- name: USER2_CREDS
value: /etc/nats-config/creds/{{ .Values.natsbox.credentials.secret.key }}
{{- end }}
As i think this would be an easy and quick fix i would offer to work on this.
Thanks @HenryTheMoose sounds good if you want to send a PR 👍
Supported in nats-1.0.0-beta.0 - although it does it by configuring the context instead of env vars