Skip to content

OIDC feature #423

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

OIDC feature #423

wants to merge 5 commits into from

Conversation

dranicu
Copy link
Member

@dranicu dranicu commented Jun 27, 2025

What this PR does / why we need it:|
This feature adds the newly announced OIDC configuration into the cluster api. This allows users to provision OKE clusters with the correct OIDC settings in one go.

Which issue(s) this PR fixes:
Fixes #391

Note: Due to the nested structs - I followed conventions in other cluster-api operators and imported go-cmp to better evaluate the differences due to the issues with deepequal

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 27, 2025
@dranicu dranicu requested a review from vladcristi June 27, 2025 08:08
@dranicu
Copy link
Member Author

dranicu commented Jun 27, 2025

Unit tests:

github.com/oracle/cluster-api-provider-oci coverage: 0.0% of statements ok github.com/oracle/cluster-api-provider-oci/api/v1beta1 42.490s coverage: 23.3% of statements github.com/oracle/cluster-api-provider-oci/cloud/config coverage: 0.0% of statements github.com/oracle/cluster-api-provider-oci/cloud/metrics coverage: 0.0% of statements ok github.com/oracle/cluster-api-provider-oci/api/v1beta2 0.038s coverage: 14.2% of statements ok github.com/oracle/cluster-api-provider-oci/cloud/ociutil 0.020s coverage: 15.9% of statements github.com/oracle/cluster-api-provider-oci/cloud/scope/mocks coverage: 0.0% of statements github.com/oracle/cluster-api-provider-oci/cloud/services/base coverage: 0.0% of statements github.com/oracle/cluster-api-provider-oci/cloud/services/base/mock_base coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/cloud/services/compute [no test files] github.com/oracle/cluster-api-provider-oci/cloud/services/compute/mock_compute coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement [no test files] github.com/oracle/cluster-api-provider-oci/cloud/services/computemanagement/mock_computemanagement coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine [no test files] github.com/oracle/cluster-api-provider-oci/cloud/services/containerengine/mock_containerengine coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/cloud/services/identity [no test files] github.com/oracle/cluster-api-provider-oci/cloud/services/identity/mock_identity coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer [no test files] github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer [no test files] github.com/oracle/cluster-api-provider-oci/cloud/services/networkloadbalancer/mock_nlb coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/cloud/services/vcn [no test files] github.com/oracle/cluster-api-provider-oci/cloud/services/vcn/mock_vcn coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests [no test files] github.com/oracle/cluster-api-provider-oci/cloud/services/workrequests/mock_workrequests coverage: 0.0% of statements ok github.com/oracle/cluster-api-provider-oci/cloud/scope 20.218s coverage: 74.5% of statements ok github.com/oracle/cluster-api-provider-oci/cloud/util 0.142s coverage: 61.1% of statements ok github.com/oracle/cluster-api-provider-oci/controllers 1.881s coverage: 59.2% of statements ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1 12.248s coverage: 15.3% of statements ok github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2 0.036s coverage: 4.8% of statements github.com/oracle/cluster-api-provider-oci/feature coverage: 0.0% of statements ? github.com/oracle/cluster-api-provider-oci/version [no test files] ok github.com/oracle/cluster-api-provider-oci/exp/controllers 0.506s coverage: 56.3% of statements go tool cover -func=coverage.out -o coverage.txt go tool cover -html=coverage.out -o coverage.html

E2E Tests:

Ran 9 of 31 Specs in 3651.869 seconds SUCCESS! -- 9 Passed | 0 Failed | 0 Pending | 22 Skipped

@@ -653,6 +738,21 @@ func (s *ManagedControlPlaneScope) UpdateControlPlane(ctx context.Context, okeCl
return false, nil
}

// compareSpecs compares two OCIManagedControlPlaneSpec objects for equality
func (s *ManagedControlPlaneScope) compareSpecs(spec1, spec2 *infrastructurev1beta2.OCIManagedControlPlaneSpec) bool {
Copy link
Member

Choose a reason for hiding this comment

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

Thoughts on adding some quick unit tests around this new function?

}

// KeyValue defines the properties that define a key value pair. This is alias to containerengine.KeyValue, to support the sdk type
type KeyValue containerengine.KeyValue
Copy link
Member

Choose a reason for hiding this comment

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

I don't fully understand this one. What is going on here?

@joekr joekr added the enhancement New feature or request label Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support OIDC in the provider
3 participants