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

Allow control plane static pods #120

Merged
merged 4 commits into from
May 26, 2021
Merged

Allow control plane static pods #120

merged 4 commits into from
May 26, 2021

Conversation

bjw-s
Copy link
Contributor

@bjw-s bjw-s commented May 26, 2021

Allow control plane static pods

Summary

This adds support for specifying static pod manifests through k3s_server_pod_manifests_templates, similar to how automatic manifests are being pre-configured with k3s_server_manifests_templates.

Fixes #118

Issue type

  • Feature

Test instructions

  • Add a manifest to k3s_server_pod_manifests_templates, it should be deployed on all control plane nodes.
  • K3s will start the manifest regardless of node state.

bjw-s added 3 commits May 26, 2021 09:43
Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
Copy link

@toboshii toboshii left a comment

Choose a reason for hiding this comment

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

LGTM, should make deploying kube-vip much easier. 🚀

@bjw-s
Copy link
Contributor Author

bjw-s commented May 26, 2021

@xanmanning I noticed you assigned me to the PR, is there anything you want me to do/change before you review it? 🙂

@xanmanning xanmanning assigned xanmanning and unassigned bjw-s May 26, 2021
@xanmanning xanmanning added the enhancement New feature or request label May 26, 2021
@xanmanning
Copy link
Member

Sorry @bjw-s , I was meant to assign myself but I was doing it from my phone whilst waiting about between jobs so a bit absent minded.

I've changed it to me and I'll review it after work tonight 😃

@bjw-s
Copy link
Contributor Author

bjw-s commented May 26, 2021

No problem! ☺️

README.md Outdated Show resolved Hide resolved
@@ -39,6 +39,11 @@
- k3s_primary_control_node
- k3s_server_manifests_templates | length > 0

- import_tasks: build/preconfigure-k3s-static-pod-manifests.yml
when:
- k3s_control_node
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it make sense to make this k3s_primary_control_node ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It depends I guess? If you want to deploy Pods there (such as for kube-vip), I think the manifest should go on all of the control plane nodes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

You are probably right, let's keep it this way. I know for the other manifest option it makes sense to put them on a single controller node. Static pods might behave differently.

Copy link

@toboshii toboshii May 26, 2021

Choose a reason for hiding this comment

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

Static pods are directly tied to their kubelet (they're essentially a container outside of the cluster, represented by a mirror object inside the cluster) therefore they must be deployed individually to each control node.

Copy link
Member

@xanmanning xanmanning left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for looking into this 🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Option to deploy manifests to /var/lib/rancher/k3s/agent/pod-manifests
4 participants