-
Notifications
You must be signed in to change notification settings - Fork 130
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
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next
Next commit
Allow control plane static pods
Signed-off-by: Bᴇʀɴᴅ Sᴄʜᴏʀɢᴇʀs <me@bjw-s.dev>
- Loading branch information
commit 1bbba0423007818e59fbc21ada5a5cd500afbd28
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
|
||
- name: Ensure that the staticpods directory exists | ||
ansible.builtin.file: | ||
state: directory | ||
path: "{{ k3s_server_staticpods_dir }}" | ||
mode: 0755 | ||
when: k3s_server_staticpods_templates | length > 0 | ||
become: "{{ k3s_become_for_directory_creation | ternary(true, false, k3s_become_for_all) }}" | ||
|
||
# https://github.com/k3s-io/k3s/pull/1691 | ||
- name: Ensure static pod manifests are copied to controllers | ||
ansible.builtin.template: | ||
src: "{{ item }}" | ||
dest: "{{ k3s_server_staticpods_dir }}/{{ item | basename | replace('.j2','') }}" | ||
mode: 0644 | ||
loop: "{{ k3s_server_staticpods_templates }}" | ||
become: "{{ k3s_become_for_directory_creation | ternary(true, false, k3s_become_for_all) }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does it make sense to make this
k3s_primary_control_node
?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.
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.
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.
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.
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.
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.