-
Notifications
You must be signed in to change notification settings - Fork 960
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
Discuss defaulting behavior #1449
Comments
I like having this in Provisioner spec and not memory so that it's a more deterministic behavior and more easily accessible. I could see a use-case for not wanting to have this in the spec for configuration bloat, but since it's a defaulted option, I don't think this puts extra strain on initial configuration. Additionally, if the user wants, this would make it more apparent that they can configure this. WDYT? |
There's a difference in semantic. In one case, the user says "I don't care", and Karpenter defaults to something forever. In the other case, the user days "I don't care", and Karpenter defaults to something that can vary with the install version. We're faced with the challenge of picking the best semantic for the situation. I'm not sure I'm convinced either way yet. I agree that there are definitely side effects of "discoverability", but I think that should be a cli/ui decision, and not impact the semantic mentioned above. |
@ellistarn I think that as a consumer if I don't specify something I want Karpenter to make the decision for me, and I want Karpenter to keep doing this; I don't want Karpenter stuck using what seemed like the right choice when the resource was created. There are techniques in K8s that would allow both dynamicly changing values and the current version to be in the resource (field ownership) but it would add overhead and IMHO make it much harder to understand (you'd need to set |
Ack! We've also been preferring in-memory defaults, which achieves what you're talking about. |
And is idiomatic k8s behaviour. |
I recently discovered that if you use terraform to create the Karpenter provisioner, you need to provide all of our default values to terraform or it will fail to apply cleanly:
This particular error is because of the architecture defaulting, but a similar error occurs due to the kind and apiVersion on the provider. |
@tzneal how did you add the provisioner with TF? |
I put up a PR documenting it at: #1551 Also, I never used TF before this morning, so I would appreciate anyone that's used it before reviewing. |
What versions of TF, TF K8s provider and K8s are you using? |
TF: Terraform v1.1.7
I just went through the "getting started with terraform" docs on karpenter.sh and added in the provisioner at the end. |
@tzneal have you followed the docs for computed fields? This is expected behaviour. That said I'd personally try the TF kubectl provider with |
Maybe I was using computed_fields incorrectly, but it didn't appear to work unless I provided some default value in my specification. I interpreted this from the docs: I got started down this path due to a question in Slack from someone trying to use |
Did you try adding all the dynamic fields (modified & created) to |
Moving discussion to the #1551 |
Tell us about your request
I created a simple provisioner:
Here's what I got:
Here's what I'm not sure about:
amiFamily: AL2
should probably default in memory, rather than defaulting into the spec. This allows the user to be unaware of Karpenter's default, should it change over time. By not specifying AMIFamily, I'm really saying that I don't care.kubeletConfiguration: {}
should be omitted, since we useomitempty
. It's not clear why this is persisted.apiVersion: extensions.karpenter.sh/v1alpha1, kind: AWS
. This feels really crufty. It would be great if we modeled this with a separate vendor specific CRD. This is a breaking change and a good candidate for v1beta1 Laundry List #1327Attachments
If you think you might have additional information that you'd like to include via an attachment, please do - we'll take a look. (Remember to remove any personally-identifiable information.)
Community Note
The text was updated successfully, but these errors were encountered: