-
Notifications
You must be signed in to change notification settings - Fork 4k
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
allow users to avoid aws instance not found spam #6265
Conversation
// nodes that belong to an asg that is not autoscaled will not be found in the asgCache below | ||
// do not spam warnings about them being unable to be found | ||
// users that see this error can add an annotation to their nodes to avoid it | ||
if node.Annotations != nil && node.Annotations["k8s.io/cluster-autoscaler/enabled"] == "false" { |
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.
Can we add a test confirming this works correctly?
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.
yes, I can add tests if anyone with merge permission can confirm this is a good approach
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.
This seems fine to me, yes.
Rather: imo the ideal approach would be to just have that error be logged at a lower verbosity, but I think that's going to be non-trivial to accomplish given how the code is currently organized, so this seems fine as an alternate solution.
422d133
to
2b8874d
Compare
improved comment, added test |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: drmorr0, grosser 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 |
Attempting to manually add this annotation to an existing node will fail -
Note that the use of the This could be fixed by using an alternative key format, such as I'll pull a PR together for this. |
thx for checking/fixing! :)
…On Mon, Nov 20, 2023 at 4:47 AM Brydon Cheyney ***@***.***> wrote:
k8s.io/cluster-autoscaler/enabled is not a valid annotation key -
https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/#syntax-and-character-set
- which expects only a *single* DNS prefix.
Attempting to manually add this annotation to an existing node will fail -
# nodes "ip-XXX-XXX-XXX-XXX.ec2.internal" was not valid:
# * metadata.annotations: Invalid value: "k8s.io/cluster-autoscaler/enabled": a qualified name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyName', or 'my.name', or '123-abc', regex used for validation is '([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]') with an optional DNS subdomain prefix and '/' (e.g. 'example.com/MyName')
Note that the use of the k8s.io/cluster-autoscaler/enabled *tag* is valid
within AWS.
This could be fixed by using an alternative key format, such as
k8s.io/cluster-autoscaler-enabled
I'll pull a PR together for this.
—
Reply to this email directly, view it on GitHub
<#6265 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAACYZ5UCSTVBJR4T5RQ4L3YFNGPVAVCNFSM6AAAAAA7FAKB4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJZGAYDENZYGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Curious why we have used node.annotation here instead of a label for example? As far as I can see there is no easy way to automatically annotate nodes in EKS as this is not an available argument in the eks_bootstrap.sh. |
What type of PR is this?
/kind bug
What this PR does / why we need it:
allows users to mark nodes for "do not spam me about missing aws instance"
Which issue(s) this PR fixes:
fixes #6096
Special notes for your reviewer:
not ready to be merged, just for discussion
Does this PR introduce a user-facing change?