Skip to content
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

sig-cl/kubeadm/1739: update KEP for support of patching kubelet config #3312

Merged

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented May 16, 2022

  • One-line PR description:

    • Generalize the KEP to not only target static pods for the
      control plane
    • Add "kubeletconfiguration" target
  • Other comments:
    NONE

@neolit123 neolit123 added sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. kind/feature Categorizes issue or PR as related to a new feature. labels May 16, 2022
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 16, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: neolit123

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory approved Indicates a PR has been approved by an approver from all required OWNERS files. labels May 16, 2022
@neolit123
Copy link
Member Author

discussed here:
kubernetes/kubeadm#1682

related to:
kubernetes/kubernetes#109886

/cc @pacoxu
/hold for review

@k8s-ci-robot k8s-ci-robot requested a review from pacoxu May 16, 2022 16:39
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 16, 2022
@neolit123 neolit123 force-pushed the 1.25-kubeadm-patches-for-kubelet branch from ee449f3 to 6d38b8b Compare May 16, 2022 16:41
- Generalize the KEP to not only target static pods for the
control plane
- Add "kubeletconfiguration" target
@neolit123 neolit123 force-pushed the 1.25-kubeadm-patches-for-kubelet branch from 6d38b8b to c03f84d Compare May 16, 2022 16:49

During `init` patches for the kubelet are applied over the user provided and kubeadm defaulted
`KubeletConfiguration`. During `join/upgrade` patches are applied over the downloaded
from the cluster global `KubeletConfiguration`.
Copy link
Member

@pacoxu pacoxu May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The update LGTM.
My only concern is about how to make a new user notice this option and there is a patch for some components.

  • the documentation
  • maybe we can add some tips in the configmap/static-pod annotation like "kubeadm.kubernetes.io/patched.component=kube-apiserver".
  • some logs during kubeadm init/join/upgrade process.

Copy link
Member Author

@neolit123 neolit123 May 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the presence of a --patches flag or the option in config is the main indicator that components are being patched. And the user technically owns / maintains these flags and the config, so they must know what they are passing to kubeadm.

the documentation

I plan to update this page:
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/control-plane-flags/

maybe we can add some tips in the configmap annotation like "kubeadm.kubernetes.io/patched.component=kube-apiserver".

Today we do not annotate static pods whether they are modified from kubeadm defaults. There is this extra customization layer due to extraArgs, volumes and mounts that applies over the defaults. We assume the config file is the source of truth and users will be able to trace back changes to it. Patches are also a customization layer and we assume that new users should look at the node config and see there is a patches directory.

I think such an annotation is doable, but its not clear to me whether it's going to be a net positive addition for us and the users.

some logs during kubeadm init/join/upgrade process.

Yes, logs already print that a patch folder is being processed and what patches were found there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 17, 2022
@neolit123
Copy link
Member Author

neolit123 commented Jun 6, 2022

i'm considering doing a POC PR first, before merging this update in case we see something has to be adjusted.

EDIT: POC is here:
kubernetes/kubernetes#110405

@neolit123
Copy link
Member Author

the implementation seems OK. we just patch before writing the kubelet config to disk.
merging this proposal as is, but we can revisit if needed.

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 6, 2022
@k8s-ci-robot k8s-ci-robot merged commit 4f1db61 into kubernetes:master Jun 6, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.25 milestone Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. kind/kep Categorizes KEP tracking issues and PRs modifying the KEP directory lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants