eks-anywhere icon indicating copy to clipboard operation
eks-anywhere copied to clipboard

Refactoring installing of new components in workflows to decouple from full cluster.Spec

Open cxbrowne1207 opened this issue 1 year ago • 4 comments

Issue #, if available:

Context: The newly introduced sub command upgrade management-components currently has an issue where:

If you have an EKS Anywhere 1.24. You cannot update the management components if the cluster is using Kubernetes version 1.24, because the CLI runs into the following error: while building the new cluster spec

Error: failed to upgrade cluster: unable to get cluster config from file: kubernetes version 1.24 is not supported by bundles

It occurs while building the new cluster spec, when trying to pick the correct versions bundle for the cluster’s kubernetes version because Kubernetes 1.24 is not supported v0.19.0, and therefore, does not have an entry in the bundles.Spec.VersionsBundles where it’s selecting from.

To address this, we do not need to use the full cluster.Spec in the upgrade management components workflow.

Description of changes: This PR refactors ClusterManager.ApplyBundles and ClusterManager.ApplyReleases used in the workflow to not need the full cluster.Spec

Testing (if applicable):

--- PASS: TestVSphereKubernetes128UpgradeManagementComponents (753.53s)
PASS
--- PASS: TestVSphereKubernetes128UbuntuTo129Upgrade (2140.91s)
PASS

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.

cxbrowne1207 avatar Feb 15 '24 16:02 cxbrowne1207

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from cxbrowne1207. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

eks-distro-bot avatar Feb 15 '24 16:02 eks-distro-bot

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

eks-distro-bot avatar Feb 15 '24 16:02 eks-distro-bot

Codecov Report

Attention: Patch coverage is 46.96970% with 35 lines in your changes are missing coverage. Please review.

Project coverage is 73.52%. Comparing base (4583834) to head (1d26a9b). Report is 257 commits behind head on main.

Files Patch % Lines
cmd/eksctl-anywhere/cmd/options.go 0.00% 22 Missing :warning:
...eksctl-anywhere/cmd/upgrademanagementcomponents.go 0.00% 7 Missing :warning:
pkg/cluster/builder.go 69.23% 2 Missing and 2 partials :warning:
pkg/workflows/upgrade.go 33.33% 0 Missing and 2 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7605      +/-   ##
==========================================
+ Coverage   73.48%   73.52%   +0.03%     
==========================================
  Files         579      580       +1     
  Lines       36357    36683     +326     
==========================================
+ Hits        26718    26971     +253     
- Misses       7875     7935      +60     
- Partials     1764     1777      +13     

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

codecov[bot] avatar Feb 15 '24 16:02 codecov[bot]

/test eks-anywhere-presubmit

cxbrowne1207 avatar Feb 15 '24 19:02 cxbrowne1207

Closing this stale PR

cxbrowne1207 avatar Jun 28 '24 14:06 cxbrowne1207