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

Kindless upgrade changes for vSphere & CloudStack provider #6728

Merged

Conversation

panktishah26
Copy link
Member

Issue #, if available:

Description of changes:
This PR includes fixes for below 3 issues,

  1. Validates Cloudstack template name and kubernetes version from the controller side and waits for both to match for further reconciliation.
  2. Since we have seperated ETCD and CP reconciliation, it waits for ETCD to be ready before marking ControlPlaneReady to true.
  3. From the CLI side during management cluster upgrade, waits for Cluster FailureMessage to be nil before waiting for other condition to met.

Testing (if applicable):

Documentation added/planned (if applicable):

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

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 25, 2023
@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (81abfa4) 75.66% compared to head (439e7a3) 75.66%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6728   +/-   ##
=======================================
  Coverage   75.66%   75.66%           
=======================================
  Files         475      475           
  Lines       38359    38404   +45     
=======================================
+ Hits        29023    29059   +36     
- Misses       7727     7733    +6     
- Partials     1609     1612    +3     
Files Coverage Δ
pkg/cluster/config.go 98.58% <100.00%> (ø)
pkg/cluster/wait.go 100.00% <100.00%> (ø)
pkg/clustermanager/applier.go 100.00% <100.00%> (ø)
pkg/providers/cloudstack/validator.go 67.78% <82.35%> (+1.87%) ⬆️
pkg/controller/clusters/status.go 92.40% <66.66%> (-3.34%) ⬇️

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

pkg/cluster/wait.go Outdated Show resolved Hide resolved
pkg/cluster/wait.go Outdated Show resolved Hide resolved
pkg/clustermanager/applier.go Outdated Show resolved Hide resolved
pkg/controller/clusters/status.go Outdated Show resolved Hide resolved
pkg/controller/clusters/status.go Outdated Show resolved Hide resolved
pkg/controller/clusters/status_test.go Outdated Show resolved Hide resolved
pkg/providers/cloudstack/reconciler/reconciler.go Outdated Show resolved Hide resolved
pkg/validations/cluster.go Outdated Show resolved Hide resolved
pkg/validations/cluster.go Outdated Show resolved Hide resolved
pkg/validations/cluster.go Outdated Show resolved Hide resolved
@panktishah26 panktishah26 force-pushed the etcd-controlplaneready-controller branch 2 times, most recently from ea93006 to cbc23ef Compare September 26, 2023 18:45
@@ -135,6 +136,9 @@ func (v *Validator) ValidateClusterMachineConfigs(ctx context.Context, clusterSp
if err := v.validateMachineConfig(ctx, clusterSpec.CloudStackDatacenter, machineConfig); err != nil {
return fmt.Errorf("machine config %s validation failed: %v", machineConfig.Name, err)
}
if err := v.validateTemplateMatchesKubernetesVersion(ctx, machineConfig, clusterSpec); err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to split validateTemplateMatchesKubernetesVersion method separately to avoid cyclomatic complexity error.

@panktishah26 panktishah26 force-pushed the etcd-controlplaneready-controller branch from cbc23ef to cc825dd Compare September 26, 2023 18:55
pkg/cluster/wait.go Outdated Show resolved Hide resolved
pkg/cluster/wait.go Outdated Show resolved Hide resolved
pkg/controller/clusters/status.go Outdated Show resolved Hide resolved
pkg/controller/clusters/status.go Outdated Show resolved Hide resolved
pkg/providers/cloudstack/validator.go Outdated Show resolved Hide resolved
… controller side and waits for both to match for further reconciliation.

2. Since we have seperated ETCD and CP reconciliation, it waits for ETCD to be ready before marking ControlPlaneReady to true.
3. From the CLI side during management cluster upgrade, waits for Cluster FailureMessage to be nil before waiting for other condition to met.
@panktishah26 panktishah26 force-pushed the etcd-controlplaneready-controller branch from cc825dd to 439e7a3 Compare September 27, 2023 18:25
@g-gaston
Copy link
Member

/lgtm

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.

3 participants