-
Notifications
You must be signed in to change notification settings - Fork 407
Fix repository authentication when updating a helm_release with temporary credentials #1687
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?
Conversation
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
| var state HelmReleaseModel | ||
| diags := req.Plan.Get(ctx, &state) | ||
| var plan HelmReleaseModel | ||
| diags := req.Plan.Get(ctx, &plan) |
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 renamed this variable to plan for clarity, since it is using the plan model.
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.
Just wondering this is going to change the credentials to be used from the plan and removes it from the state? I assume this is the issue many people are having now where credentials are being saved in state and ephemeral tokens are timing out causing failures?
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.
The issue is actually at the bottom of the diff in the Update() function. It's getting the login credentials from the previously applied state, rather than using the currently fetched credentials.
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.
Ah I see it now, thank you for the clarification. Appreciate you submitting this!
|
I've built and tested this locally successfully. It resolved the problem I've been having with @jrhouston could you please review this and have it part of a patch release soon ? Thank you. |
|
Can this pls be prioritized 🙏. This been an issue for few months now and affecting meny people #1660. Everyone does manual delete/import as an workaround for helm modules on expired secrets. |
|
Hey, any updates here? |
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
No
Description
Repository login currently fails during updates when using temporary credentials because the credentials are being pulled from the state rather than from the current plan.
This PR changes
Update()to use the credentials from the plan model instead of the state model.Acceptance tests
Release Note
Release note for CHANGELOG:
References
Fixes #1660
Community Note