Skip to content

CORS-4516: Support setting universe domain in client options - #131

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
patrickdillon:gcd-auth
Aug 3, 2026
Merged

CORS-4516: Support setting universe domain in client options#131
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
patrickdillon:gcd-auth

Conversation

@patrickdillon

@patrickdillon patrickdillon commented Jul 21, 2026

Copy link
Copy Markdown

Upstream pull request kubernetes#1250 & kubernetes#1261

See that description and openshift/enhancements#1977 for more details

This includes a change in the default credentials, so we would actually start using the mounted credentials. Those credentials are inadequate, so I would expect e2e-gcp to fail without openshift/cluster-cloud-controller-manager-operator#493

UPDATE: Originally this PR included upstream 1261, but since that PR has not merged, it is removed from here

Summary by CodeRabbit

  • New Features

    • Improved Google Cloud authentication support, including alternative credential formats and default credential discovery.
    • Added support for configuring Google Cloud services across additional environments.
  • Bug Fixes

    • Improved handling of missing or special token URL configurations.
    • Updated Google Cloud service connections to use consistent authentication settings.
  • Chores

    • Refreshed Google Cloud, authentication, telemetry, and protobuf-related dependencies.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 21, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 21, 2026

Copy link
Copy Markdown

@patrickdillon: This pull request references CORS-4516 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Upstream pull request kubernetes#1250 & kubernetes#1261

See those descriptions and openshift/enhancements#1977 for more details

This includes a change in the default credentials, so we would actually start using the mounted credentials. Those credentials are inadequate, so I would expect e2e-gcp to fail without openshift/cluster-cloud-controller-manager-operator#493

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Walkthrough

GCE cloud configuration now defers token source selection and centralizes Google client option creation. Default credentials can be discovered and configured from credential JSON, while Compute and Container clients reuse the resulting options. Related dependency versions and tests were updated.

Changes

GCE authentication client options

Layer / File(s) Summary
Credential discovery and token configuration
go.mod, providers/gce/gce.go, providers/gce/gce_test.go
Dependency versions are refreshed, token URL handling no longer assigns a default token source, and clientOptions configures explicit or discovered credentials, credential types, and universe domains. Tests update the generated cloud configuration expectations.
Shared service client options
providers/gce/gce.go
Compute, Compute Alpha, Compute Beta, and Container service clients are created with the shared options from clientOptions.

Estimated code review effort: 3 (Moderate) | ~20 minutes


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (1 error)

