nats-io / k8s

NATS on Kubernetes with Helm Charts
Apache License 2.0
446 stars 302 forks source link

Add optional Credentials to nats-kafka #845

Closed ChrisDizenzo1047 closed 9 months ago

ChrisDizenzo1047 commented 9 months ago

Description

The nats-kafka helm chart does not allow for passing in the UserCredential variable defined in the nats-kafka config here.

This PR allows for the creation of a credential volume, the credential as a secret to the credential volume, and adds the usercredential file-path using the secret key to the UserCredential field in the nats section of the nats-kafka config.

Testing

Tested the forked changes on our end and was able to use a secret to connect to a nats server with credentialed authentication.

ChrisDizenzo1047 commented 9 months ago

I was able to recently test these forked changes and was able to build the template and use it to authenticate with our local dev nats server using the same structure as the example in the readme

caleblloyd commented 9 months ago

Great! A couple more recommendations then we can merge:

  1. In the values.yaml can you add a commented out section showing how to use, similar to how nack does it

  2. Can you bump the patch version of the chart in Chart.yaml so it'll release a new version when the PR merges