Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dependencies): add better support for fullnameOverride #189

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emaincourt
Copy link

@emaincourt emaincourt commented Sep 17, 2024

Hi,

As far as I can tell, dependencies of the chart currently do not properly support fullnameOverride.

Given the following values-local.yaml file, and helm install command helm install redash-euw3 . -f values.yaml -f values-local.yaml:

fullnameOverride: redash

redis:
  fullnameOverride: redash-redis

postgresql:
  fullnameOverride: redash-postgresql

The deployment environment variables will contain the wrong hosts for both redis and postgres:

REDASH_DATABASE_HOSTNAME:  redash-euw3-postgresql
REDASH_REDIS_HOSTNAME:     redash-euw3-redis-master

Since Helm 3.7 (released August 31, 2021) it's possible to invoke the subchart's named templates that we can use to match the service names. Those changes will not support postgres replication mode, nor redis sentinel, but I feel like those are not currently supported anyway.

Given the same values-local.yaml file, secret references will be wrong too. Templates are using the {{ include "redash.fullname" . }}- prefix which will not match any existing secret in case fullnameOverride is set for redash.

NAME                                     READY   STATUS                       RESTARTS   AGE
redash-567487fc4b-zzprc                  0/1     CreateContainerConfigError   0          2s
redash-adhocworker-6c587f47cb-fzd6h      0/1     CreateContainerConfigError   0          2s
redash-euw3-migrations-624js             0/1     CreateContainerConfigError   0          2s
redash-genericworker-648bddc87b-h5txc    0/1     CreateContainerConfigError   0          2s
redash-postgresql-0                      0/1     ContainerCreating            0          2s
redash-redis-master-0                    0/1     ContainerCreating            0          2s
redash-scheduledworker-cd959c959-b5q8s   0/1     CreateContainerConfigError   0          2s
redash-scheduler-7dcd4cbf46-2zjv6        0/1     CreateContainerConfigError   0          2s

The error will look like Warning Failed 4m28s (x12 over 6m38s) kubelet Error: secret "redash-euw3-postgresql" not found.

  • Use fullnameOverride for the migration job (hook)

Finally, the migration job hook uses the {{ .Release.Name }}- prefix as a name instead of {{ include "redash.fullname" . }}-.

Those changes do not address any open issue. It's just a problem I ran into. What do you think of those changes ?

Thanks in advance for reviewing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant