Skip to content

Conversation

@Camila-B
Copy link
Contributor

No description provided.

@google-oss-prow
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from camila-b. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Camila-B
Copy link
Contributor Author

/test all

@Camila-B
Copy link
Contributor Author

/retest

1 similar comment
@Camila-B
Copy link
Contributor Author

/retest

@Camila-B
Copy link
Contributor Author

/retest

@Camila-B
Copy link
Contributor Author

/retest

@Camila-B
Copy link
Contributor Author

Camila-B commented Dec 5, 2025

/test all

@Camila-B Camila-B marked this pull request as ready for review December 5, 2025 21:14
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for token-based authentication for OCI sources in oci-sync. The changes are well-structured and comprehensive, spanning the oci-sync binary, reconciler controllers, API definitions, CRDs, and validation logic.

Key changes include:

  • Adding flUsername and flPassword flags to oci-sync to handle credentials.
  • Refactoring authenticator creation into a getAuthenticator function for better testability and clarity.
  • Updating RootSync and RepoSync CRDs and API types to include a token auth type and a secretRef for OCI sources.
  • Implementing logic in the reconciler-manager to securely pass credentials from the specified secret to the oci-sync container via environment variables.
  • Enhancing validation to ensure correct configuration of the new authentication mechanism.
  • Adding thorough unit tests for the new logic and comprehensive e2e tests for both Artifact Registry (_json_key) and generic basic auth scenarios.

The code is of high quality, and the changes are well-tested. I have no concerns with this pull request.

@Camila-B Camila-B changed the title [WIP]feat: Add support for token auth in oci-sync feat: Add support for token auth in oci-sync Dec 5, 2025
var flUsername = flag.String("username", util.EnvString("OCI_SYNC_USERNAME", ""),
"the username to use for oci authentication")
var flPassword = flag.String("password", util.EnvString("OCI_SYNC_PASSWORD", ""),
"the password or personal access token to use for oci authentication")
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the password needs nil check is username is set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants