-
Notifications
You must be signed in to change notification settings - Fork 40
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
Required selectors in configs #329
Comments
Maybe a cleaner API would be conditionals: |
- annotationSelector: 'instancemgr.keikoproj.io/arch = arm64,instancemgr.keikoproj.io/os-family = amazonlinux2'
> required: true
defaults:
spec:
eks:
configuration:
image: {{ .ArmImage }} But if I understand the ask correctly, it would mean if it's REQUIRED and the annotations are matching the selector, then we DO NOT allow the global default to be used as fallback. In the case of image this would mean a failure, but it might not mean a failure in cases of other specs such as ones that have default values or ones that are not required fields. @backjo any thoughts on this? |
I'm not sure I fully understand the use case - if I have it right, the intention is to enforce the existence of annotations on IGs dynamically through a rule mechanism - is that correct? |
This use-case can be discretely categorized as there’s specific required annotations that would be important for certain IGs, architecture is one good example you cannot fallback to an x86 configuration Ami when you need that IG to be exclusively arm64
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Jonah Back ***@***.***>
Sent: Thursday, September 9, 2021 5:22:06 PM
To: keikoproj/instance-manager ***@***.***>
Cc: Kevin Downey ***@***.***>; Author ***@***.***>
Subject: Re: [keikoproj/instance-manager] Required selectors in configs (#329)
I'm not sure I fully understand the use case - if I have it right, the intention is to enforce the existence of annotations on IGs dynamically through a rule mechanism - is that correct?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#329 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAIQJMAJXAPS426X3LAZSDDUBFFS5ANCNFSM5DTHAUBQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@kevdowney I think this is the case currently, meaning if you try to use the below, an annotated IG will end up in failed state: conditionals: |
- annotationSelector: 'instancemgr.keikoproj.io/arch = arm64,instancemgr.keikoproj.io/os-family = amazonlinux2'
defaults:
spec:
eks:
configuration:
image: "" But I think the problem is if you REMOVE the conditional entirely, then you end up with a situation that annotated IGs gets the global default - which could be an incompatible AMI. TBH, not sure we can/should support this use case, or I don't see how it's possible. The only possible change I see, is to add some sort of controller logic for the annotation Otherwise I don't see how we can achieve what you're asking. |
Is this a BUG REPORT or FEATURE REQUEST?:
FEATURE
What happened:
We would like to treat certain conditionals as a specific rules match when the annotations are required.
Currently the conditionals are pure overrides and seem to work as a cascading config override so the last matching selector config wins but having a selector can be required in certain instances like
architecture
.Currently this is how we have to specify architecture support but this does not enforce required selector to match.
What you expected to happen:
This could be done via a
required
annotationrequired.instancemgr.keikoproj.io/arch = arm64
or required conditionals section so any rules miss would result in an error condition.How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
Other debugging information (if applicable):
The text was updated successfully, but these errors were encountered: