- 
                Notifications
    You must be signed in to change notification settings 
- Fork 217
Migrate HelmRepository to runtime/secrets #1849
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
Migrate HelmRepository to runtime/secrets #1849
Conversation
4733f8f    to
    2d22893      
    Compare
  
    2d22893    to
    11522d2      
    Compare
  
    d8c26cc    to
    fd2a017      
    Compare
  
    …e/secrets migration Signed-off-by: cappyzawa <[email protected]>
866f087    to
    3cb0187      
    Compare
  
    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.
LGTM! 🚀
This is the best refactor I have reviewed so far in source-controller, and the most impressive part is that we are not breaking any APIs!
| hrOpts.Insecure = obj.Spec.Insecure | ||
| // Handle TLS certificate files for OCI | ||
| var tempCertDir string | ||
| if opts.TlsConfig != nil { | 
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 filed helm/helm#31075 and helm/helm#31076 so we can stop doing this crazy dance and start leveraging our shiny new secrets library ;)
This commit upgrades pkg/runtime to v0.73.0 and adopts the unified AuthMethodsFromSecret API for HelmRepository authentication handling. The change replaces complex manual authentication detection with a single API call and improves error handling consistency. Breaking Changes: - TLS certificate validation is now strictly enforced. Invalid CA certificates will cause authentication failures even for public repositories, where they were previously ignored. - Empty TLS certificate secrets now trigger validation errors instead of being silently ignored. This affects certSecretRef with empty Data map - previously ignored, now causes proper error. Signed-off-by: cappyzawa <[email protected]>
3cb0187    to
    9950f56      
    Compare
  
    | @matheuscscp Thanks a lot for your review and kind words! | 
This PR migrates HelmRepository authentication to use runtime/secrets API as part of fluxcd/flux2#5433.
Introduces pkg/runtime v0.66.0 and refactors HelmRepository authentication accordingly.
Breaking Changes (security improvement)