Skip to content

Conversation

barbacbd
Copy link

@barbacbd barbacbd commented Aug 4, 2025

pkg/cmd/provisioning:

** Temporarily updated to pass nil for service endpoints. This is a placeholder while ccoctl does not support user supplied service endpoints.

pkg/gcp/actuator:

** Actuator will get the infrastructure object and pass the endpoints during client creation.

pkg/operator/secretannotator/gcp:

** Reconciler will get the infrastructure object and pass the endpoints during client creation.

pkg/gcp/client.go:

** Client will now accept endpoints when creating the service cleints (ex: compute).

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 4, 2025
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 4, 2025

@barbacbd: This pull request references CORS-4161 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 "4.20.0" version, but no target version was set.

In response to this:

pkg/cmd/provisioning:

** Temporarily updated to pass nil for service endpoints. This is a placeholder while ccoctl does not support user supplied service endpoints.

pkg/gcp/actuator:

** Actuator will get the infrastructure object and pass the endpoints during client creation.

pkg/operator/secretannotator/gcp:

** Reconciler will get the infrastructure object and pass the endpoints during client creation.

pkg/gcp/client.go:

** Client will now accept endpoints when creating the service cleints (ex: compute).

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 openshift-ci bot requested review from 2uasimojo and dlom August 4, 2025 17:34
@barbacbd
Copy link
Author

barbacbd commented Aug 4, 2025

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 4, 2025

@barbacbd: This pull request references CORS-4161 which is a valid jira issue.

In response to this:

/jira refresh

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.

@barbacbd
Copy link
Author

barbacbd commented Aug 4, 2025

/cc @patrickdillon
/cc @jstuever

Copy link

codecov bot commented Aug 4, 2025

Codecov Report

❌ Patch coverage is 2.67857% with 109 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.50%. Comparing base (c8ddc52) to head (e6541be).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
pkg/util/featuregate.go 0.00% 44 Missing ⚠️
pkg/gcp/client.go 0.00% 30 Missing ⚠️
pkg/gcp/actuator/actuator.go 15.38% 11 Missing ⚠️
pkg/operator/secretannotator/gcp/reconciler.go 8.33% 11 Missing ⚠️
pkg/operator/utils/gcp/utils.go 0.00% 8 Missing ⚠️
pkg/cmd/provisioning/gcp/create_all.go 0.00% 1 Missing ⚠️
...kg/cmd/provisioning/gcp/create_service_accounts.go 0.00% 1 Missing ⚠️
.../provisioning/gcp/create_workload_identity_pool.go 0.00% 1 Missing ⚠️
...visioning/gcp/create_workload_identity_provider.go 0.00% 1 Missing ⚠️
pkg/cmd/provisioning/gcp/delete.go 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #896      +/-   ##
==========================================
- Coverage   47.00%   46.50%   -0.50%     
==========================================
  Files          97       98       +1     
  Lines       11917    12053     +136     
==========================================
+ Hits         5601     5605       +4     
- Misses       5698     5830     +132     
  Partials      618      618              
Files with missing lines Coverage Δ
pkg/cmd/provisioning/gcp/create_all.go 0.00% <0.00%> (ø)
...kg/cmd/provisioning/gcp/create_service_accounts.go 52.50% <0.00%> (ø)
.../provisioning/gcp/create_workload_identity_pool.go 39.72% <0.00%> (ø)
...visioning/gcp/create_workload_identity_provider.go 49.42% <0.00%> (ø)
pkg/cmd/provisioning/gcp/delete.go 0.00% <0.00%> (ø)
pkg/operator/utils/gcp/utils.go 64.35% <0.00%> (-5.54%) ⬇️
pkg/gcp/actuator/actuator.go 49.55% <15.38%> (-1.00%) ⬇️
pkg/operator/secretannotator/gcp/reconciler.go 41.02% <8.33%> (-4.26%) ⬇️
pkg/gcp/client.go 0.00% <0.00%> (ø)
pkg/util/featuregate.go 0.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@barbacbd
Copy link
Author

barbacbd commented Aug 5, 2025

/retest-required

Copy link
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

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

In addition to the inline comments, this appears to be missing feature gate.

@barbacbd
Copy link
Author

barbacbd commented Aug 5, 2025

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 5, 2025
@jstuever
Copy link
Contributor

jstuever commented Aug 6, 2025

/assign

Copy link
Contributor

openshift-ci bot commented Aug 6, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: barbacbd
Once this PR has been reviewed and has the lgtm label, please ask for approval from jstuever. For more information see the 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

Comment on lines 52 to 56
enabledFeatureGates := map[configv1.FeatureGateName]bool{}
for _, fg := range featureGates {
enabledFeatureGates[fg] = currentFeatureGates.Enabled(fg)
}
return enabledFeatureGates, nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead, let's have this function GetCurrentFeatureGates and return the currentFeatureGates from line 47. This will change the behavior in pkg/operator/controller.go as mentioned in the correlated comment.

return featureGateAccessor.CurrentFeatureGates()

Comment on lines 113 to 117
enabledFeatures, err := util.GetEnabledFeatureGates([]configv1.FeatureGateName{features.FeatureGateGCPCustomAPIEndpoints})
if err != nil {
return fmt.Errorf("error getting enabled feature gates: %v", err)
}
gcpCustomEndpointsEnabled, _ := enabledFeatures[features.FeatureGateGCPCustomAPIEndpoints]
Copy link
Contributor

Choose a reason for hiding this comment

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

In conjunction with the comment in pkg/util/featuregate.go, modify this to get currentFeatureGates, and then check for gcpCustomEndpointsEnabled separately.

	currentFeatureGates, err := util.GetCurrentFeatureGates()
	if err != nil {
		return err
	}

That block should be included in the prior commit so it remains after the featuregate is removed. And then for this specific feature gate, you would add

	gcpCustomEndpointsEnabled := currentFeatureGates.Enabled(features.FeatureGateGCPCustomAPIEndpoints)

Comment on lines 47 to 50
currentFeatureGates, err := featureGateAccessor.CurrentFeatureGates()
if err != nil {
return nil, err
}
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: this feels replicated from the case above.

Comment on lines 89 to 79
desiredVersion := "unknown" // TODO: config.OperatorReleaseVersion <<< passed or read into the operator
missingVersion := "0.0.1-snapshot"
Copy link
Contributor

@jstuever jstuever Aug 6, 2025

Choose a reason for hiding this comment

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

I don't think CCO properly handles versioning. We might have to set desiredVersion equal to missingVersion here to make this work, which looks like it will then read the version from CVO.

@barbacbd barbacbd force-pushed the CORS-4161 branch 2 times, most recently from 3a2dc90 to 91b7741 Compare August 7, 2025 15:33
@barbacbd barbacbd requested a review from jstuever August 7, 2025 19:43
@barbacbd
Copy link
Author

Currently this is on hold for multiple reasons:
[1]: There needs to be overrides for STS, IAMCredentials, and OAuth -> find those here openshift/api#2444
[2]: The templates need to be updated for STS and IAMCredentials overrides. These appear to be required for WIF installs. This will also require updates to the CCOCTL where the endpoint overrides can be entered as command line options.
[3]: Oauth2 endpoint needs to be overridden. This may occur in the osServiceAccount file but I am currently unsure about that. There is no explicit call to be able to override this endpoint unless we were to completely change how our credentials are initialized.

@barbacbd barbacbd force-pushed the CORS-4161 branch 2 times, most recently from 91b7741 to a050fca Compare August 27, 2025 18:22
Copy link
Contributor

openshift-ci bot commented Aug 27, 2025

@barbacbd: The following tests 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/e2e-openstack 91b7741 link false /test e2e-openstack
ci/prow/e2e-gcp-manual-oidc 91b7741 link false /test e2e-gcp-manual-oidc
ci/prow/e2e-azure-upgrade 91b7741 link false /test e2e-azure-upgrade
ci/prow/e2e-gcp 91b7741 link false /test e2e-gcp

Full PR test history. Your PR dashboard.

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.

pkg/cmd/provisioning:

** Temporarily updated to pass nil for service endpoints. This is a placeholder
while ccoctl does not support user supplied service endpoints.

pkg/gcp/actuator:

** Actuator will get the infrastructure object and pass the endpoints during
client creation.

pkg/operator/secretannotator/gcp:

** Reconciler will get the infrastructure object and pass the endpoints during
client creation.

pkg/gcp/client.go:

** Client will now accept endpoints when creating the service cleints (ex: compute).
Vendor updates to support finding enabled feature gates.

pkg/util/featuregate.go:

Create a function for checking enabled feature gates.
…CP custom Endpoint

feature gate.

Note: This commit is temporary and should be removed upon feature promotion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants