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

Cluster identity implementation #207

Conversation

shyamradhakrishnan
Copy link
Member

@shyamradhakrishnan shyamradhakrishnan commented Jan 25, 2023

What this PR does / why we need it:

Cluster identity implementation

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #203

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 25, 2023
cloud/scope/clients.go Show resolved Hide resolved
api/v1beta1/ociclusteridentity_types.go Outdated Show resolved Hide resolved
cloud/util/util.go Outdated Show resolved Hide resolved
cloud/util/util.go Show resolved Hide resolved
controllers/ocicluster_controller.go Outdated Show resolved Hide resolved
controllers/ocicluster_controller.go Outdated Show resolved Hide resolved
controllers/ocimachine_controller.go Show resolved Hide resolved
@shyamradhakrishnan shyamradhakrishnan marked this pull request as ready for review January 31, 2023 09:28
@shyamradhakrishnan
Copy link
Member Author

unit tests

/Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/bin/controller-gen "crd" \
		rbac:roleName=manager-role webhook \
		paths="./api/..." \
		paths="./exp/api/..." \
		output:crd:artifacts:config=config/crd/bases
/Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./api/..." paths="./exp/api/..."
go fmt ./...
go vet ./...
mkdir -p /Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/testbin
test -f /Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/testbin/setup-envtest.sh || curl -sSLo /Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/testbin/setup-envtest.sh https://raw.githubusercontent.com/kubernetes-sigs/controller-runtime/v0.8.3/hack/setup-envtest.sh
source /Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/testbin/setup-envtest.sh; fetch_envtest_tools /Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/testbin; setup_envtest_env /Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/testbin; go test ./... -coverprofile cover.out && go tool cover -html=cover.out -o cover.html
Using cached envtest tools from /Users/shyaradh/oke/src/github.com/oracle/cluster-api-provider-oci/testbin
setting up env vars
?   	github.com/oracle/cluster-api-provider-oci	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/api/v1beta1	1.092s	coverage: 17.0% of statements
?   	github.com/oracle/cluster-api-provider-oci/cloud/config	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/cloud/ociutil	0.533s	coverage: 25.0% of statements
ok  	github.com/oracle/cluster-api-provider-oci/cloud/scope	167.052s	coverage: 76.4% of statements
?   	github.com/oracle/cluster-api-provider-oci/cloud/scope/mocks	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/base	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/cloud/services/base/mock_base	[no test files]
?   	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	[no test files]
?   	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	[no test files]
?   	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	[no test files]
?   	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	[no test files]
?   	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	[no test files]
?   	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	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/cloud/util	0.827s	coverage: 60.0% of statements
ok  	github.com/oracle/cluster-api-provider-oci/controllers	28.070s	coverage: 68.9% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1	0.745s	coverage: 9.9% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/controllers	1.675s	coverage: 56.3% of statements
?   	github.com/oracle/cluster-api-provider-oci/feature	[no test files]
?   	github.com/oracle/cluster-api-provider-oci/version	[no test files]

@shyamradhakrishnan
Copy link
Member Author

shyamradhakrishnan commented Jan 31, 2023

e2e tests

[SynchronizedAfterSuite] PASSED [160.730 seconds]
[SynchronizedAfterSuite]
/home/ubuntu/go/src/github.com/oracle/cluster-api-provider-oci/test/e2e/e2e_suite_test.go:252

  Timeline >>
  STEP: Tearing down the management cluster @ 01/31/23 07:14:07.338
  << Timeline
------------------------------

Ran 6 of 24 Specs in 2762.953 seconds
SUCCESS! -- 6 Passed | 0 Failed | 0 Pending | 18 Skipped
• [1383.030 seconds]
Managed Workload cluster creation Managed Cluster - Cluster Identity
/home/ubuntu/go/src/github.com/oracle/cluster-api-provider-oci/test/e2e/managed_cluster_test.go:178
[SynchronizedAfterSuite] PASSED [0.925 seconds]
[SynchronizedAfterSuite]
/home/ubuntu/go/src/github.com/oracle/cluster-api-provider-oci/test/e2e/e2e_suite_test.go:252

  Timeline >>
  STEP: Tearing down the management cluster @ 01/31/23 08:01:44.522
  << Timeline
------------------------------

Ran 1 of 24 Specs in 1481.279 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 23 Skipped

• [867.598 seconds]
Workload cluster creation Cluster identity - with 1 control-plane nodes and 1 worker nodes
/home/ubuntu/go/src/github.com/oracle/cluster-api-provider-oci/test/e2e/cluster_test.go:559
Ran 1 of 24 Specs in 967.129 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 23 Skipped
• [793.643 seconds]
Workload cluster creation when Multi-RegionIdentifier workload cluster creation Alternative region - With 1 control-plane nodes and 1 worker nodes
/home/ubuntu/go/src/github.com/oracle/cluster-api-provider-oci/test/e2e/cluster_test.go:402

  Captured StdOut/StdErr Output >>
  configmap/capoci-e2e-1xz7gr-alternative-region-oci-cloud-controller-manager created
Ran 1 of 24 Specs in 892.289 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 23 Skipped

@joekr joekr added the enhancement New feature or request label Jan 31, 2023
cloud/scope/cluster_accessor.go Show resolved Hide resolved
docs/src/gs/multi-tenancy.md Outdated Show resolved Hide resolved
docs/src/gs/multi-tenancy.md Outdated Show resolved Hide resolved
docs/src/gs/multi-tenancy.md Outdated Show resolved Hide resolved
docs/src/gs/multi-tenancy.md Outdated Show resolved Hide resolved
@shyamradhakrishnan shyamradhakrishnan merged commit cad9972 into oracle:main Feb 3, 2023
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.

Cluster Level OCI Authentication Provider(aka Multitenancy support)
2 participants