Check name Status Explanation Resolution
No-Sensitive-Data-In-Logs ❌ Error New auth/vendor debug logs dump request/response bodies and headers via internallog, and one path logs the raw self-signed JWT token. Remove or redact token-bearing debug logs; keep only non-sensitive metadata/status and never log headers, bodies, JWTs, or auth assertions.
✅ Passed checks (14 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed PASS: the commit changes no *_test.go files, so there are no new or modified test titles to violate determinism.
Test Structure And Quality ✅ Passed PASS: The only changed test file is a table-driven unit test, not Ginkgo; no cluster ops, waits, or cleanup issues are introduced.
Microshift Test Compatibility ✅ Passed Commit diff is vendor-only; no new non-vendor Ginkgo e2e tests or MicroShift-unsafe APIs were added.
Single Node Openshift (Sno) Test Compatibility ✅ Passed Only unit tests and provider/auth code changed; no Ginkgo e2e tests or SNO-sensitive node-assumption patterns were added.
Topology-Aware Scheduling Compatibility ✅ Passed PR only changes GCE auth/dependency code; no manifests, controllers, or pod scheduling constraints were added, and no topology-sensitive selectors/affinity appear.
Ote Binary Stdout Contract ✅ Passed No stdout writes were added in init/main/suite setup; the changed GCE code only logs via klog in non-process paths and init just registers the provider.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed No new Ginkgo e2e tests were added; the commit only updates vendored deps and unit tests, so there are no new IPv4 or public-internet assumptions to flag.
No-Weak-Crypto ✅ Passed No added diff lines use weak-crypto APIs/imports; GCE changes only adjust auth/credential handling.
Container-Privileges ✅ Passed No changed container manifests; diff only touches Go/vendor files and adds no privileged/hostPID/hostNetwork/hostIPC/allowPrivilegeEscalation settings.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies support for setting a universe domain, which is the primary change in the pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from RadekManak and damdo July 21, 2026 19:49
@openshift-ci

openshift-ci Bot commented Jul 21, 2026

Copy link
Copy Markdown

@patrickdillon, testwith: could not generate prow job. ERROR:

no ref for requested test included in command. The org, repo, and branch containing the requested test need to be targeted by at least one of the included PRs

1 similar comment
@patrickdillon

Copy link
Copy Markdown
Author

attempting more targeted multi-pr run here: openshift/cloud-credential-operator#1068 (comment)

2 similar comments
@patrickdillon

Copy link
Copy Markdown
Author

/retest

As this changes the default credentials to use those mounted in the pod, and the current credsrequests are inadequate without openshift/cluster-cloud-controller-manager-operator#493, we should expect e2e-gcp to fail

@openshift-ci

openshift-ci Bot commented Jul 23, 2026

Copy link
Copy Markdown

@patrickdillon: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/regression-clusterinfra-gcp-ipi-ccm 45e4784 link false /test regression-clusterinfra-gcp-ipi-ccm

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@patrickdillon

Copy link
Copy Markdown
Author

The earlier multi-pr testwith run verifies the behavior works correctly. Master nodes joined the cluster. the cluster was unable to pull the capi-controllers image.

/testwith openshift/installer/main/e2e-gcd-ovn-private-techpreview openshift/gcp-pd-csi-driver#126 openshift/cluster-image-registry-operator#1356 openshift/machine-api-operator#1523 openshift/cluster-ingress-operator#1515 openshift/cloud-network-config-controller#249 openshift/machine-api-provider-gcp#180 openshift/image-registry#474 openshift/cloud-credential-operator#1068 openshift/cluster-cloud-controller-manager-operator#493 openshift/installer#10706

1 similar comment
@patrickdillon

Copy link
Copy Markdown
Author

hm, it seems that if you repeatedly run /testwith commands that you may lose the history. I wanted to check the details of the most recent run, not the active run, and I can't find it

@patrickdillon

Copy link
Copy Markdown
Author

Install succeeded on GCD!

@patrickdillon

Copy link
Copy Markdown
Author

And now for vanilla gcp, this PR changes the default so our mounted credentials will actually get used, and the credentialsrequest for GCP does not have the required permissions, so let's test it together with the permissions added in openshift/cluster-cloud-controller-manager-operator#493

/testwith openshift/cluster-cloud-controller-manager-operator/main/e2e-gcp-ovn openshift/cluster-cloud-controller-manager-operator#493

2 similar comments
6 similar comments
Adds support for non-standard universe domains, such as Google
Cloud Dedicated's sovereign clouds. Custom token sources specified
in the cloud config are still preferred to maintain consistent
behavior. Otherwise, FindDefaultCredentials will discover creds
based on the priority defined in the SDK. The WithCredentialsJSON
function is preferred as it uses a self-signed JWT--not oauth token
exchange, which may fail with custom universe domains.
@patrickdillon

Copy link
Copy Markdown
Author

Rebased and dropped the upstream kubernetes#1261 part from this PR, as that PR is still open and this is the critical functionality. We can set the cloud provider to use the JSON creds through the cloud config

@patrickdillon

Copy link
Copy Markdown
Author

/retest

@tthvo tthvo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jul 30, 2026
@patrickdillon

Copy link
Copy Markdown
Author

/verified by e2e and multi-pr test

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Jul 31, 2026
@openshift-ci-robot

Copy link
Copy Markdown

@patrickdillon: This PR has been marked as verified by e2e and multi-pr test.

Details

In response to this:

/verified by e2e and multi-pr test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot

openshift-ci-robot commented Aug 3, 2026

Copy link
Copy Markdown

@patrickdillon: This pull request references CORS-4516 which is a valid jira issue.

Details

In response to this:

Upstream pull request kubernetes#1250 & kubernetes#1261

See those descriptions and openshift/enhancements#1977 for more details

This includes a change in the default credentials, so we would actually start using the mounted credentials. Those credentials are inadequate, so I would expect e2e-gcp to fail without openshift/cluster-cloud-controller-manager-operator#493

Summary by CodeRabbit

  • New Features

  • Improved Google Cloud authentication support, including alternative credential formats and default credential discovery.

  • Added support for configuring Google Cloud services across additional environments.

  • Bug Fixes

  • Improved handling of missing or special token URL configurations.

  • Updated Google Cloud service connections to use consistent authentication settings.

  • Chores

  • Refreshed Google Cloud, authentication, telemetry, and protobuf-related dependencies.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@theobarberbany

Copy link
Copy Markdown

/lgtm
/approve

@openshift-ci

openshift-ci Bot commented Aug 3, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: theobarberbany

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

The pull request process is described here

Details 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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 3, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 51c3264 into openshift:main Aug 3, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants