-
Notifications
You must be signed in to change notification settings - Fork 425
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
feat: AKS node pool KubeletConfig #2781
feat: AKS node pool KubeletConfig #2781
Conversation
6606fed
to
daf25f7
Compare
/retest |
29d04c5
to
1426f3c
Compare
d99e068
to
75a9cce
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 a thought below.
Also, thanks for putting this together!
azure/scope/managedmachinepool.go
Outdated
@@ -303,3 +307,41 @@ func (s *ManagedMachinePoolScope) GetCAPIMachinePoolAnnotation(key string) (succ | |||
val, ok := s.MachinePool.Annotations[key] | |||
return ok, val | |||
} | |||
|
|||
func getKubeletConfig(k *infrav1exp.KubeletConfig) *agentpools.KubeletConfig { |
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 a thought, Is there a way we can pull out this code to a common, shared lib so that we don't need to maintain three implementations of the similar definition going ahead?
I am pointing to the getKubletConfig
func tagged here, at azure/converters/managedagentpool.go:55, and azure/services/agentpools/spec.go:286
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.
each transformation is actually slightly different! @nojnhuh may have some ideas, I'm confident generics would help us but that would require a farily significant refactor (I think)
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.
also, I've been aiming to just get this changeset to a functional place, definitely open to suggestions about how to do these struct transformations in less painful way
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.
each transformation is actually slightly different!
Ah yes!
if len(k.AllowedUnsafeSysctls) > 0 {
ret.AllowedUnsafeSysctls = &k.AllowedUnsafeSysctls
}
vs
if k.AllowedUnsafeSysctls != nil {
ret.AllowedUnsafeSysctls = k.AllowedUnsafeSysctls
}
Sorry, I didn't catch this!
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.
By the way, some follow-up, this translation wasn't required at all, not sure what I did wrong the first time around!
cc @nojnhuh
75a9cce
to
5e2697e
Compare
5e2697e
to
8723cdd
Compare
I am testing this PR but I have some issues: I am testing with
when I try to apply the
I got the cluster-api-provider-azure/docs/book/src/topics/managedcluster.md Lines 419 to 432 in 8723cdd
Not sure why the yaml produces this difference:
|
Not sure if this is related: It seems the root cause is in the enum being an array ? Lines 230 to 238 in 8723cdd
|
8723cdd
to
b475254
Compare
7b870b7
to
db6242b
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.
Added some thoughts. Thanks for updating the flavors yamls, made my testing much easier!
This comment was marked as outdated.
This comment was marked as outdated.
db6242b
to
03df0e6
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.
Thanks! 🚀
/lgtm
03df0e6
to
6b5f412
Compare
6b5f412
to
cb096bd
Compare
Tested it again, works as expected.
/lgtm |
cb096bd
to
0443674
Compare
@nawazkh for final lgtm after rebase, thank you! |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jackfrancis 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 |
@@ -109,3 +109,17 @@ spec: | |||
enableNodePublicIP: false | |||
scaleSetPriority: Regular | |||
name: pool1 | |||
kubeletConfig: |
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.
Do these values match the AKS default or best practices? If not, what's the intention behind including them in the AKS flavor reference template?
(just curious, not blocking)
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.
Good question:
- prefer a value that isn't the AKS default
- so long as that value isn't too interesting (and could thus interfere with other features and/or E2E tests)
Basically: wanting to make sure that we engage the actual feature in some way (for AKS to actually build a "configured" node pool) without providing a materially different operational outcome.
Are we concerned that the non-tested "reference" template is getting too interesting? Or do we prefer to expose as much configuration as possible as a feature reference? We can always simplify these configurations for the reference templates and triage them to the test/ci
templates only...
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.
Are we concerned that the non-tested "reference" template is getting too interesting? Or do we prefer to expose as much configuration as possible as a feature reference?
Yes that's my main concern as far as I know some users are actually using that reference template as base and then applying their own kustomizations to it so I would consider those templates we publish as assets to be "best practice" examples and therefore we should avoid using them to configure random values for testing purposes as it may not be clear to a user what is there because it's needed for proper configuration vs. what was added solely for testing purposes
We can always simplify these configurations for the reference templates and triage them to the test/ci templates only
That's seems reasonable
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.
How do we feel about doing that independent of this PR (cleaning up the reference AKS template so it only has the minimum, required configuration)?
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.
That's fine (I see it's already merged) but let's add that to the milestone to make sure we do it before the template gets published as part of the release
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 this is what we want: #2913
/retest |
1 similar comment
/retest |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR adds the AKS node pool feature "KubeletConfig", based on this:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2761
Special notes for your reviewer:
Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.
TODOs:
Release note: