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

Preflight upgrade validations for pod disruption budgets #5697

Merged
merged 2 commits into from
May 18, 2023

Conversation

mitalipaygude
Copy link
Member

@mitalipaygude mitalipaygude commented Apr 25, 2023

Issue #, if available:
#5189

Description of changes:
This PR introduces preflight upgrade validations for clusters having pod disruption budgets. If a cluster has any pod disruption budgets active on it, EKSA will error out for upgrade cluster command. We provide a flag for the users to skip the preflight validations if they wish to.

The design doc for this issue is here #5685

The help command looks like this:

This command is used to upgrade workload clusters

Usage:
  anywhere upgrade cluster [flags]

Flags:
      --bundles-override string             Override default Bundles manifest (not recommended)
.....
      --per-machine-wait-timeout string     Override the default machine wait timeout per machine (default "10m0s")
      --skip-validations stringArray        Bypass upgrade validations by name. Valid arguments you can pass are --skip-validations=pod-disruption
.....

Testing (if applicable):

  • Unit tests
  • Manually testing the CLI

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

@eks-distro-bot eks-distro-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 25, 2023
@mitalipaygude mitalipaygude marked this pull request as ready for review April 25, 2023 17:52
@codecov
Copy link

codecov bot commented Apr 27, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@b6bd71e). Click here to learn what that means.
The diff coverage is 96.29%.

@@           Coverage Diff           @@
##             main    #5697   +/-   ##
=======================================
  Coverage        ?   73.71%           
=======================================
  Files           ?      452           
  Lines           ?    37837           
  Branches        ?        0           
=======================================
  Hits            ?    27893           
  Misses          ?     8320           
  Partials        ?     1624           
Impacted Files Coverage Δ
pkg/validations/kubectl.go 100.00% <ø> (ø)
pkg/validations/validation_options.go 0.00% <0.00%> (ø)
pkg/dependencies/factory.go 76.20% <100.00%> (ø)
...idations/createvalidations/preflightvalidations.go 100.00% <100.00%> (ø)
...dations/upgradevalidations/poddisruptionbudgets.go 100.00% <100.00%> (ø)
...dations/upgradevalidations/preflightvalidations.go 100.00% <100.00%> (ø)
...tions/upgradevalidations/upgradeskipvalidations.go 100.00% <100.00%> (ø)

@mitalipaygude mitalipaygude force-pushed the pdb_checks branch 3 times, most recently from a74cd6a to dcbc2ef Compare May 4, 2023 05:59
@mitalipaygude mitalipaygude force-pushed the pdb_checks branch 2 times, most recently from 5feb51d to 80c33c4 Compare May 9, 2023 23:01
@pokearu
Copy link
Member

pokearu commented May 18, 2023

/lgtm
/woof

@eks-distro-bot
Copy link
Collaborator

@pokearu: dog image

In response to this:

/lgtm
/woof

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mitalipaygude
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mitalipaygude

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 1445873 into aws:main May 18, 2023
ddjjia pushed a commit to ddjjia/eks-anywhere that referenced this pull request Jun 8, 2023
* Preflight upgrade validations for pod disruption budgets

* update cluster
@mitalipaygude mitalipaygude deleted the pdb_checks branch June 18, 2024 17:34
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