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

Make network & VPC offering configurable #424

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vishesh92
Copy link
Member

Issue #, if available:
Fixes #206
Description of changes:

Testing performed:

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

@k8s-ci-robot
Copy link
Contributor

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 k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 20, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vishesh92

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot requested a review from g-gaston March 20, 2025 07:43
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 20, 2025
Copy link

netlify bot commented Mar 20, 2025

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

Name Link
🔨 Latest commit 95f94eb
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-cloudstack/deploys/67ddbcb95ca7b000080958e4
😎 Deploy Preview https://deploy-preview-424--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.

@vishesh92
Copy link
Member Author

/test all

@codecov-commenter
Copy link

codecov-commenter commented Mar 20, 2025

Codecov Report

Attention: Patch coverage is 28.12500% with 23 lines in your changes missing coverage. Please review.

Project coverage is 25.67%. Comparing base (d597e80) to head (95f94eb).
Report is 80 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cloud/isolated_network.go 7.69% 8 Missing and 4 partials ⚠️
api/v1beta3/cloudstackisolatednetwork_types.go 0.00% 7 Missing ⚠️
pkg/cloud/vpc.go 66.66% 2 Missing and 1 partial ⚠️
controllers/utils/isolated_network.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             main     #424     +/-   ##
=========================================
  Coverage   25.66%   25.67%             
=========================================
  Files          59       72     +13     
  Lines        5563     6742   +1179     
=========================================
+ Hits         1428     1731    +303     
- Misses       3996     4846    +850     
- Partials      139      165     +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@weizhouapache
Copy link
Collaborator

looks good

@vishesh92
can you update existing tests or add new tests for

  • isolated network offering with default egresspolicy=true
  • isolated network offering with default egresspolicy=false
  • customer vpc offering with custom vpc network offering

@blueorangutan
Copy link

Test Results : (tid-615)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.31.6
Kubernetes Version upgrade from: v1.30.10
Kubernetes Version upgrade to: v1.31.6
CloudStack Version: 4.20
Template: ubuntu-2404-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr424-sl-615.zip



Summarizing 4 Failures:
 [FAIL] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade control plane machine due to insufficient compute resources
 /jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253
 [FAIL] When testing clusters in a VPC network [It] Should successfully create a cluster in a VPC network
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/cluster_helpers.go:144
 [FAIL] When testing multiple CPs in a shared network with kubevip [It] Should successfully create a cluster with multiple CPs in a shared network
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/cluster_helpers.go:144
 [FAIL] When testing project [It] Should create a cluster in a project
 /jenkins/workspace/capc-e2e-new/test/e2e/project.go:104

Ran 29 of 32 Specs in 9226.991 seconds
FAIL! -- 25 Passed | 4 Failed | 0 Pending | 3 Skipped
--- FAIL: TestE2E (9226.99s)
FAIL

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 20, 2025
@vishesh92 vishesh92 closed this Mar 20, 2025
@vishesh92 vishesh92 force-pushed the make-offering-configurable branch from ad59c3a to b4216bb Compare March 20, 2025 13:01
@vishesh92 vishesh92 reopened this Mar 20, 2025
@vishesh92 vishesh92 marked this pull request as ready for review March 20, 2025 13:05
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 20, 2025
@vishesh92 vishesh92 removed the request for review from jweite-amazon March 20, 2025 13:05
@vishesh92 vishesh92 force-pushed the make-offering-configurable branch 4 times, most recently from 58cfa16 to 946ff37 Compare March 20, 2025 17:55
@weizhouapache
Copy link
Collaborator

/run-e2e -c 4.20

@blueorangutan
Copy link

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

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

@blueorangutan
Copy link

Test Results : (tid-622)
Environment: kvm Rocky8(x3), Advanced Networking with Management Server Rocky8
Kubernetes Version: v1.31.6
Kubernetes Version upgrade from: v1.30.10
Kubernetes Version upgrade to: v1.31.6
CloudStack Version: 4.20
Template: ubuntu-2404-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr424-sl-622.zip



Summarizing 6 Failures:
 [FAIL] When the specified resource does not exist When starting with a healthy cluster [It] Should fail to upgrade control plane machine due to insufficient compute resources
 /jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:253
 [FAIL] When testing project [It] Should create a cluster in a project
 /jenkins/workspace/capc-e2e-new/test/e2e/project.go:104
 [FAIL] When testing network with custom offering [It] Should create a new network with a custom offering
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/clusterctl/clusterctl_helpers.go:310
 [FAIL] When testing clusters in a VPC network [It] Should successfully create a cluster in a VPC network with default offering
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/clusterctl/clusterctl_helpers.go:310
 [FAIL] When testing clusters in a VPC network [It] Should successfully create a cluster in a VPC network with a custom offering
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/clusterctl/clusterctl_helpers.go:310
 [FAIL] When testing resource cleanup [It] Should create a new network when the specified network does not exist
 /jenkins/workspace/capc-e2e-new/test/e2e/resource_cleanup.go:96

Ran 31 of 34 Specs in 8242.988 seconds
FAIL! -- 25 Passed | 6 Failed | 0 Pending | 3 Skipped
--- FAIL: TestE2E (8242.99s)
FAIL

@blueorangutan
Copy link

Test Results : (tid-634)
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.20
Template: ubuntu-2004-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr424-sl-634.zip



Summarizing 5 Failures:
 [FAIL] When testing affinity group [It] Should have host affinity group when affinity is pro
 /jenkins/workspace/capc-e2e-new/test/e2e/common.go:372
 [PANICKED!] When testing clusters in a VPC network [It] Should successfully create a cluster in a VPC network with default offering
 /root/sdk/go1.22.12/src/runtime/panic.go:261
 [PANICKED!] When testing clusters in a VPC network [It] Should successfully create a cluster in a VPC network with a custom offering
 /root/sdk/go1.22.12/src/runtime/panic.go:261
 [FAIL] When testing project [It] Should create a cluster in a project
 /jenkins/workspace/capc-e2e-new/test/e2e/project.go:104
 [TIMEDOUT] When the specified resource does not exist When starting with a healthy cluster [BeforeEach] Should fail to upgrade worker machine due to insufficient compute resources
 /jenkins/workspace/capc-e2e-new/test/e2e/invalid_resource.go:111

Ran 31 of 34 Specs in 10814.411 seconds
FAIL! - Suite Timeout Elapsed -- 26 Passed | 5 Failed | 0 Pending | 3 Skipped
--- FAIL: TestE2E (10814.41s)
FAIL

@vishesh92 vishesh92 force-pushed the make-offering-configurable branch from 946ff37 to d770987 Compare March 21, 2025 06:07
@blueorangutan
Copy link

Test Results : (tid-637)
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.20
Template: ubuntu-2004-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr424-sl-637.zip



Summarizing 5 Failures:
 [FAIL] When the specified resource does not exist When starting with a healthy cluster [BeforeEach] Should fail to upgrade control plane machine due to insufficient compute resources
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/machinedeployment_helpers.go:127
 [FAIL] When testing clusters in a VPC network [It] Should successfully create a cluster in a VPC network with default offering
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/cluster_helpers.go:144
 [FAIL] When testing clusters in a VPC network [It] Should successfully create a cluster in a VPC network with a custom offering
 /jenkins/workspace/capc-e2e-new/test/e2e/vpc_network.go:119
 [FAIL] When testing project [It] Should create a cluster in a project
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/controlplane_helpers.go:153
 [TIMEDOUT] When testing node drain timeout [It] A node should be forcefully removed if it cannot be drained in time
 /jenkins/workspace/capc-e2e-new/test/e2e/node_drain_timeout.go:66

Ran 28 of 34 Specs in 10814.256 seconds
FAIL! - Suite Timeout Elapsed -- 23 Passed | 5 Failed | 0 Pending | 6 Skipped
--- FAIL: TestE2E (10814.26s)
FAIL

@vishesh92 vishesh92 force-pushed the make-offering-configurable branch from d770987 to 371167c Compare March 21, 2025 09:57
@vishesh92 vishesh92 force-pushed the make-offering-configurable branch 2 times, most recently from e1958bf to b01b9e5 Compare March 21, 2025 13:00
@kubernetes-sigs kubernetes-sigs deleted a comment from blueorangutan Mar 21, 2025
@vishesh92 vishesh92 force-pushed the make-offering-configurable branch from b01b9e5 to 95f94eb Compare March 21, 2025 19:23
@blueorangutan
Copy link

Test Results : (tid-646)
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.20
Template: ubuntu-2004-kube
E2E Test Run Logs: https://github.com/blueorangutan/capc-prs/releases/download/capc-pr-ci-cd/capc-e2e-artifacts-pr424-sl-646.zip



Summarizing 2 Failures:
 [FAIL] When testing multiple CPs in a shared network with kubevip [It] Should successfully create a cluster with multiple CPs in a shared network
 /root/go/pkg/mod/sigs.k8s.io/cluster-api/[email protected]/framework/cluster_helpers.go:144
 [TIMEDOUT] When testing horizontal scale out/in [TC17][TC18][TC20][TC21] [It] Should successfully scale machine replicas up and down horizontally
 /jenkins/workspace/capc-e2e-new/test/e2e/horizontal_scale.go:60

Ran 31 of 34 Specs in 10814.143 seconds
FAIL! - Suite Timeout Elapsed -- 29 Passed | 2 Failed | 0 Pending | 3 Skipped
--- FAIL: TestE2E (10814.14s)
FAIL

@vishesh92 vishesh92 added this to the v0.6 milestone Mar 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow network offering to be configurable
5 participants