-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Helm: generate jwt-secret on installation only #57415
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
base: main
Are you sure you want to change the base?
Helm: generate jwt-secret on installation only #57415
Conversation
0f4b8f7 to
2574363
Compare
2574363 to
ee54ff8
Compare
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
| "helm.sh/hook": "pre-install" | ||
| "helm.sh/hook-delete-policy": "before-hook-creation" | ||
| "helm.sh/hook-weight": "0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some time I think that we could go with the Helm lookup function to determine if it exists or not
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't recall exactly why, but I have in my mind that there is some funkiness with helm lookup that makes it not great for our needs. But maybe in some of these cases, it's better than nothing?
jedcunningham
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was done this way in #51799 so updates from Airflow 2 to Airflow 3 work. And it's best practice to set this explicitly which avoids the problem completely.
|
These checksums don't force restarts? |
I was using 1.18.0 helm chart, it was not there yet from what i can see, but even if it is restarted:
|
What:
Use a pre-install Helm hook to generate the jwt-secret only once during installation, instead of regenerating it on each upgrade.
Why:
Currently, the jwt-secret is regenerated on every Helm upgrade. This can lead to inconsistent JWT secrets across Airflow components and result in authentication or communication failures.
Related discussion: #54178
Problem Scenarios
Multiple Airflow API Server Replicas
Scheduler and Worker Using Different JWT Secrets
Result: Tasks fail with InvalidSignatureError: Signature verification failed.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in airflow-core/newsfragments.