newrelic / helm-charts

Helm charts for New Relic applications
Apache License 2.0
95 stars 201 forks source link

[super-agent-deployment]: add authSecret configuration and validation #1393

Closed marcsanmi closed 2 weeks ago

marcsanmi commented 3 weeks ago

Is this a new chart

no

What this PR does / why we need it:

This PR introduces a new configuration option for managing authentication secrets within the Helm chart:

  1. authSecret Configuration: Added to the values.yaml, allowing users to specify and create an authentication secret.
  2. Helper Function: Ensures auth_key is provided when authSecret.create is true, preventing misconfigurations.
  3. Deployment Template Updates: Includes the new authSecret in the deployment, ensuring it is correctly mounted.
  4. Helm Unittest: Added test cases to validate the correct creation, mounting, and error handling of authSecret.

Please review the changes and let me know if any adjustments are needed

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

Special notes for your reviewer:

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]