cluster-api-provider-cloudstack icon indicating copy to clipboard operation
cluster-api-provider-cloudstack copied to clipboard

Reconcile CAPC Cluster as CloudStack CKS Cluster (Default: Opt Out)

Open rohityadavcloud opened this issue 1 year ago • 21 comments
trafficstars

Issue #, if available:

https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/issues/310

Description of changes:

The notion of a CAPC cluster represents a k8s cluster created and managed by CAPC. While a similar construct exists in CloudStack in form of CKS (CloudStack K8S Service) cluster. This PR aims to address #310 by introducing logic that can reconcile a CAPC cluster to a CKS cluster, while having this feature disabled by default (i.e. opt out by default). This will be useful for users (and integrations) who want to be aware about a potentially externally managed K8S cluster in CloudStack via the reconciled CKS cluster.

ACS 4.19 and later support such reconciliation with introduction of feature support PRs in upstream CloudStack releases: https://github.com/apache/cloudstack-go/pull/59 https://github.com/apache/cloudstack/pull/7515 https://github.com/apache/cloudstack-documentation/pull/315

Previously attempted as https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/pull/250

Testing performed:

To be updated

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

rohityadavcloud avatar Mar 22 '24 10:03 rohityadavcloud

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

k8s-ci-robot avatar Mar 22 '24 10:03 k8s-ci-robot

Deploy Preview for kubernetes-sigs-cluster-api-cloudstack ready!

Name Link
Latest commit 5bbb71760f16e0496b7f90614d41ee49d63e1e4b
Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-cloudstack/deploys/667456f754e1920008530918
Deploy Preview https://deploy-preview-350--kubernetes-sigs-cluster-api-cloudstack.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Mar 22 '24 10:03 netlify[bot]

Currently - in progress, draft - not fit or ready for review yet.

rohityadavcloud avatar Mar 22 '24 10:03 rohityadavcloud

Codecov Report

Attention: Patch coverage is 30.81761% with 110 lines in your changes missing coverage. Please review.

Project coverage is 25.80%. Comparing base (d597e80) to head (1f37d9b). Report is 39 commits behind head on main.

Files Patch % Lines
pkg/cloud/cks_cluster.go 0.00% 71 Missing :warning:
controllers/cks_cluster_controller.go 58.97% 14 Missing and 2 partials :warning:
controllers/cks_machine_controller.go 72.22% 5 Missing and 5 partials :warning:
api/v1beta2/zz_generated.conversion.go 0.00% 8 Missing :warning:
api/v1beta2/cloudstackcluster_conversion.go 0.00% 4 Missing :warning:
api/v1beta1/conversion.go 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #350      +/-   ##
==========================================
+ Coverage   25.66%   25.80%   +0.13%     
==========================================
  Files          59       62       +3     
  Lines        5563     4906     -657     
==========================================
- Hits         1428     1266     -162     
+ Misses       3996     3508     -488     
+ Partials      139      132       -7     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 03 '24 10:04 codecov-commenter

/run-e2e -c 4.19

vishesh92 avatar Apr 05 '24 06:04 vishesh92

@vishesh92 Invalid command: /run-e2e -c 4.19

  • Unsupported CloudStack version: 4.19

The command to run e2e test for CAPC.

Usage: /run-e2e [-k Kubernetes_Version] [-c CloudStack_Version] [-h Hypervisor] [-i Template/Image] [-f Kubernetes_Version_Upgrade_From] [-t Kubernetes_Version_Upgrade_To]

  • Supported Kubernetes versions are: ['1.27.2', '1.26.5', '1.25.10', '1.24.14', '1.23.3', '1.22.6']. The default value is '1.27.2'.
  • Supported CloudStack versions are: ['4.18', '4.17', '4.16']. If it is not set, an existing environment will be used.
  • Supported hypervisors are: ['kvm', 'vmware', 'xen']. The default value is 'kvm'.
  • Supported templates are: ['ubuntu-2004-kube', 'rockylinux-8-kube']. The default value is 'ubuntu-2004-kube'.
  • By default it tests Kubernetes upgrade from version '1.26.5' to '1.27.2'.

Examples:

  • /run-e2e
  • /run-e2e -k 1.27.2 -h kvm -i ubuntu-2004-kube
  • /run-e2e -k 1.27.2 -c 4.18 -h kvm -i ubuntu-2004-kube -f 1.26.5 -t 1.27.2

blueorangutan avatar Apr 05 '24 06:04 blueorangutan

/run-e2e -c 4.18

vishesh92 avatar Apr 05 '24 06:04 vishesh92

@vishesh92 a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.18
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar Apr 05 '24 06:04 blueorangutan

/run-e2e -c 4.19

vishesh92 avatar Apr 05 '24 09:04 vishesh92

@vishesh92 a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.19
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar Apr 05 '24 09:04 blueorangutan

/run-e2e -c 4.18

vishesh92 avatar Apr 05 '24 18:04 vishesh92

/run-e2e -c 4.19

vishesh92 avatar Apr 05 '24 18:04 vishesh92

@vishesh92 a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.18
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar Apr 05 '24 18:04 blueorangutan

@vishesh92 a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.19
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar Apr 05 '24 18:04 blueorangutan

Setting up environment failed

blueorangutan avatar Apr 05 '24 18:04 blueorangutan

Setting up environment failed

blueorangutan avatar Apr 05 '24 19:04 blueorangutan

/run-e2e -c 4.19

vishesh92 avatar May 04 '24 09:05 vishesh92

@vishesh92 a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.19
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar May 04 '24 09:05 blueorangutan

Setting up environment failed

blueorangutan avatar May 04 '24 09:05 blueorangutan

Tests were aborted.

blueorangutan avatar May 06 '24 08:05 blueorangutan

Tests were aborted.

blueorangutan avatar May 06 '24 18:05 blueorangutan

Test Results : (tid-393) Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8 Kubernetes Version: v1.27.2 Kubernetes Version upgrade from: v1.26.5 Kubernetes Version upgrade to: v1.27.2 CloudStack Version: 4.19 Template: ubuntu-2004-kube Jobs filtered by: unmanaged CKS cluster E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr350-sl-393.zip



Ran 1 of 30 Specs in 299.037 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 29 Skipped
PASS

blueorangutan avatar May 06 '24 19:05 blueorangutan

Test Results : (tid-395) Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8 Kubernetes Version: v1.27.2 Kubernetes Version upgrade from: v1.26.5 Kubernetes Version upgrade to: v1.27.2 CloudStack Version: 4.19 Template: ubuntu-2004-kube E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr350-sl-395.zip



Summarizing 1 Failure:
 [FAIL] When testing affinity group [It] Should have host affinity group when affinity is pro
 /jenkins/workspace/capc-e2e-new/test/e2e/common.go:343

Ran 29 of 30 Specs in 9716.374 seconds
FAIL! -- 28 Passed | 1 Failed | 0 Pending | 1 Skipped
--- FAIL: TestE2E (9716.38s)
FAIL

blueorangutan avatar May 07 '24 04:05 blueorangutan

/run-e2e -c 4.18

vishesh92 avatar May 07 '24 04:05 vishesh92

@vishesh92 a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.18
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar May 07 '24 04:05 blueorangutan

/test

vishesh92 avatar May 20 '24 08:05 vishesh92

@vishesh92: The /test command needs one or more targets. The following commands are available to trigger required jobs:

  • /test capi-provider-cloudstack-presubmit-build
  • /test capi-provider-cloudstack-presubmit-e2e-smoke-test
  • /test capi-provider-cloudstack-presubmit-unit-test

Use /test all to run all jobs.

In response to this:

/test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar May 20 '24 08:05 k8s-ci-robot

/ok-to-test

vishesh92 avatar May 20 '24 08:05 vishesh92

/run-e2e -c 4.19

vishesh92 avatar May 20 '24 08:05 vishesh92

@vishesh92 a jenkins job has been kicked to run test with following paramaters:

  • kubernetes version: 1.27.2
  • CloudStack version: 4.19
  • hypervisor: kvm
  • template: ubuntu-2004-kube
  • Kubernetes upgrade from: 1.26.5 to 1.27.2

blueorangutan avatar May 20 '24 08:05 blueorangutan