Skip to content

Migrate secrets handling to pkg/runtime/secrets #791

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

Merged

Conversation

cappyzawa
Copy link
Contributor

@cappyzawa cappyzawa commented Jul 5, 2025

Summary

Migrates TLS certificate and proxy configuration handling to pkg/runtime/secrets v0.63.0 for image-reflector-controller as part of fluxcd/flux2#5433.

  • Update pkg/runtime from v0.60.0 to v0.63.0
  • Migrate TLS configuration to secrets.TLSConfigFromSecret()
  • Migrate proxy configuration to secrets.ProxyURLFromSecret()
  • Migrate pull secrets to secrets.PullSecretsFromServiceAccount()
  • Remove custom TLS, proxy and pull secrets handling functions

Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great cleanup!! 👏 👏 👏

Copy link
Member

@matheuscscp matheuscscp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

I love PRs like this: +52 −711

@matheuscscp matheuscscp changed the title Migrate TLS and proxy handling to pkg/runtime/secrets Migrate secrets handling to pkg/runtime/secrets Jul 6, 2025
@matheuscscp
Copy link
Member

Please squash 🙏

@cappyzawa cappyzawa force-pushed the feat-runtime-secrets-migration-pr1 branch from 046a0a9 to 4469667 Compare July 6, 2025 10:43
Replace custom secret handling with pkg/runtime/secrets package:
- Remove entire internal/secret package
- Use secrets.TLSConfigFromSecret() for TLS certificates
- Use secrets.ProxyURLFromSecret() for proxy configuration
- Use secrets.PullSecretsFromServiceAccount() for ServiceAccount handling
- Consolidate all pull secrets into single k8schain flow
- Update tests to use pkg/runtime/secrets constants

Signed-off-by: cappyzawa <[email protected]>
@cappyzawa cappyzawa force-pushed the feat-runtime-secrets-migration-pr1 branch from 4469667 to 9e07a0f Compare July 6, 2025 11:31
@matheuscscp matheuscscp merged commit 8220a64 into fluxcd:main Jul 6, 2025
6 checks passed
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.

2 participants