fix(kubernetes/preinstall): skip when dir is empty - #13424
Conversation
|
Hi @shaleenbathla. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
5c1c918 to
cf6c599
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: neilamoore, shaleenbathla The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
The change itself looks good, but it only fixes the dir creation. A few more things are needed before
Nit: release note says |
Wrap staticPodPath in the kubelet config template with a conditional so an empty kube_manifest_dir does not render `staticPodPath: (null)`, making the intent explicit. Document kube_manifest_dir in vars.md and add a hardening example, noting it must only be set to "" in worker group_vars (control plane always needs the manifests dir for kubeadm) and is only supported with an external loadbalancer_apiserver. Signed-off-by: Shaleen Bathla <shaleen.bathla@servicenow.com>
cf6c599 to
dc18681
Compare
thanks for the review @guoard. updated release note, added explicit conditional, added docs |
|
Thank you for your contribution. |
The first can be asserted against, and IMO should be as this can do some damage on a cluster. (validate_inventory should be good enough for that). Also, nit, but IMO item != "" is clearer on the intent than using length > 0. |
what about when item is a list and not string? |
|
> but IMO item != "" is clearer on the intent than using length > 0
what about when item is a list and not string?
Well those are paths right ? A list would not make sense here. If you
mean in general, well, I'd just just == [] for lists. (but I tend to
filter the list before the loop with select anyway ^^)
…--
Max Gautier
|
useful especially for setting manifests dir as empty
What type of PR is this?
/kind bug
What this PR does / why we need it:
allows setting kube_manifests dir as empty and we should rightfully skip when other dir are empty as well
Which issue(s) this PR fixes:
Fixes #13281
Special notes for your reviewer:
Does this PR introduce a user-facing change?: