newrelic / k8s-agents-operator

Apache License 2.0
5 stars 4 forks source link

fix: Fix Helm chart template logic #6

Closed juanjjaramillo closed 4 months ago

juanjjaramillo commented 4 months ago

Description

While working in the creation of the Docker registry, I found an issue blocking the operator from being installed.

After triaging, I found the issue is that the Helm chart only works for the release name specified in the docs. This is a critical flaw, since the customer controls the release name, not us.

Specifically, changing the release name broke the logic for the creation and usage of the service account, which impacted all aspects of the chart: deployment of pods, cluster roles, RBAC rules. Additionally, the certificate hard-coded the secret name, while other entities used the templatized name.

The challenge for debugging the issue is that the Helm chart is a hack that used a template with unused variables that were not removed, masking the root cause and leading to multiple red herrings.

Type of change

Checklist: