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

Generate snow provider environment variable map using management components #7568

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

cxbrowne1207
Copy link
Member

@cxbrowne1207 cxbrowne1207 commented Feb 13, 2024

Issue #, if available:

Context:

The newly introduced upgrade management-components commands is currently building a new cluster spec and running validations against it. We do not want to do this because the users cluster spec updates are not applied while upgrading management components. Specifically, one problem that arises is that if your cluster is currently running a deprecated version of Kubernetes in EKS Anywhere (right now Kubernetes 1.24), the CLI will fail upgrading the management components when 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 

This is because Kubernetes 1.24 is not supported now and does not exist in the new bundles .

As a solution to this, we want to remove the need to build the new full cluster.Spec in the upgrade management-components workflow. For this to be possible, we need to remove the need for the cluster.Spec when accessing management component information during the upgrade.

Description of changes:
This PR changes the snow provider to generate the environment variable map information using management components. It still uses the *cluster.Spec (presumably the current cluster spec) for any addition information, for snow the credentials secret

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
Copy link
Collaborator

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

@cxbrowne1207 cxbrowne1207 changed the title Generate snow provider environment variable map from management components Generate snow provider environment variable map using management components Feb 13, 2024
@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 13, 2024
@cxbrowne1207 cxbrowne1207 marked this pull request as ready for review February 13, 2024 18:18
Copy link

codecov bot commented Feb 13, 2024

Codecov Report

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

Comparison is base (4583834) 73.48% compared to head (b70a403) 73.56%.
Report is 47 commits behind head on main.

Files Patch % Lines
pkg/workflows/management/create_workload.go 0.00% 5 Missing and 1 partial ⚠️
pkg/providers/tinkerbell/validate.go 73.68% 4 Missing and 1 partial ⚠️
release/api/v1alpha1/artifacts.go 0.00% 4 Missing ⚠️
pkg/workflows/management/secrets.go 80.00% 3 Missing ⚠️
pkg/clustermanager/cluster_manager.go 88.23% 2 Missing ⚠️
pkg/providers/nutanix/controlplane.go 92.00% 1 Missing and 1 partial ⚠️
pkg/providers/snow/snow.go 0.00% 2 Missing ⚠️
pkg/workflows/workload/create_gitops.go 84.61% 2 Missing ⚠️
pkg/workflows/workload/post_delete.go 84.61% 2 Missing ⚠️
cmd/eksctl-anywhere/cmd/deletecluster.go 0.00% 1 Missing ⚠️
... and 8 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7568      +/-   ##
==========================================
+ Coverage   73.48%   73.56%   +0.07%     
==========================================
  Files         579      580       +1     
  Lines       36357    36504     +147     
==========================================
+ Hits        26718    26854     +136     
- Misses       7875     7887      +12     
+ Partials     1764     1763       -1     

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

Copy link
Member

@g-gaston g-gaston left a comment

Choose a reason for hiding this comment

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

/lgtm

@cxbrowne1207
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cxbrowne1207

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

@eks-distro-bot eks-distro-bot merged commit c9fa512 into aws:main Feb 13, 2024
12 checks passed
@cxbrowne1207 cxbrowne1207 deleted the mc-providers-env-map branch February 13, 2024 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants