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

Adds PodNodeSelector to the list of plugins to be configured #10733

Closed
wants to merge 6 commits into from

Conversation

titansmc
Copy link
Contributor

@titansmc titansmc commented Dec 19, 2023

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change
/kind bug
/kind cleanup
/kind design
/kind documentation
/kind failing-test

/kind feature

/kind flake

What this PR does / why we need it:

Those are the defaults but if I want to add another plugin that needs configuration to inventory/ops_k1/group_vars/k8s_cluster/k8s-cluster.yml it won't work, because the variables defined in main.yaml will take preference over what is written in the inventory. So the only way I have is to run kubespray like this, from now on:

Which issue(s) this PR fixes:

Fixes #10588

Adds PodNodeSelector to the list of plugins to be configured

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 19, 2023
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 19, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @titansmc. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 19, 2023
@VannTen
Copy link
Contributor

VannTen commented Dec 19, 2023

So, I've taken a closer look at what we do with that variable, and IMO we should not have it in defaults to be modified:
The admission_plugin which needs a config file are a bounded set (as they are compiled in the api-server), so we should rather list all the concerned plugins than expose a configuration knob which could be misused.

Could you add the plugin you care about in the list instead ? (that would be nice if you added all of the plugins which needs configuration, but that's not a requirements to merge)

Also, please follow the PR template and add a proper release note.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 19, 2023
@titansmc titansmc changed the title remove variable from default and passed to the inventory/sample/group… Adds PodNodeSelector to the list of plugins to be configured Dec 19, 2023
@titansmc
Copy link
Contributor Author

I see... @VannTen Let me know how it looks now

@VannTen
Copy link
Contributor

VannTen commented Dec 20, 2023

Just one more thing and I think we'll be good: I think with that change you can remove the task "Kubeadm | Configure default cluster podnodeslector" introduced in #10607 since I think it will be handled by the generic one just above.

@yankay
Copy link
Member

yankay commented Dec 21, 2023

Hi @titansmc

Follow https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#which-plugins-are-enabled-by-default. The kubespray may not have a solid reason to add the PodNodeSelector as the default plugins, But it's configurable.

Best Regards :-)

@VannTen
Copy link
Contributor

VannTen commented Dec 21, 2023

@yankay In that case it's not about defaults, but about which admission plugins needs a config file (which we use to conditionally push one)

@yankay
Copy link
Member

yankay commented Dec 21, 2023

@yankay In that case it's not about defaults, but about which admission plugins needs a config file (which we use to conditionally push one)

Thanks @VannTen

I got it. :-)

Follow the https://blog.opstree.com/2020/03/24/ansible-directory-structure-default-vs-vars/,

  • defaults mean “default variables for the roles,” and vars mean “other variables for the role.”
  • The priority of the vars is higher than that of defaults.

How about changing the kube_apiserver_admission_plugins_needs_configuration to roles/kubernetes/control-plane/defaults/main/main.yml?

@VannTen
Copy link
Contributor

VannTen commented Dec 21, 2023 via email

@VannTen
Copy link
Contributor

VannTen commented Jan 11, 2024

Just one more thing and I think we'll be good: I think with that change you can remove the task "Kubeadm | Configure default cluster podnodeslector" introduced in #10607 since I think it will be handled by the generic one just above.

@titansmc

@VannTen
Copy link
Contributor

VannTen commented Feb 20, 2024

@titansmc any chance you can address the previous comment ?

no need for this task since it is handled when adding the configuration of the plugin by default
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 29, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: titansmc
Once this PR has been reviewed and has the lgtm label, please assign liupeng0518 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@titansmc
Copy link
Contributor Author

@VannTen should be fine now

@VannTen
Copy link
Contributor

VannTen commented Feb 29, 2024

Yeah, that's fine this way ! 👍
Can you just squash your commit (at least the two first) and modify the commit message ? Currently it does not reflect what it's actually modifying ^^.

Copy link

CLA Missing ID CLA Not Signed

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. and removed cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 20, 2024
@titansmc
Copy link
Contributor Author

I think I managed to screw it up even more....not sure how to follow from here

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 18, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jul 18, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions 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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 26, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

move roles/kubernetes/control-plane/vars/main.yaml to roles/kubernetes/control-plane/defaults/main/main.yml`
5 participants