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
Do not fail on valid flag combinations for managed ngs #3930
Do not fail on valid flag combinations for managed ngs #3930
Conversation
func validateManagedNGFlags(cmd *cobra.Command, managed bool) error { | ||
flagsValidOnlyWithMNG := []string{"spot", "instance-types"} | ||
if managed { | ||
return nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is the func call validateManagedFlags
and a bool is passed in to indicate its managed? Is it not called because its validating flags for managed nodes? 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it was named to validate the use of managed flags (not managed nodegroup flags), now it only checks for the use of managed flags on unmanaged ngs
it is confusing because technically it is named accurately, but we use "managed" as a shorthand for "managed nodegroups" so our minds fill in a gap which is not there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohhhh. Gotcha. Since for managed its always if managed; return nil
would it make sense to move that logic outside of the func? Might make it less confusing
i think it was named to validate the use of managed flags (not managed nodegroup flags), now it only checks for the use of managed flags on unmanaged ngs
it does have NG in the func name though 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to move that logic outside of the func? Might make it less confusing
i did think about that, and decided to do the if thing
in one place rather than more than 1, don't really care tho 🤷♀️
it does have NG in the func name though
oh shit yeh, what was i reading 🤣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, 1 nit
oh lol automerge was enabled. smh |
you only have yourself to blame tbh |
totally not the fault of the person who enabled it 🤷 |
stop approving unapprovable crap! |
it was approvalable, my comments were just a nit |
hmmm i wouldn't have approved it |
* Tag 0.56.0-rc.0 release candidate * Do not fail on valid flag combinations for managed ngs (#3930) Co-authored-by: Niki <18622989+nikimanoledaki@users.noreply.github.com> Co-authored-by: Claudia <claudiaberesford@gmail.com>
Description
Fixes #3929
Checklist
README.md
, or theuserdocs
directory)area/nodegroup
) and kind (e.g.kind/improvement
)BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