googleforgames / googleforgames/open-match
Helm Chart - allow to use user-provided secret for Redis auth if not using Bitnami Redis chart
- Dominant language
- Go
- Stars
- 3.4k
- Forks
- 359
- PR merge metrics
- No merged PRs in 30d
Description
**Is your feature request related to a problem? Please describe.**
I'd like to be able to use our own secret for Redis authentication when using BYO Redis with the OpenMatch Helm Chart. If I set my values.yaml to the following:
```
open-match-core:
redis:
enabled: false # Disable the bitnami redis chart.
hostname: master.my-redis.use1.cache.amazonaws.com
port: 6379
user: default
redis:
auth:
enabled: true
secretMountPath: /app/secrets # This will mount a secret named `redis-password` from the namespace. The OM chart will automatically add `redis-password` to this path.
```
Helm will fail to template or install the helm chart with the following error:
```
Error: INSTALLATION FAILED: template: open-match/templates/synchronizer.yaml:71:12: executing "open-match/templates/synchronizer.yaml" at : error calling include: template: open-match/templates/_helpers.tpl:115:19: executing "openmatch.volumes.withredis" at : error calling include: template: open-match/templates/_helpers.tpl:239:4: executing "call-nested" at : error calling include: template: no template "common.names.fullname" associated with template "gotpl"
```
As it tries to `call-nested` `common.names.fullname` from the `redis` sub-chart, this is present in this line: https://github.com/googleforgames/open-match/blob/dbda6c8dc16967d59af61e7ca4d4bd0e28bf330d/install/helm/open-match/templates/_helpers.tpl#L115
**Describe the solution you'd like**
Ideally I'd be able to provide the name of my own secret, or at least have it default to something that doesn't necessarily requires the `redis` subchart to be deployed. It should be possible to pass a `Values.redis.secretName`, and only if that's not provided, attempt to retrieve the name from the subchart.
Contributor guide
Research direction
Start in install/helm/open-match/templates/_helpers.tpl around the call to call-nested and inspect its use from templates/synchronizer.yaml. Reproduce the Helm templating failure with Bitnami Redis disabled and the provided values. Done means a user-provided redis.secretName can be used for BYO Redis, while the chart still derives the name from the subchart only when no name is provided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- helm, kubernetes
- Domain
- devops, infrastructure
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100