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

Add warning to deprecate disableCSI through CLI #5918

Merged
merged 1 commit into from May 26, 2023

Conversation

vivek-koppuru
Copy link
Member

Issue #, if available:
#5517

Description of changes:
Adding a warning that this field and functionality will not be supporting starting from the next release. Making this the first warning that appears when running the CLI for create and upgrade if disableCSI is set to false, which means that the user expects to have the vsphere csi driver and storage class installed on the cluster. We have documentation today on what it entails to disable it and we will add more information to the docs about this deprecation: https://anywhere.eks.amazonaws.com/docs/reference/clusterspec/vsphere/#disablecsi-optional

Output:

⚠️  Warning: Installing CSI through EKS Anywhere is deprecated. Refer to the official documentation for more details on the disableCSI field in VSphereDatacenterConfig
✅ Connected to server

I looked into how to add a warning to the webhook when creating workload clusters through kubectl, and it doesn't seem to be straightforward. Openapi supports adding the deprecated field, but I can't find how to enable that through Kubebuilder except for kubebuilder:deprecatedversion, which deprecates the whole api. I looked into seeing if we can throw the warning through the Validating webhook to have the warning displayed, but it looks like it was just merged recently here. Our best option here instead of trying to find a different way to do it is to just throw the warning through the CLI and omit the warning for the controller, as this message will be displayed first to users through the CLI anyways when they create/upgrade their management clusters.

Testing (if applicable):
unit testing and functional testing

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/S Denotes a PR that changes 10-29 lines, ignoring generated files. label May 25, 2023
@codecov
Copy link

codecov bot commented May 25, 2023

Codecov Report

Merging #5918 (ccf576d) into main (e2d4fc4) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #5918   +/-   ##
=======================================
  Coverage   73.66%   73.67%           
=======================================
  Files         452      452           
  Lines       37887    37895    +8     
=======================================
+ Hits        27911    27919    +8     
  Misses       8359     8359           
  Partials     1617     1617           
Impacted Files Coverage Δ
pkg/providers/vsphere/vsphere.go 66.25% <100.00%> (+0.33%) ⬆️

Copy link
Member

@chrisnegus chrisnegus left a comment

Choose a reason for hiding this comment

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

I think the wording is fine. Did you mean to put a link to the docs in the message as well. A simple search for CSI came up with the right pages I think, so I think it's okay as it is.

func warnIfCSIEnabled(disableCSI bool) {
if !disableCSI {
// Need to add spacing to make the log message look neat
logger.MarkWarning(" Warning: Installing CSI through EKS Anywhere is deprecated. Refer to the official documentation for more details on " +
Copy link
Member

Choose a reason for hiding this comment

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

I think that wording is fine. Saying that something "is deprecated" means that it will be going away in the future, but has not gone away yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vivek-koppuru Do we have a ticket users can track? Its useful to include that in warnings. No worries if not.

Copy link
Member Author

Choose a reason for hiding this comment

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

We have this issue #5517 but if we feel that is not the right one, we can create a different one. I am still leaning towards putting it in our documentation and changelog and not here because I don't want to make the message bigger, unless we think that is not a problem.

@chrisnegus
Copy link
Member

/lgtm

@vivek-koppuru
Copy link
Member Author

I think the wording is fine. Did you mean to put a link to the docs in the message as well. A simple search for CSI came up with the right pages I think, so I think it's okay as it is.

I plan on updating the documentation but I didn't want to link it because the log message would get more verbose than it already is.

@chrisnegus
Copy link
Member

I think the wording is fine. Did you mean to put a link to the docs in the message as well. A simple search for CSI came up with the right pages I think, so I think it's okay as it is.

I plan on updating the documentation but I didn't want to link it because the log message would get more verbose than it already is.

That makes sense. I think it's fine.

@vivek-koppuru
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vivek-koppuru

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 b5f2b2e into aws:main May 26, 2023
10 checks passed
ddjjia pushed a commit to ddjjia/eks-anywhere that referenced this pull request May 26, 2023
ddjjia pushed a commit to ddjjia/eks-anywhere that referenced this pull request Jun 8, 2023
@vivek-koppuru vivek-koppuru deleted the warn-csi branch January 26, 2024 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved blocker lgtm size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants