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

Add node pool recycling #285

Merged

Conversation

shyamradhakrishnan
Copy link
Member

What this PR does / why we need it:

Add node pool recycling

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

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jun 15, 2023
@shyamradhakrishnan
Copy link
Member Author

e2e

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

  Timeline >>
  STEP: Tearing down the management cluster @ 06/15/23 07:57:10.737
  INFO: Error getting pod capi-kubeadm-bootstrap-system/capi-kubeadm-bootstrap-controller-manager-5996c56969-5qqfw, container manager: Get "https://127.0.0.1:45019/api/v1/namespaces/capi-kubeadm-bootstrap-system/pods/capi-kubeadm-bootstrap-controller-manager-5996c56969-5qqfw": dial tcp 127.0.0.1:45019: connect: connection refused
  INFO: Error getting pod capi-kubeadm-control-plane-system/capi-kubeadm-control-plane-controller-manager-85f84fcdcb-bmr8k, container manager: Get "https://127.0.0.1:45019/api/v1/namespaces/capi-kubeadm-control-plane-system/pods/capi-kubeadm-control-plane-controller-manager-85f84fcdcb-bmr8k": dial tcp 127.0.0.1:45019: connect: connection refused
  INFO: Error getting pod capi-system/capi-controller-manager-5fbc569749-gp6pv, container manager: Get "https://127.0.0.1:45019/api/v1/namespaces/capi-system/pods/capi-controller-manager-5fbc569749-gp6pv": dial tcp 127.0.0.1:45019: connect: connection refused
  INFO: Error getting pod cluster-api-provider-oci-system/capoci-controller-manager-574448f8c5-qrj5d, container manager: Get "https://127.0.0.1:45019/api/v1/namespaces/cluster-api-provider-oci-system/pods/capoci-controller-manager-574448f8c5-qrj5d": dial tcp 127.0.0.1:45019: connect: connection refused
  << Timeline
------------------------------

Ran 7 of 27 Specs in 3746.455 seconds
SUCCESS! -- 7 Passed | 0 Failed | 0 Pending | 20 Skipped

@shyamradhakrishnan
Copy link
Member Author

unit test

?   	github.com/oracle/cluster-api-provider-oci	[no test files]
ok  	github.com/oracle/cluster-api-provider-oci/api/v1beta1	41.507s	coverage: 24.1% of statements
ok  	github.com/oracle/cluster-api-provider-oci/api/v1beta2	0.045s	coverage: 15.8% of statements
?   	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/cloud/ociutil	0.013s	coverage: 19.6% of statements
ok  	github.com/oracle/cluster-api-provider-oci/cloud/scope	241.010s	coverage: 75.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]
ok  	github.com/oracle/cluster-api-provider-oci/cloud/util	0.205s	coverage: 76.1% of statements
ok  	github.com/oracle/cluster-api-provider-oci/controllers	25.951s	coverage: 67.5% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/api/v1beta1	27.409s	coverage: 18.5% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/api/v1beta2	0.023s	coverage: 10.2% of statements
ok  	github.com/oracle/cluster-api-provider-oci/exp/controllers	1.361s	coverage: 56.7% 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

e2e for the feature

Managed Workload cluster creation Managed Cluster - Node Recycling
/home/ubuntu/go/src/github.com/oracle/cluster-api-provider-oci/test/e2e/managed_cluster_test.go:225

  Captured StdOut/StdErr Output >>
  cluster.cluster.x-k8s.io/capoci-e2e-3pw-cls-iden created
  machinepool.cluster.x-k8s.io/capoci-e2e-3pw-cls-iden-mp-1 created
  ocimanagedcluster.infrastructure.cluster.x-k8s.io/capoci-e2e-3pw-cls-iden created
  ocimanagedcontrolplane.infrastructure.cluster.x-k8s.io/capoci-e2e-3pw-cls-iden created
  ocimanagedmachinepool.infrastructure.cluster.x-k8s.io/capoci-e2e-3pw-cls-iden-mp-1 created

  << Captured StdOut/StdErr Output

  Timeline >>
  STEP: Creating namespace "capoci-e2e-3pw" for hosting the cluster @ 06/14/23 06:05:11.274
  Jun 14 06:05:11.274: INFO: starting to create namespace for hosting the "capoci-e2e-3pw" test spec
  INFO: Creating namespace capoci-e2e-3pw
  INFO: Creating event watcher for namespace "capoci-e2e-3pw"
  INFO: Cluster name is capoci-e2e-3pw-cls-iden
  INFO: Creating the workload cluster with name "capoci-e2e-3pw-cls-iden" using the "managed-node-recycling" template (Kubernetes v1.25.6, 1 control-plane machines, 1 worker machines)
  INFO: Getting the cluster template yaml
  INFO: clusterctl config cluster capoci-e2e-3pw-cls-iden --infrastructure (default) --kubernetes-version v1.25.6 --control-plane-machine-count 1 --worker-machine-count 1 --flavor managed-node-recycling
  INFO: Applying the cluster template yaml to the cluster
  INFO: Waiting for the cluster infrastructure to be provisioned
  STEP: Waiting for cluster to enter the provisioned phase @ 06/14/23 06:05:12.916
  INFO: Waiting for control plane to be initialized
  Jun 14 06:15:43.170: INFO: Control plane is not nil, status is true
  INFO: Waiting for control plane to be ready
  INFO: Waiting for the machine deployments to be provisioned
  INFO: Waiting for the machine pools to be provisioned
  STEP: Waiting for the machine pool workload nodes @ 06/14/23 06:15:43.2
  Jun 14 06:21:33.366: INFO: Upgrade test is starting, upgrade version is v1.26.2
  Jun 14 06:21:33.446: INFO: Upgrade test is starting
  STEP: Dumping logs from the "capoci-e2e-3pw-cls-iden" workload cluster @ 06/14/23 06:29:46.548
  STEP: Dumping all the Cluster API resources in the "capoci-e2e-3pw" namespace @ 06/14/23 06:29:46.548
  STEP: Deleting all clusters in the capoci-e2e-3pw namespace @ 06/14/23 06:29:46.903
  STEP: Deleting cluster capoci-e2e-3pw-cls-iden @ 06/14/23 06:29:46.912
  INFO: Waiting for the Cluster capoci-e2e-3pw/capoci-e2e-3pw-cls-iden to be deleted
  STEP: Waiting for cluster capoci-e2e-3pw-cls-iden to be deleted @ 06/14/23 06:29:46.926
  STEP: Deleting namespace used for hosting the "create-managed-workload-cluster" test spec @ 06/14/23 06:36:47.099
  INFO: Deleting namespace capoci-e2e-3pw
  << Timeline
------------------------------
[SynchronizedAfterSuite] PASSED [0.957 seconds]
[SynchronizedAfterSuite]
/home/ubuntu/go/src/github.com/oracle/cluster-api-provider-oci/test/e2e/e2e_suite_test.go:254

  Timeline >>
  STEP: Tearing down the management cluster @ 06/14/23 06:36:47.111
  << Timeline
------------------------------

Ran 1 of 27 Specs in 1986.679 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 26 Skipped

@shyamradhakrishnan shyamradhakrishnan marked this pull request as ready for review June 20, 2023 14:09
cloud/scope/managed_control_plane.go Show resolved Hide resolved
cloud/scope/managed_machine_pool.go Show resolved Hide resolved
cloud/scope/managed_machine_pool.go Show resolved Hide resolved
exp/api/v1beta1/ocimanagedmachinepool_types.go Outdated Show resolved Hide resolved
exp/api/v1beta2/ocimanagedmachinepool_webhook.go Outdated Show resolved Hide resolved
@shyamradhakrishnan shyamradhakrishnan merged commit e5676d6 into oracle:main Jun 22, 2023
1 check passed
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.

Add support for OKE node pool Cycling
2 participants