-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
Replace the inventory group kube-master with kube_control_plane #7256
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,15 @@ | |
- name: Check ansible version | ||
import_playbook: ansible_version.yml | ||
|
||
- name: Add kube-master nodes to kube_control_plane | ||
# This is for old inventory which contains kube-master instead of kube_control_plane | ||
hosts: kube-master | ||
gather_facts: false | ||
tasks: | ||
- name: add nodes to kube_control_plane group | ||
group_by: | ||
key: 'kube_control_plane' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm wondering if in some cases we loose the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the above case(kube-master exists instead of kube_control_plane), kube_control_plane has the same instances as kube-master and these instances are in k8s-cluster. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm just not sure how defaults work anymore, server mix the defaults from all groups they are in, or when you ask for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, I am testing this PR locally to see the above question. /hold There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. confirmed this PR works with old inventory which contain kube-master instead of kube_control_plane. /hold cancel There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for checking ! |
||
|
||
- hosts: bastion[0] | ||
gather_facts: False | ||
environment: "{{ proxy_disable_env }}" | ||
|
@@ -66,7 +75,7 @@ | |
- { role: kubespray-defaults } | ||
- { role: kubernetes/node, tags: node } | ||
|
||
- hosts: kube-master | ||
- hosts: kube_control_plane | ||
gather_facts: False | ||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" | ||
environment: "{{ proxy_disable_env }}" | ||
|
@@ -94,15 +103,15 @@ | |
- { role: kubespray-defaults } | ||
- { role: network_plugin/calico/rr, tags: ['network', 'calico_rr'] } | ||
|
||
- hosts: kube-master[0] | ||
- hosts: kube_control_plane[0] | ||
gather_facts: False | ||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" | ||
environment: "{{ proxy_disable_env }}" | ||
roles: | ||
- { role: kubespray-defaults } | ||
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] } | ||
|
||
- hosts: kube-master | ||
- hosts: kube_control_plane | ||
gather_facts: False | ||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" | ||
environment: "{{ proxy_disable_env }}" | ||
|
@@ -114,7 +123,7 @@ | |
- { role: kubernetes-apps/ingress_controller, tags: ingress-controller } | ||
- { role: kubernetes-apps/external_provisioner, tags: external-provisioner } | ||
|
||
- hosts: kube-master | ||
- hosts: kube_control_plane | ||
gather_facts: False | ||
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" | ||
environment: "{{ proxy_disable_env }}" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
- hosts: kube-master[0] | ||
- hosts: kube_control_plane[0] | ||
roles: | ||
- { role: tear-down } | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ all: | |
vars: | ||
kubelet_fail_swap_on: false | ||
children: | ||
kube-master: | ||
kube_control_plane: | ||
hosts: | ||
node1: | ||
etcd: | ||
|
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.
I see that this task/play is copied pasted in multiple file, could you factor that in a file and use import_playbook ?
This will help to finish moving away from invalid group name
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.
I want to keep here as it and will do cleanup with another PR because this already takes much time.
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.
ok for me