oracle / cluster-api-provider-oci

Kubernetes Cluster API Provider for Oracle Cloud Infrastructure
https://oracle.github.io/cluster-api-provider-oci/
Apache License 2.0
40 stars 22 forks source link

Fix webhook errors and add params to NLB #374

Closed shyamradhakrishnan closed 3 months ago

shyamradhakrishnan commented 3 months ago

What this PR does / why we need it: Fix webhook errors and add params to NLB

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 #

shyamradhakrishnan commented 3 months ago

e2e output

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

  Timeline >>
  STEP: Tearing down the management cluster @ 07/31/24 09:52:26.354
  << Timeline
------------------------------

Ran 7 of 28 Specs in 2643.687 seconds
SUCCESS! -- 7 Passed | 0 Failed | 0 Pending | 21 Skipped
shyamradhakrishnan commented 3 months ago

unit test

$ make test
GOBIN=/home/ubuntu/go/src/github.com/oracle/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/ubuntu/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64
KUBEBUILDER_ASSETS="/home/ubuntu/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64" go test -coverprofile=coverage.out ./...
?       github.com/oracle/cluster-api-provider-oci  [no test files]
?       github.com/oracle/cluster-api-provider-oci/cloud/config [no test files]
?       github.com/oracle/cluster-api-provider-oci/cloud/metrics    [no test files]
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta1  54.338s coverage: 23.2% of statements
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta2  0.045s  coverage: 14.8% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/ociutil    0.004s  coverage: 19.6% 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/loadbalancer  [no test files]
?       github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb  [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]
?       github.com/oracle/cluster-api-provider-oci/feature  [no test files]
?       github.com/oracle/cluster-api-provider-oci/version  [no test files]
ok      github.com/oracle/cluster-api-provider-oci/cloud/scope  235.175s    coverage: 76.1% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/util   0.243s  coverage: 61.1% of statements
ok      github.com/oracle/cluster-api-provider-oci/controllers  26.745s coverage: 58.7% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1  13.462s coverage: 15.3% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2  0.016s  coverage: 4.8% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/controllers  0.446s  coverage: 56.3% of statements
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html
shyamradhakrishnan commented 3 months ago
[SynchronizedAfterSuite] PASSED [1.202 seconds]
[SynchronizedAfterSuite]
/home/ubuntu/go/src/github.com/oracle/cluster-api-provider-oci/test/e2e/e2e_suite_test.go:261

  Timeline >>
  STEP: Tearing down the management cluster @ 08/06/24 05:51:12.293
  << Timeline
------------------------------

Ran 7 of 28 Specs in 2519.750 seconds
SUCCESS! -- 7 Passed | 0 Failed | 0 Pending | 21 Skipped
shyamradhakrishnan commented 3 months ago

unit test

 make test
GOBIN=/home/ubuntu/go/src/github.com/oracle/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/ubuntu/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64
KUBEBUILDER_ASSETS="/home/ubuntu/.local/share/kubebuilder-envtest/k8s/1.24.2-linux-amd64" go test -coverprofile=coverage.out ./...
?       github.com/oracle/cluster-api-provider-oci  [no test files]
?       github.com/oracle/cluster-api-provider-oci/cloud/config [no test files]
?       github.com/oracle/cluster-api-provider-oci/cloud/metrics    [no test files]
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta1  55.702s coverage: 23.4% of statements
ok      github.com/oracle/cluster-api-provider-oci/api/v1beta2  0.051s  coverage: 14.7% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/ociutil    0.009s  coverage: 19.6% 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/loadbalancer  [no test files]
?       github.com/oracle/cluster-api-provider-oci/cloud/services/loadbalancer/mock_lb  [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]
?       github.com/oracle/cluster-api-provider-oci/feature  [no test files]
?       github.com/oracle/cluster-api-provider-oci/version  [no test files]
ok      github.com/oracle/cluster-api-provider-oci/cloud/scope  235.571s    coverage: 76.1% of statements
ok      github.com/oracle/cluster-api-provider-oci/cloud/util   0.138s  coverage: 61.1% of statements
ok      github.com/oracle/cluster-api-provider-oci/controllers  26.764s coverage: 58.7% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1  13.672s coverage: 15.3% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2  0.016s  coverage: 4.8% of statements
ok      github.com/oracle/cluster-api-provider-oci/exp/controllers  0.706s  coverage: 56.3% of statements
go tool cover -func=coverage.out -o coverage.txt
go tool cover -html=coverage.out -o coverage.html