Skip to content

Nsgs feature #421

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

Merged
merged 15 commits into from
Jun 6, 2025
Merged

Nsgs feature #421

merged 15 commits into from
Jun 6, 2025

Conversation

vladcristi
Copy link
Member

What this PR does / why we need it:
This PR adds support to bring your own VCN and subnets outside of Cluster API, but still use Cluster API to provision and manage NSG.

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

@vladcristi vladcristi self-assigned this Jun 3, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 3, 2025
@vladcristi vladcristi requested review from joekr and removed request for joekr June 3, 2025 12:18
@dranicu
Copy link
Member

dranicu commented Jun 5, 2025

Unit tests:

[opc@capoci-env cluster-api-provider-oci]$ make test
GOBIN=/home/opc/git/cluster-api-provider-oci/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: /home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64
KUBEBUILDER_ASSETS="/home/opc/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64" go test -coverprofile=coverage.out ./... 
        github.com/oracle/cluster-api-provider-oci              coverage: 0.0% of statements
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta1  38.486s coverage: 23.1% 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.033s  coverage: 14.5% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/ociutil        0.008s  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  19.647s coverage: 75.6% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/util   0.090s  coverage: 61.1% of statements
ok      github.com/oracle/cluster-api-provider-oci/controllers  1.825s  coverage: 59.2% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1      11.196s coverage: 15.3% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2      0.033s  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.488s  coverage: 56.3% of statements
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html

E2E Results:

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

@dranicu dranicu merged commit 197bf0d into main Jun 6, 2025
1 of 2 checks passed
@dranicu dranicu deleted the nsgs-feature branch June 6, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support reconciling Network Security Groups (NSG) while allowing use of existing VCN and Subnets
3 participants