forked from kubernetes-sigs/kubespray
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kubernetes-sigs#11521 from VannTen/cleanup/dedupli…
…cate_kubeadm_control_plane Use in inventory variables rather than patch files for kubeadm_patches
- Loading branch information
Showing
15 changed files
with
92 additions
and
59 deletions.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
--- | ||
dependencies: | ||
- role: kubernetes/kubeadm_common | ||
- role: kubernetes/tokens | ||
when: kube_token_auth | ||
tags: | ||
|
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
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,3 @@ | ||
--- | ||
dependencies: | ||
- role: kubernetes/kubeadm_common |
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,20 @@ | ||
--- | ||
kubeadm_patches_dir: "{{ kube_config_dir }}/patches" | ||
kubeadm_patches: [] | ||
# See https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/control-plane-flags/#patches | ||
# Correspondance with this link | ||
# patchtype = type | ||
# target = target | ||
# suffix -> managed automatically | ||
# extension -> always "yaml" | ||
# kubeadm_patches: | ||
# - target: kube-apiserver|kube-controller-manager|kube-scheduler|etcd|kubeletconfiguration | ||
# type: strategic(default)|json|merge | ||
# patch: | ||
# metadata: | ||
# annotations: | ||
# example.com/test: "true" | ||
# labels: | ||
# example.com/prod_level: "{{ prod_level }}" | ||
# - ... | ||
# Patches are applied in the order they are specified. |
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,17 @@ | ||
--- | ||
- name: Kubeadm | Create directory to store kubeadm patches | ||
file: | ||
path: "{{ kubeadm_patches_dir }}" | ||
state: directory | ||
mode: "0640" | ||
when: kubeadm_patches | length > 0 | ||
|
||
- name: Kubeadm | Copy kubeadm patches from inventory files | ||
copy: | ||
content: "{{ item.patch | to_yaml }}" | ||
dest: "{{ kubeadm_patches_dir }}/{{ item.target }}{{ suffix }}+{{ item.type | d('strategic') }}.yaml" | ||
owner: "root" | ||
mode: "0644" | ||
loop: "{{ kubeadm_patches }}" | ||
loop_control: | ||
index_var: suffix |
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