-
Notifications
You must be signed in to change notification settings - Fork 838
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
Implements provider fields for subnets, securitygroups, launchtemplate, and instanceprofile. #681
Conversation
✔️ Deploy Preview for karpenter-docs-prod canceled. 🔨 Explore the source changes: 6064555 🔍 Inspect the deploy log: https://app.netlify.com/sites/karpenter-docs-prod/deploys/61468105be7db1000890b55e |
I took a first pass on the WIP, looking good! |
14a790d
to
c5db8d7
Compare
c5db8d7
to
43bc7f2
Compare
43bc7f2
to
c2bed57
Compare
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.
Just some preliminary comments after about ~20% ... looking good overall so far.
errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("%s not a valid URL", c.Endpoint), "endpoint")) | ||
for _, restricted := range RestrictedLabels { | ||
if strings.Contains(key, restricted) { | ||
errs = errs.Also(apis.ErrInvalidKeyName(key, "labels")) |
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.
Wondering if this error should be more descriptive? (Will it be obvious it's a restricted label?) Don't need to change, realize it was already like that.
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'm relying on the knative concept for invalid key name. This error message looks like invalid key name "kubernetes.io/arch": spec.labels
. Thoughts?
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.
it would be nice if it said "restricted" but that can wait until later
if err != nil || !endpoint.IsAbs() || endpoint.Hostname() == "" { | ||
errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("%s not a valid URL", c.Endpoint), "endpoint")) | ||
for _, restricted := range RestrictedLabels { | ||
if strings.Contains(key, restricted) { |
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.
Just curious what the intent is here? Just want to make sure we don't rather want something like startswith or something?
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.
Oh this is a really good catch! Moving to HasPrefix
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.
Overall looks good, have some minor comments but in general the changes look pretty mechanical in nature.
f9175f6
to
40b2e82
Compare
…, and instanceProfiles
40b2e82
to
6064555
Compare
errs = errs.Also(apis.ErrInvalidValue(fmt.Sprintf("%s not a valid URL", c.Endpoint), "endpoint")) | ||
for _, restricted := range RestrictedLabels { | ||
if strings.Contains(key, restricted) { | ||
errs = errs.Also(apis.ErrInvalidKeyName(key, "labels")) |
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.
it would be nice if it said "restricted" but that can wait until later
1. Issue, if available:
#661
2. Description of changes:
Implements provider fields for subnets, securitygroups, launchtemplate, and instanceprofile.
Currently none of these are overridable at the pod level. This is done intentionally to maintain separation of concerns between cluster operators and application developers. This may change if we get feature requests for this in the future.
3. Does this change impact docs?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.