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

Need authentication to pull the flux-operator-manifests from a private OCI registry #139

Closed
ahothan opened this issue Jan 11, 2025 · 2 comments · Fixed by #145
Closed

Need authentication to pull the flux-operator-manifests from a private OCI registry #139

ahothan opened this issue Jan 11, 2025 · 2 comments · Fixed by #145
Labels
area/update-automation Flux update automation related issues and pull requests enhancement New feature or request

Comments

@ahothan
Copy link
Contributor

ahothan commented Jan 11, 2025

In the case flux-operator-manifests is stored in a private OCI repository, FluxInstance fails to retrieve the manifest and there is no way to provide the auth token in the latest flux-operator version (v0.13.0).
The imagePullSecret field is only used for flux controller images.

In our use case, we will use the same OCI auth token to pull the flux-operator-manifests and flux controller images as they are stored in the same OCI registry but this will likely require a different field to be more generic, e.g. add an extra field "manifestImagePullSecret" under distribution?

@stefanprodan
Copy link
Member

stefanprodan commented Jan 11, 2025

I propose we use .spec.distribution.manifestPullSecret.

For the implementation we could do the following:

  • import github.com/google/go-containerregistry/pkg/authn/k8schain
  • add an authn.Keychain arg to the builder.PullArtifact and to builder.GetArtifactDigest functions
  • if manifestPullSecret is specified, we create a keychain using k8schain.NewFromPullSecrets
  • inside builder.PullArtifact and builder.GetArtifactDigest we use crane.WithAuthFromKeychain

@ahothan let me know if you can contribute this feature and I'll assigned it to you. Thanks!

@stefanprodan stefanprodan added enhancement New feature or request area/update-automation Flux update automation related issues and pull requests labels Jan 11, 2025
@ahothan
Copy link
Contributor Author

ahothan commented Jan 13, 2025

@stefanprodan I should be able to get a PR shortly thanks for the implementation suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/update-automation Flux update automation related issues and pull requests enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants