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

feat: allow OCI client endpoint override per cluster #248

Merged
merged 3 commits into from
Apr 26, 2023

Conversation

joekr
Copy link
Member

@joekr joekr commented Apr 13, 2023

What this PR does / why we need it:
Allows a cluster template to define the endpoints for each of the clients (e.g. compute, vcn).

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 #234

@joekr joekr added the enhancement New feature or request label Apr 13, 2023
@joekr joekr self-assigned this Apr 13, 2023
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Apr 13, 2023
@joekr joekr force-pushed the cluster-identity-host-url branch from 59dcc9b to 2b0c44f Compare April 13, 2023 17:57
@joekr
Copy link
Member Author

joekr commented Apr 13, 2023

unit tests

make test
GOBIN=/Users/jkratzat/Projects/cluster-api-provider-oci-joekr/hack/tools/bin ./scripts/go_install.sh sigs.k8s.io/controller-runtime/tools/setup-envtest setup-envtest v0.0.0-20230131074648-f5014c077fc3
kube-builder assets: /Users/jkratzat/Library/Application Support/io.kubebuilder.envtest/k8s/1.24.2-darwin-arm64
KUBEBUILDER_ASSETS="/Users/jkratzat/Library/Application Support/io.kubebuilder.envtest/k8s/1.24.2-darwin-arm64" go test -coverprofile=coverage.out ./... 
?       github.com/oracle/cluster-api-provider-oci      [no test files]
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta1  18.952s coverage: 23.9% of statements
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta2  0.275s  coverage: 15.9% 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.135s  coverage: 25.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/scope  167.275s        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   1.110s  coverage: 57.1% of statements
ok      github.com/oracle/cluster-api-provider-oci/controllers  27.193s coverage: 67.6% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1      13.883s coverage: 21.8% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2      0.494s  coverage: 10.9% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/controllers      1.362s  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]

e2e tests

Summarizing 1 Failure:
  [FAIL] Managed Workload cluster creation [It] Managed Cluster - Simple [PRBlocking]
  /home/ubuntu/go/pkg/mod/sigs.k8s.io/cluster-api/test@v1.4.1/framework/cluster_helpers.go:144

Ran 6 of 25 Specs in 2680.054 seconds
FAIL! -- 5 Passed | 1 Failed | 0 Pending | 19 Skipped

Working to get my managed cluster test working

GINKGO_FOCUS="Managed Cluster - Simple" scripts/ci-e2e.sh

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

@joekr joekr force-pushed the cluster-identity-host-url branch from 2b0c44f to cd450a4 Compare April 24, 2023 21:56
@joekr joekr marked this pull request as ready for review April 24, 2023 21:57
@joekr
Copy link
Member Author

joekr commented Apr 25, 2023

Tests pass after rebase

api/v1beta2/ocicluster_types.go Outdated Show resolved Hide resolved
api/v1beta2/ocicluster_types.go Outdated Show resolved Hide resolved
api/v1beta2/ocicluster_types.go Outdated Show resolved Hide resolved
cloud/scope/clients.go Show resolved Hide resolved
cloud/scope/clients_test.go Outdated Show resolved Hide resolved
cloud/util/util.go Outdated Show resolved Hide resolved
@joekr joekr force-pushed the cluster-identity-host-url branch 2 times, most recently from 18b4105 to 79d9c06 Compare April 25, 2023 16:25
@joekr joekr force-pushed the cluster-identity-host-url branch from 79d9c06 to b529b3c Compare April 25, 2023 16:26
api/v1beta2/ocicluster_types.go Show resolved Hide resolved
cloud/scope/clients.go Show resolved Hide resolved
cloud/scope/clients.go Outdated Show resolved Hide resolved
@joekr
Copy link
Member Author

joekr commented Apr 26, 2023

All unit and e2e tests passed after updates.

@joekr joekr merged commit f4f9841 into oracle:main Apr 26, 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.

Add ability to define an API endpoint URL for each cluster's client
2 participants