From ddbf7a71a87793e3338e083a3aa241ef326f4fea Mon Sep 17 00:00:00 2001 From: Xan Manning Date: Sat, 14 Nov 2020 14:15:19 +0000 Subject: [PATCH] Updated terminology to remove references to "master" --- .travis.yml | 6 +++--- README.md | 12 ++++++------ meta/main.yml | 2 +- tasks/build/configure-k3s-cluster.yml | 6 +++--- tasks/build/preconfigure-k3s.yml | 6 +++--- ...k-master-count.yml => check-controller-count.yml} | 0 tasks/validate/main.yml | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) rename tasks/validate/{check-master-count.yml => check-controller-count.yml} (100%) diff --git a/.travis.yml b/.travis.yml index ab2f26d..c96143f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,16 +30,16 @@ env: - MOLECULE_DISTRO: geerlingguy/docker-fedora31-ansible:latest MOLECULE_PLAYBOOK: playbook-no-deploy.yml - # Test multiple masters in control plane with PostgreSQL + # Test multiple controllers in control plane with PostgreSQL - MOLECULE_DISTRO: geerlingguy/docker-fedora29-ansible:latest MOLECULE_SCENARIO: highavailability - # Test multiple masters with auto deploying manifests + # Test multiple controllers with auto deploying manifests - MOLECULE_DISTRO: geerlingguy/docker-fedora30-ansible:latest MOLECULE_SCENARIO: highavailability MOLECULE_PLAYBOOK: playbook-auto-deploying-manifests.yml - # Test multiple masters in control plane with Etcd + # Test multiple controllers in control plane with Etcd - MOLECULE_DISTRO: geerlingguy/docker-centos8-ansible:latest MOLECULE_SCENARIO: highavailability MOLECULE_PLAYBOOK: playbook-etcd.yml diff --git a/README.md b/README.md index 36f07a0..190ed72 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Ansible role for installing [Rancher Labs k3s](https://k3s.io/) ("Lightweight Kubernetes") as either a standalone server or cluster. -[![Build Status](https://www.travis-ci.org/PyratLabs/ansible-role-k3s.svg?branch=master)](https://www.travis-ci.org/PyratLabs/ansible-role-k3s) +[![Build Status](https://www.travis-ci.org/PyratLabs/ansible-role-k3s.svg?branch=main)](https://www.travis-ci.org/PyratLabs/ansible-role-k3s) ## Requirements @@ -241,7 +241,7 @@ Below are variables that are set against specific hosts in your inventory. By default only one host will be defined as a control node by Ansible, If you do not set a host as a control node, this role will automatically delegate -the first play host as a control node (master). This is not suitable for use in +the first play host as a primary control node. This is not suitable for use in a Production workload. If multiple hosts have `k3s_control_node` set to true, you must also set @@ -253,7 +253,7 @@ the play hosts. See: [High Availability with an External DB](https://rancher.com/docs/k3s/latest/en/installation/ha/) -It is also possible, though not supported, to run a single K3s master with a +It is also possible, though not supported, to run a single K3s control node with a `k3s_datastore_endpoint` defined. As this is not a typically supported configuration you will need to set `k3s_use_unsupported_config` to `true`. @@ -270,7 +270,7 @@ to `true`. If you are running k3s on systems with multiple network interfaces, it is necessary to have the flannel interface on a network interface that is routable -to the master node(s). +to the control plane node(s). #### Notes about `_args`, `_labels` and `_taints` variables @@ -285,7 +285,7 @@ Affected variables: These parameters allow for assigning additional args to K3s during runtime. For instance, to use the Azure Cloud Controller, assign the below to -the master node's configuration in your host file. +the control node's configuration in your host file. **YAML**: @@ -327,7 +327,7 @@ No dependencies on other roles. ## Example Playbooks -Example playbook, single master node running v0.10.2: +Example playbook, single control node running v0.10.2: ```yaml - hosts: k3s_nodes diff --git a/meta/main.yml b/meta/main.yml index 80714b1..2b20d38 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -29,7 +29,7 @@ galaxy_info: # Galaxy will use this branch. During import Galaxy will access files on # this branch. If Travis integration is configured, only notifications for this # branch will be accepted. Otherwise, in all cases, the repo's default branch - # (usually master) will be used. + # (usually main) will be used. # github_branch: # diff --git a/tasks/build/configure-k3s-cluster.yml b/tasks/build/configure-k3s-cluster.yml index efab428..b33c4d1 100644 --- a/tasks/build/configure-k3s-cluster.yml +++ b/tasks/build/configure-k3s-cluster.yml @@ -47,13 +47,13 @@ - reload systemd - restart k3s -- name: Ensure secondary masters are started +- name: Ensure secondary controllers are started service: name: k3s state: started enabled: true - register: ensure_secondary_masters_started - until: ensure_secondary_masters_started is succeeded + register: ensure_secondary_controllers_started + until: ensure_secondary_controllers_started is succeeded retries: "{{ play_hosts | length }}" delay: 5 when: k3s_control_node and not k3s_primary_control_node diff --git a/tasks/build/preconfigure-k3s.yml b/tasks/build/preconfigure-k3s.yml index 053dc4b..a8e87dd 100644 --- a/tasks/build/preconfigure-k3s.yml +++ b/tasks/build/preconfigure-k3s.yml @@ -5,7 +5,7 @@ k3s_control_node: "{{ 'false' if k3s_build_cluster else 'true' }}" when: k3s_control_node is not defined -- name: Ensure k3s master control node fact is set +- name: Ensure k3s control node fact is set set_fact: k3s_primary_control_node: "{{ 'false' if k3s_build_cluster else 'true' }}" when: k3s_primary_control_node is not defined @@ -19,7 +19,7 @@ when: true not in (hostvars | json_query('*.k3s_control_node')) and k3s_build_cluster is defined and k3s_build_cluster -- name: Ensure a count of control masters is generated +- name: Ensure a count of control nodes is generated set_fact: k3s_controller_count: "{{ k3s_controller_count + [ item ] }}" when: hostvars[item].k3s_control_node is defined @@ -52,7 +52,7 @@ check_mode: false when: hostvars[item].k3s_control_node is defined -- name: Delegate a master control plane node +- name: Delegate a primary control plane node block: - name: Lookup control node from file command: "grep '{{ 'P_True' if (k3s_controller_count | length > 1) else 'C_True' }}' /tmp/inventory.txt" diff --git a/tasks/validate/check-master-count.yml b/tasks/validate/check-controller-count.yml similarity index 100% rename from tasks/validate/check-master-count.yml rename to tasks/validate/check-controller-count.yml diff --git a/tasks/validate/main.yml b/tasks/validate/main.yml index 3de3cf5..9954a4e 100644 --- a/tasks/validate/main.yml +++ b/tasks/validate/main.yml @@ -6,5 +6,5 @@ when: k3s_non_root is defined and k3s_non_root and k3s_use_unsupported_config -- import_tasks: check-master-count.yml +- import_tasks: check-controller-count.yml when: k3s_build_cluster is defined and k3s_build_cluster