-
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
Conversation
WORK_NOTE: Basically this work is done with the script:
But we need to take care of the following things by hands:
|
08975ea
to
d58153a
Compare
Can we take this opportunity to replace |
TBH I cannot find concrete naming rule document, but
But this PR is already XL size. |
https://github.com/kubernetes-sigs/kubespray/blob/master/ansible.cfg#L7 |
d58153a
to
1fdc51f
Compare
1fdc51f
to
a355a45
Compare
a355a45
to
399e8e9
Compare
packet_debian9-calico-upgrade job was failed as https://gitlab.com/kargo-ci/kubernetes-sigs-kubespray/-/jobs/1053891745
That seems inventory-builder needs to output kube-master to pass this job. |
399e8e9
to
376693e
Compare
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 comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if in some cases we loose the k8s-cluster
groups_vars
.
Does a play with hosts: kube_control_plane
get groups_vars
from k8s-cluster
?
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.
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.
Can this be answer for your question?
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'm just not sure how defaults work anymore, server mix the defaults from all groups they are in, or when you ask for hosts: kube_control_plane
, you will get the server vars, the vars for kube_control_plane
and not the vars from k8s-cluster
because kube_control_plane
is not in k8s-cluster
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, 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking !
Need to rebase |
2bd1429
to
a19bc68
Compare
/hold cancel |
/cc @EppO |
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.
Some file that need modification I think
contrib/terraform/upcloud/templates/inventory.tpl
.gitlab-ci.yml
.gitlab-ci/packet.yml
And you need to rebase on latest master and fix
roles/kubernetes/control-plane/templates/k8s-certs-renew.timer.j2
(I just did git grep kube-master
)
@@ -2,6 +2,15 @@ | |||
- name: Check ansible version | |||
import_playbook: ansible_version.yml | |||
|
|||
- name: Add kube-master nodes to kube_control_plane |
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
@@ -4,6 +4,9 @@ instance-{{ loop.index }} ansible_ssh_host={{instance.stdout}} | |||
{% endfor %} | |||
|
|||
{% if mode is defined and mode in ["separate", "separate-scale"] %} | |||
[kube_control_plane] | |||
instance-1 | |||
|
|||
[kube-master] | |||
instance-1 |
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.
why do you keep [kube-master]
here ? (multiple occurrences in this file)
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.
Yes, we need to keep this for passing upgrading test which is from stable version.
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.
Maybe put a #TODO: remove after 2.1X
Thanks for your review, that is a nice point. |
a19bc68
to
dfee7bd
Compare
@@ -3,7 +3,7 @@ | |||
${connection_strings_master} | |||
${connection_strings_worker} | |||
|
|||
[kube-master] | |||
[kube_control_plane] |
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 forgot to change line 16
This replaces kube-master with kube_control_plane because of [1]: The Kubernetes project is moving away from wording that is considered offensive. A new working group WG Naming was created to track this work, and the word "master" was declared as offensive. A proposal was formalized for replacing the word "master" with "control plane". This means it should be removed from source code, documentation, and user-facing configuration from Kubernetes and its sub-projects. NOTE: The reason why this changes it to kube_control_plane not kube-control-plane is for valid group names on ansible. [1]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint/README.md#motivation
dfee7bd
to
b152b17
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: champtar, floryut, oomichi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/lgtm |
This replaces kube-master with kube_control_plane because of [1]: The Kubernetes project is moving away from wording that is considered offensive. A new working group WG Naming was created to track this work, and the word "master" was declared as offensive. A proposal was formalized for replacing the word "master" with "control plane". This means it should be removed from source code, documentation, and user-facing configuration from Kubernetes and its sub-projects. NOTE: The reason why this changes it to kube_control_plane not kube-control-plane is for valid group names on ansible. [1]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint/README.md#motivation
This replaces kube-master with kube_control_plane because of [1]: The Kubernetes project is moving away from wording that is considered offensive. A new working group WG Naming was created to track this work, and the word "master" was declared as offensive. A proposal was formalized for replacing the word "master" with "control plane". This means it should be removed from source code, documentation, and user-facing configuration from Kubernetes and its sub-projects. NOTE: The reason why this changes it to kube_control_plane not kube-control-plane is for valid group names on ansible. [1]: https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/kubeadm/2067-rename-master-label-taint/README.md#motivation
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
This replaces kube-master with kube_control_plane because of 1:
NOTE: The reason why this changes it to kube_control_plane not kube-control-plane is for valid group names on ansible.
Which issue(s) this PR fixes:
Fixes # #7157
Does this PR introduce a user-facing change?: