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

fix: Fix volume size validation #6072

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

jonathan-innis
Copy link
Contributor

@jonathan-innis jonathan-innis commented Apr 21, 2024

Fixes #6055

Description

This fixes the volume size string validation that should have already been performed to ensure that the resource value must be one of T, Ti, G, or Gi. You could bypass this check by specifying an integer; however, etcd would store this value as a string somewhere down the line which would cause us to fail to delete the EC2NodeClass.

There's an open issue against controller-gen to try and dig deeper into what causes the integer to be able to circumvent this validation but then pass through the validation later, causing it to fail.

How was this change tested?

make presubmit

Does this change impact docs?

  • Yes, PR includes docs updates
  • Yes, issue opened: #
  • No

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@jonathan-innis jonathan-innis requested a review from a team as a code owner April 21, 2024 22:55
Copy link

netlify bot commented Apr 21, 2024

Deploy Preview for karpenter-docs-prod canceled.

Name Link
🔨 Latest commit a30e284
🔍 Latest deploy log https://app.netlify.com/sites/karpenter-docs-prod/deploys/6625997f607b940008a701ee

@coveralls
Copy link

Pull Request Test Coverage Report for Build 8776080220

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.02%) to 81.963%

Files with Coverage Reduction New Missed Lines %
pkg/providers/amifamily/ami.go 1 90.32%
Totals Coverage Status
Change from base Build 8769944868: -0.02%
Covered Lines: 5394
Relevant Lines: 6581

💛 - Coveralls

@jonathan-innis jonathan-innis enabled auto-merge (squash) April 21, 2024 23:48
Copy link
Contributor

@jigisha620 jigisha620 left a comment

Choose a reason for hiding this comment

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

LGTM

@jonathan-innis jonathan-innis merged commit 3ab2b06 into aws:main Apr 23, 2024
16 checks passed
@jonathan-innis jonathan-innis deleted the fix-volume-size-validation branch April 23, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

EC2NodeClass Validation Doesn't detect malformed blockDeviceMappings.ebs.volumeSize value
3 participants