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

[bitnami/airflow] Startup fails when nameOverride or fullnameOverride is specified for internal Redis #30000

Closed
LucasRakotomalala opened this issue Oct 19, 2024 · 3 comments · Fixed by #30081
Assignees
Labels
solved tech-issues The user has a technical issue about an application

Comments

@LucasRakotomalala
Copy link
Contributor

LucasRakotomalala commented Oct 19, 2024

Name and Version

bitnami/airflow at least since 18.x.x

What architecture are you using?

None

What steps will reproduce the bug?

  1. Setting either redis.nameOverride or redis.fullnameOverride to any custom non empty value
  2. Try deploying Bitnami Airflow
  3. See that Airflow is not running since it can not find Redis® master instance

Are you using any custom parameters or values?

# values.yaml
redis:
  enabled: true
  nameOverride: airflow-redis

Or:

--set=redis.enabled=true --set=redis.nameOverride=airflow-redis

What is the expected behavior?

The airflow.redis.fullname helper should search correctly in redis subchart: the chartName should be redis instead of redis-master.

What do you see instead?

By having redis-master in chartName, it results to have wrong REDIS_HOSTenvironment variable for all statefulsets when using internal Redis: https://github.com/bitnami/charts/blob/main/bitnami/airflow/templates/_helpers.tpl#L363-L364

Currently, we have REDIS_HOST rendered as {{ .Release.Name }}-airflow-redis instead of {{ .Release.Name }}-airflow-redis-master.

Note: {{ .Release.Name }} is correctly templated.

Additional information

Line impacted: https://github.com/bitnami/charts/blob/main/bitnami/airflow/templates/_helpers.tpl#L129

To me, it should use a printf to add -master at the end.
Examples:

@LucasRakotomalala LucasRakotomalala added the tech-issues The user has a technical issue about an application label Oct 19, 2024
@github-actions github-actions bot added the triage Triage is needed label Oct 19, 2024
@LucasRakotomalala LucasRakotomalala changed the title [bitnami/airflow] Installation fails if nameOverride or fullnameOverride is used for internal Redis [bitnami/airflow] Startup fails when nameOverride or fullnameOverride is specified for internal Redis Oct 25, 2024
@github-actions github-actions bot removed the triage Triage is needed label Oct 28, 2024
@github-actions github-actions bot assigned fmulero and unassigned carrodher Oct 28, 2024
@fmulero
Copy link
Collaborator

fmulero commented Oct 29, 2024

Thanks a lot @LucasRakotomalala! I appreciate a lot this detailed explanation, you almost fix the issue.

The key here is the name of the main service exposed by the redis chart. As you spotted, redis clients should use the host {{.Release.name}}-master.

I've just created the PR #30117 to amend the service name. Please take it a glance.

@LucasRakotomalala
Copy link
Contributor Author

Hello @fmulero,
Thank you for your PR #30117, it looks good to me.


What I did in the PR #30081 is also fixing issue #30087.
Also, I introduced a new helper airflow.redis.host, to be able to reuse airflow.redis.fullname if needed later on.
I also made a fix for PostgreSQL host. Do I need to create a ticket for that?

@fmulero
Copy link
Collaborator

fmulero commented Oct 30, 2024

Oh! I didn't see it, my failure. I'll close my PR in favor of yours

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved tech-issues The user has a technical issue about an application
Projects
None yet
3 participants