Rename kubespray-defaults to kubespray_defaults

Role names in ansible collection should not contains hyphens.
This commit is contained in:
Max Gautier
2025-05-10 10:04:37 +02:00
parent 0c8dfb8e43
commit 7db2aa1cba
42 changed files with 81 additions and 81 deletions

View File

@@ -31,7 +31,7 @@ manage-offline-container-images.sh register
## generate_list.sh ## generate_list.sh
This script generates the list of downloaded files and the list of container images by `roles/kubespray-defaults/defaults/main/download.yml` file. This script generates the list of downloaded files and the list of container images by `roles/kubespray_defaults/defaults/main/download.yml` file.
Run this script will execute `generate_list.yml` playbook in kubespray root directory and generate four files, Run this script will execute `generate_list.yml` playbook in kubespray root directory and generate four files,
all downloaded files url in files.list, all container images in images.list, jinja2 templates in *.template. all downloaded files url in files.list, all container images in images.list, jinja2 templates in *.template.

View File

@@ -5,7 +5,7 @@ CURRENT_DIR=$(cd $(dirname $0); pwd)
TEMP_DIR="${CURRENT_DIR}/temp" TEMP_DIR="${CURRENT_DIR}/temp"
REPO_ROOT_DIR="${CURRENT_DIR%/contrib/offline}" REPO_ROOT_DIR="${CURRENT_DIR%/contrib/offline}"
: ${DOWNLOAD_YML:="roles/kubespray-defaults/defaults/main/download.yml"} : ${DOWNLOAD_YML:="roles/kubespray_defaults/defaults/main/download.yml"}
mkdir -p ${TEMP_DIR} mkdir -p ${TEMP_DIR}
@@ -19,7 +19,7 @@ sed -n '/^downloads:/,/download_defaults:/p' ${REPO_ROOT_DIR}/${DOWNLOAD_YML} \
| sed 'N;s#\n# #g' | tr ' ' ':' | sed 's/\"//g' > ${TEMP_DIR}/images.list.template | sed 'N;s#\n# #g' | tr ' ' ':' | sed 's/\"//g' > ${TEMP_DIR}/images.list.template
# add kube-* images to images list template # add kube-* images to images list template
# Those container images are downloaded by kubeadm, then roles/kubespray-defaults/defaults/main/download.yml # Those container images are downloaded by kubeadm, then roles/kubespray_defaults/defaults/main/download.yml
# doesn't contain those images. That is reason why here needs to put those images into the # doesn't contain those images. That is reason why here needs to put those images into the
# list separately. # list separately.
KUBE_IMAGES="kube-apiserver kube-controller-manager kube-scheduler kube-proxy" KUBE_IMAGES="kube-apiserver kube-controller-manager kube-scheduler kube-proxy"

View File

@@ -5,7 +5,7 @@
roles: roles:
# Just load default variables from roles. # Just load default variables from roles.
- role: kubespray-defaults - role: kubespray_defaults
when: false when: false
- role: download - role: download
when: false when: false

View File

@@ -1,6 +1,6 @@
# Setting up Environment Proxy # Setting up Environment Proxy
If you set http and https proxy, all nodes and loadbalancer will be excluded from proxy with generating no_proxy variable in `roles/kubespray-defaults/tasks/no_proxy.yml`, if you have additional resources for exclude add them to `additional_no_proxy` variable. If you want fully override your `no_proxy` setting, then fill in just `no_proxy` and no nodes or loadbalancer addresses will be added to no_proxy. If you set http and https proxy, all nodes and loadbalancer will be excluded from proxy with generating no_proxy variable in `roles/kubespray_defaults/tasks/no_proxy.yml`, if you have additional resources for exclude add them to `additional_no_proxy` variable. If you want fully override your `no_proxy` setting, then fill in just `no_proxy` and no nodes or loadbalancer addresses will be added to no_proxy.
## Set proxy for http and https ## Set proxy for http and https

View File

@@ -180,7 +180,7 @@ and ``kube_pods_subnet``, for example from the ``172.18.0.0/16``.
IPv4 stack enable by *ipv4_stack* is set to ``true``, by default. IPv4 stack enable by *ipv4_stack* is set to ``true``, by default.
IPv6 stack enable by *ipv6_stack* is set to ``false`` by default. IPv6 stack enable by *ipv6_stack* is set to ``false`` by default.
This will use the default IPv4 and IPv6 subnets specified in the defaults file in the ``kubespray-defaults`` role, unless overridden of course. The default config will give you room for up to 256 nodes with 126 pods per node, and up to 4096 services. This will use the default IPv4 and IPv6 subnets specified in the defaults file in the ``kubespray_defaults`` role, unless overridden of course. The default config will give you room for up to 256 nodes with 126 pods per node, and up to 4096 services.
Set both variables to ``true`` for Dual Stack mode. Set both variables to ``true`` for Dual Stack mode.
IPv4 has higher priority in Dual Stack mode(e.g. in variables `main_ip`, `main_access_ip` and other). IPv4 has higher priority in Dual Stack mode(e.g. in variables `main_ip`, `main_access_ip` and other).
You can also make IPv6 only clusters with ``false`` in *ipv4_stack*. You can also make IPv6 only clusters with ``false`` in *ipv4_stack*.

View File

@@ -48,7 +48,7 @@ Remember to disable fact gathering since Python might not be present on hosts.
- hosts: all - hosts: all
gather_facts: false # not all hosts might be able to run modules yet gather_facts: false # not all hosts might be able to run modules yet
roles: roles:
- kubespray-defaults - kubespray_defaults
- bootstrap-os - bootstrap-os
``` ```

View File

@@ -136,7 +136,7 @@ If you use the settings like the one above, you'll need to define in your invent
* `registry_host`: Container image registry. If you _don't_ use the same repository path for the container images that * `registry_host`: Container image registry. If you _don't_ use the same repository path for the container images that
the ones defined the ones defined
in [kubesprays-defaults's role defaults](https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubespray-defaults/defaults/main/download.yml) in [kubesprays-defaults's role defaults](https://github.com/kubernetes-sigs/kubespray/blob/master/roles/kubespray_defaults/defaults/main/download.yml)
, you need to override the `*_image_repo` for these container images. If you want to make your life easier, use the , you need to override the `*_image_repo` for these container images. If you want to make your life easier, use the
same repository path, you won't have to override anything else. same repository path, you won't have to override anything else.
* `registry_addr`: Container image registry, but only have [domain or ip]:[port]. * `registry_addr`: Container image registry, but only have [domain or ip]:[port].

View File

@@ -12,7 +12,7 @@
hosts: kube_control_plane[0] hosts: kube_control_plane[0]
tasks: tasks:
- name: Include kubespray-default variables - name: Include kubespray-default variables
include_vars: ../roles/kubespray-defaults/defaults/main/main.yml include_vars: ../roles/kubespray_defaults/defaults/main/main.yml
- name: Copy get_cinder_pvs.sh to first control plane node - name: Copy get_cinder_pvs.sh to first control plane node
copy: copy:
src: get_cinder_pvs.sh src: get_cinder_pvs.sh

View File

@@ -14,7 +14,7 @@
hosts: localhost hosts: localhost
gather_facts: false gather_facts: false
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- { role: bastion-ssh-config, tags: ["localhost", "bastion"]} - { role: bastion-ssh-config, tags: ["localhost", "bastion"]}
- name: Bootstrap hosts OS for Ansible - name: Bootstrap hosts OS for Ansible
@@ -26,14 +26,14 @@
# fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled. # fail. bootstrap-os fixes this on these systems, so in later plays it can be enabled.
ansible_ssh_pipelining: false ansible_ssh_pipelining: false
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- { role: bootstrap-os, tags: bootstrap-os} - { role: bootstrap-os, tags: bootstrap-os}
- name: Preinstall - name: Preinstall
hosts: k8s_cluster:etcd:calico_rr hosts: k8s_cluster:etcd:calico_rr
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- { role: kubernetes/preinstall, tags: preinstall } - { role: kubernetes/preinstall, tags: preinstall }
- name: Handle upgrades to control plane components first to maintain backwards compat. - name: Handle upgrades to control plane components first to maintain backwards compat.
@@ -41,7 +41,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
serial: 1 serial: 1
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- { role: upgrade/pre-upgrade, tags: pre-upgrade } - { role: upgrade/pre-upgrade, tags: pre-upgrade }
- { role: kubernetes/node, tags: node } - { role: kubernetes/node, tags: node }
- { role: kubernetes/control-plane, tags: master, upgrade_cluster_setup: true } - { role: kubernetes/control-plane, tags: master, upgrade_cluster_setup: true }
@@ -54,8 +54,8 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
serial: "{{ serial | default('20%') }}" serial: "{{ serial | default('20%') }}"
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- { role: upgrade/pre-upgrade, tags: pre-upgrade } - { role: upgrade/pre-upgrade, tags: pre-upgrade }
- { role: kubernetes/node, tags: node } - { role: kubernetes/node, tags: node }
- { role: upgrade/post-upgrade, tags: post-upgrade } - { role: upgrade/post-upgrade, tags: post-upgrade }
- { role: kubespray-defaults} - { role: kubespray_defaults}

View File

@@ -57,7 +57,7 @@ loadbalancer_apiserver_healthcheck_port: 8081
# https_proxy: "" # https_proxy: ""
# https_proxy_cert_file: "" # https_proxy_cert_file: ""
## Refer to roles/kubespray-defaults/defaults/main/main.yml before modifying no_proxy ## Refer to roles/kubespray_defaults/defaults/main/main.yml before modifying no_proxy
# no_proxy: "" # no_proxy: ""
## Some problems may occur when downloading files over https proxy due to ansible bug ## Some problems may occur when downloading files over https proxy due to ansible bug

View File

@@ -42,5 +42,5 @@
gather_facts: false gather_facts: false
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: bastion-ssh-config, tags: ["localhost", "bastion"] } - { role: bastion-ssh-config, tags: ["localhost", "bastion"] }

View File

@@ -11,7 +11,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/preinstall, tags: preinstall } - { role: kubernetes/preinstall, tags: preinstall }
- { role: "container-engine", tags: "container-engine", when: deploy_container_engine } - { role: "container-engine", tags: "container-engine", when: deploy_container_engine }
- { role: download, tags: download, when: "not skip_downloads" } - { role: download, tags: download, when: "not skip_downloads" }
@@ -28,7 +28,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/node, tags: node } - { role: kubernetes/node, tags: node }
- name: Install the control plane - name: Install the control plane
@@ -37,7 +37,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/control-plane, tags: master } - { role: kubernetes/control-plane, tags: master }
- { role: kubernetes/client, tags: client } - { role: kubernetes/client, tags: client }
- { role: kubernetes-apps/cluster_roles, tags: cluster-roles } - { role: kubernetes-apps/cluster_roles, tags: cluster-roles }
@@ -48,7 +48,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/kubeadm, tags: kubeadm} - { role: kubernetes/kubeadm, tags: kubeadm}
- { role: kubernetes/node-label, tags: node-label } - { role: kubernetes/node-label, tags: node-label }
- { role: kubernetes/node-taint, tags: node-taint } - { role: kubernetes/node-taint, tags: node-taint }
@@ -65,7 +65,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: network_plugin/calico/rr, tags: ['network', 'calico_rr'] } - { role: network_plugin/calico/rr, tags: ['network', 'calico_rr'] }
- name: Patch Kubernetes for Windows - name: Patch Kubernetes for Windows
@@ -74,7 +74,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] } - { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] }
- name: Install Kubernetes apps - name: Install Kubernetes apps
@@ -83,7 +83,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes-apps/external_cloud_controller, tags: external-cloud-controller } - { role: kubernetes-apps/external_cloud_controller, tags: external-cloud-controller }
- { role: kubernetes-apps/network_plugin, tags: network } - { role: kubernetes-apps/network_plugin, tags: network }
- { role: kubernetes-apps/policy_controller, tags: policy-controller } - { role: kubernetes-apps/policy_controller, tags: policy-controller }
@@ -97,5 +97,5 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true } - { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true }

View File

@@ -2,7 +2,7 @@
- name: Add worker nodes to the etcd play if needed - name: Add worker nodes to the etcd play if needed
hosts: kube_node hosts: kube_node
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
tasks: tasks:
- name: Check if nodes needs etcd client certs (depends on network_plugin) - name: Check if nodes needs etcd client certs (depends on network_plugin)
group_by: group_by:
@@ -20,7 +20,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- role: etcd - role: etcd
tags: etcd tags: etcd
when: etcd_deployment_type != "kubeadm" when: etcd_deployment_type != "kubeadm"

View File

@@ -6,7 +6,7 @@
hosts: etcd[0] hosts: etcd[0]
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- role: recover_control_plane/etcd - role: recover_control_plane/etcd
when: etcd_deployment_type != "kubeadm" when: etcd_deployment_type != "kubeadm"
@@ -14,7 +14,7 @@
hosts: kube_control_plane[0] hosts: kube_control_plane[0]
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- { role: recover_control_plane/control-plane } - { role: recover_control_plane/control-plane }
- name: Apply whole cluster install - name: Apply whole cluster install
@@ -24,5 +24,5 @@
hosts: kube_control_plane hosts: kube_control_plane
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- { role: recover_control_plane/post-recover } - { role: recover_control_plane/post-recover }

View File

@@ -42,7 +42,7 @@
service_facts: service_facts:
when: reset_nodes | default(True) | bool when: reset_nodes | default(True) | bool
roles: roles:
- { role: kubespray-defaults, when: reset_nodes | default(True) | bool } - { role: kubespray_defaults, when: reset_nodes | default(True) | bool }
- { role: remove-node/pre-remove, tags: pre-remove } - { role: remove-node/pre-remove, tags: pre-remove }
- role: remove-node/remove-etcd-node - role: remove-node/remove-etcd-node
when: "'etcd' in group_names" when: "'etcd' in group_names"
@@ -54,5 +54,5 @@
gather_facts: false gather_facts: false
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults, when: reset_nodes | default(True) | bool } - { role: kubespray_defaults, when: reset_nodes | default(True) | bool }
- { role: remove-node/post-remove, tags: post-remove } - { role: remove-node/post-remove, tags: post-remove }

View File

@@ -30,6 +30,6 @@
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults} - { role: kubespray_defaults}
- { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_early: true } - { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_early: true }
- { role: reset, tags: reset } - { role: reset, tags: reset }

View File

@@ -17,7 +17,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults, when: "not skip_downloads and download_run_once and not download_localhost" } - { role: kubespray_defaults, when: "not skip_downloads and download_run_once and not download_localhost" }
- { role: kubernetes/preinstall, tags: preinstall, when: "not skip_downloads and download_run_once and not download_localhost" } - { role: kubernetes/preinstall, tags: preinstall, when: "not skip_downloads and download_run_once and not download_localhost" }
- { role: download, tags: download, when: "not skip_downloads and download_run_once and not download_localhost" } - { role: download, tags: download, when: "not skip_downloads and download_run_once and not download_localhost" }
@@ -27,7 +27,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/preinstall, tags: preinstall } - { role: kubernetes/preinstall, tags: preinstall }
- { role: container-engine, tags: "container-engine", when: deploy_container_engine } - { role: container-engine, tags: "container-engine", when: deploy_container_engine }
- { role: download, tags: download, when: "not skip_downloads" } - { role: download, tags: download, when: "not skip_downloads" }
@@ -46,7 +46,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/node, tags: node } - { role: kubernetes/node, tags: node }
- name: Upload control plane certs and retrieve encryption key - name: Upload control plane certs and retrieve encryption key
@@ -55,7 +55,7 @@
gather_facts: false gather_facts: false
tags: kubeadm tags: kubeadm
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
tasks: tasks:
- name: Upload control plane certificates - name: Upload control plane certificates
command: >- command: >-
@@ -77,7 +77,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/kubeadm, tags: kubeadm } - { role: kubernetes/kubeadm, tags: kubeadm }
- { role: kubernetes/node-label, tags: node-label } - { role: kubernetes/node-label, tags: node-label }
- { role: kubernetes/node-taint, tags: node-taint } - { role: kubernetes/node-taint, tags: node-taint }
@@ -89,5 +89,5 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true } - { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true }

View File

@@ -11,7 +11,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults, when: "not skip_downloads and download_run_once and not download_localhost"} - { role: kubespray_defaults, when: "not skip_downloads and download_run_once and not download_localhost"}
- { role: kubernetes/preinstall, tags: preinstall, when: "not skip_downloads and download_run_once and not download_localhost" } - { role: kubernetes/preinstall, tags: preinstall, when: "not skip_downloads and download_run_once and not download_localhost" }
- { role: download, tags: download, when: "not skip_downloads and download_run_once and not download_localhost" } - { role: download, tags: download, when: "not skip_downloads and download_run_once and not download_localhost" }
@@ -21,7 +21,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/preinstall, tags: preinstall } - { role: kubernetes/preinstall, tags: preinstall }
- { role: download, tags: download, when: "not skip_downloads" } - { role: download, tags: download, when: "not skip_downloads" }
@@ -32,7 +32,7 @@
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
serial: "{{ serial | default('20%') }}" serial: "{{ serial | default('20%') }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: container-engine, tags: "container-engine", when: deploy_container_engine } - { role: container-engine, tags: "container-engine", when: deploy_container_engine }
- name: Install etcd - name: Install etcd
@@ -48,7 +48,7 @@
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
serial: 1 serial: 1
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: upgrade/pre-upgrade, tags: pre-upgrade } - { role: upgrade/pre-upgrade, tags: pre-upgrade }
- { role: upgrade/system-upgrade, tags: system-upgrade } - { role: upgrade/system-upgrade, tags: system-upgrade }
- { role: download, tags: download, when: "system_upgrade and system_upgrade_reboot != 'never' and not skip_downloads" } - { role: download, tags: download, when: "system_upgrade and system_upgrade_reboot != 'never' and not skip_downloads" }
@@ -70,7 +70,7 @@
serial: "{{ serial | default('20%') }}" serial: "{{ serial | default('20%') }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes-apps/external_cloud_controller, tags: external-cloud-controller } - { role: kubernetes-apps/external_cloud_controller, tags: external-cloud-controller }
- { role: network_plugin, tags: network } - { role: network_plugin, tags: network }
- { role: kubernetes-apps/network_plugin, tags: network } - { role: kubernetes-apps/network_plugin, tags: network }
@@ -83,7 +83,7 @@
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
serial: "{{ serial | default('20%') }}" serial: "{{ serial | default('20%') }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: upgrade/pre-upgrade, tags: pre-upgrade } - { role: upgrade/pre-upgrade, tags: pre-upgrade }
- { role: upgrade/system-upgrade, tags: system-upgrade } - { role: upgrade/system-upgrade, tags: system-upgrade }
- { role: download, tags: download, when: "system_upgrade and system_upgrade_reboot != 'never' and not skip_downloads" } - { role: download, tags: download, when: "system_upgrade and system_upgrade_reboot != 'never' and not skip_downloads" }
@@ -100,7 +100,7 @@
any_errors_fatal: true any_errors_fatal: true
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] } - { role: win_nodes/kubernetes_patch, tags: ["master", "win_nodes"] }
- name: Install Calico Route Reflector - name: Install Calico Route Reflector
@@ -109,7 +109,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: network_plugin/calico/rr, tags: network } - { role: network_plugin/calico/rr, tags: network }
- name: Install Kubernetes apps - name: Install Kubernetes apps
@@ -118,7 +118,7 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes-apps/ingress_controller, tags: ingress-controller } - { role: kubernetes-apps/ingress_controller, tags: ingress-controller }
- { role: kubernetes-apps/external_provisioner, tags: external-provisioner } - { role: kubernetes-apps/external_provisioner, tags: external-provisioner }
- { role: kubernetes-apps, tags: apps } - { role: kubernetes-apps, tags: apps }
@@ -129,5 +129,5 @@
any_errors_fatal: "{{ any_errors_fatal | default(true) }}" any_errors_fatal: "{{ any_errors_fatal | default(true) }}"
environment: "{{ proxy_disable_env }}" environment: "{{ proxy_disable_env }}"
roles: roles:
- { role: kubespray-defaults } - { role: kubespray_defaults }
- { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true } - { role: kubernetes/preinstall, when: "dns_mode != 'none' and resolvconf_mode == 'host_resolvconf'", tags: resolvconf, dns_late: true }

View File

@@ -1,3 +1,3 @@
--- ---
dependencies: dependencies:
- role: kubespray-defaults - role: kubespray_defaults

View File

@@ -5,5 +5,5 @@
vars: vars:
container_manager: containerd container_manager: containerd
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: container-engine/containerd - role: container-engine/containerd

View File

@@ -6,7 +6,7 @@
vars: vars:
ignore_assert_errors: true ignore_assert_errors: true
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap-os
- role: network_facts - role: network_facts
- role: kubernetes/preinstall - role: kubernetes/preinstall
@@ -26,5 +26,5 @@
ignore_assert_errors: true ignore_assert_errors: true
kube_network_plugin: cni kube_network_plugin: cni
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: network_plugin/cni - role: network_plugin/cni

View File

@@ -5,5 +5,5 @@
vars: vars:
container_manager: docker container_manager: docker
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: container-engine/cri-dockerd - role: container-engine/cri-dockerd

View File

@@ -3,7 +3,7 @@
hosts: all hosts: all
become: true become: true
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap-os
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
@@ -20,7 +20,7 @@
container_manager: containerd container_manager: containerd
kube_network_plugin: cni kube_network_plugin: cni
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: network_plugin/cni - role: network_plugin/cni
tasks: tasks:
- name: Copy test container files - name: Copy test container files

View File

@@ -5,5 +5,5 @@
vars: vars:
container_manager: crio container_manager: crio
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: container-engine/cri-o - role: container-engine/cri-o

View File

@@ -6,7 +6,7 @@
vars: vars:
ignore_assert_errors: true ignore_assert_errors: true
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap-os
- role: network_facts - role: network_facts
- role: kubernetes/preinstall - role: kubernetes/preinstall
@@ -26,7 +26,7 @@
ignore_assert_errors: true ignore_assert_errors: true
kube_network_plugin: cni kube_network_plugin: cni
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: network_plugin/cni - role: network_plugin/cni
tasks: tasks:
- name: Copy test container files - name: Copy test container files

View File

@@ -6,6 +6,6 @@
gvisor_enabled: true gvisor_enabled: true
container_manager: containerd container_manager: containerd
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: container-engine/containerd - role: container-engine/containerd
- role: container-engine/gvisor - role: container-engine/gvisor

View File

@@ -3,7 +3,7 @@
hosts: all hosts: all
become: true become: true
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap-os
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
@@ -20,7 +20,7 @@
container_manager: containerd container_manager: containerd
kube_network_plugin: cni kube_network_plugin: cni
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: network_plugin/cni - role: network_plugin/cni
- role: container-engine/crictl - role: container-engine/crictl
tasks: tasks:

View File

@@ -6,6 +6,6 @@
kata_containers_enabled: true kata_containers_enabled: true
container_manager: containerd container_manager: containerd
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: container-engine/containerd - role: container-engine/containerd
- role: container-engine/kata-containers - role: container-engine/kata-containers

View File

@@ -3,7 +3,7 @@
hosts: all hosts: all
become: true become: true
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap-os
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
@@ -20,7 +20,7 @@
container_manager: containerd container_manager: containerd
kube_network_plugin: cni kube_network_plugin: cni
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: network_plugin/cni - role: network_plugin/cni
- role: container-engine/crictl - role: container-engine/crictl
tasks: tasks:

View File

@@ -6,6 +6,6 @@
youki_enabled: true youki_enabled: true
container_manager: crio container_manager: crio
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: container-engine/cri-o - role: container-engine/cri-o
- role: container-engine/youki - role: container-engine/youki

View File

@@ -3,7 +3,7 @@
hosts: all hosts: all
become: true become: true
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: bootstrap-os - role: bootstrap-os
- role: adduser - role: adduser
user: "{{ addusers.kube }}" user: "{{ addusers.kube }}"
@@ -20,7 +20,7 @@
container_manager: crio container_manager: crio
kube_network_plugin: cni kube_network_plugin: cni
roles: roles:
- role: kubespray-defaults - role: kubespray_defaults
- role: network_plugin/cni - role: network_plugin/cni
- role: container-engine/crictl - role: container-engine/crictl
tasks: tasks:

View File

@@ -1,3 +1,3 @@
--- ---
dependencies: dependencies:
- role: kubespray-defaults - role: kubespray_defaults

View File

@@ -1,3 +1,3 @@
--- ---
dependencies: dependencies:
- role: kubespray-defaults - role: kubespray_defaults

View File

@@ -5,7 +5,7 @@
- name: Stop if some versions have a 'v' left at the start - name: Stop if some versions have a 'v' left at the start
# TODO: drop this task after 2.28.0 is released # TODO: drop this task after 2.28.0 is released
# The 'not defined' tests are exception for applications which version in not defined # The 'not defined' tests are exception for applications which version in not defined
# in kubespray-defaults, only in their own roles. # in kubespray_defaults, only in their own roles.
assert: assert:
msg: | msg: |
All version string used in kubespray have been normalized to not use a leading 'v'. All version string used in kubespray have been normalized to not use a leading 'v'.
@@ -46,7 +46,7 @@
- name: Stop if some derived versions have a 'v' left at the start - name: Stop if some derived versions have a 'v' left at the start
# TODO: drop this task after 2.28.0 is released # TODO: drop this task after 2.28.0 is released
# The 'not defined' tests are exception for applications which version in not defined # The 'not defined' tests are exception for applications which version in not defined
# in kubespray-defaults, only in their own roles. # in kubespray_defaults, only in their own roles.
assert: assert:
msg: | msg: |
All version string used in kubespray have been normalized to not use a leading 'v'. All version string used in kubespray have been normalized to not use a leading 'v'.

View File

@@ -5,13 +5,13 @@
connection: local connection: local
gather_facts: false gather_facts: false
vars: vars:
fallback_ip: 'bypass tasks in kubespray-defaults' fallback_ip: 'bypass tasks in kubespray_defaults'
_keys: "{{ query('ansible.builtin.varnames', '^.+_checksums$') }}" _keys: "{{ query('ansible.builtin.varnames', '^.+_checksums$') }}"
_values: "{{ query('ansible.builtin.vars', *_keys) | map('dict2items') }}" _values: "{{ query('ansible.builtin.vars', *_keys) | map('dict2items') }}"
_components_archs_values: "{{ _keys | zip(_values) | community.general.dict | dict2items | subelements('value') }}" _components_archs_values: "{{ _keys | zip(_values) | community.general.dict | dict2items | subelements('value') }}"
_minimal_data_needed: "{{ _components_archs_values | map(attribute='0.key') | zip(_components_archs_values | map(attribute='1')) }}" _minimal_data_needed: "{{ _components_archs_values | map(attribute='0.key') | zip(_components_archs_values | map(attribute='1')) }}"
roles: roles:
- kubespray-defaults - kubespray_defaults
tasks: tasks:
- name: Check all versions are strings - name: Check all versions are strings
assert: assert:

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# After a new version of Kubernetes has been released, # After a new version of Kubernetes has been released,
# run this script to update roles/kubespray-defaults/defaults/main/download.yml # run this script to update roles/kubespray_defaults/defaults/main/download.yml
# with new hashes. # with new hashes.
import sys import sys
@@ -25,7 +25,7 @@ from typing import Optional, Any
from . import components from . import components
CHECKSUMS_YML = Path("roles/kubespray-defaults/defaults/main/checksums.yml") CHECKSUMS_YML = Path("roles/kubespray_defaults/defaults/main/checksums.yml")
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)

View File

@@ -5,11 +5,11 @@
connection: local connection: local
gather_facts: false gather_facts: false
vars: vars:
fallback_ip: 'bypass tasks in kubespray-defaults' fallback_ip: 'bypass tasks in kubespray_defaults'
roles: roles:
- kubespray-defaults - kubespray_defaults
tasks: tasks:
- name: Include versions not in kubespray-defaults - name: Include versions not in kubespray_defaults
include_vars: "{{ item }}" include_vars: "{{ item }}"
loop: loop:
- ../roles/container-engine/docker/defaults/main.yml - ../roles/container-engine/docker/defaults/main.yml

View File

@@ -4,8 +4,8 @@
vars: vars:
test_image_repo: registry.k8s.io/e2e-test-images/agnhost test_image_repo: registry.k8s.io/e2e-test-images/agnhost
test_image_tag: "2.40" test_image_tag: "2.40"
# TODO: source those from kubespray-defaults instead. # TODO: source those from kubespray_defaults instead.
# Needs kubespray-defaults to be decoupled from no-proxy stuff # Needs kubespray_defaults to be decoupled from no-proxy stuff
bin_dir: "/usr/local/bin" bin_dir: "/usr/local/bin"
kube_pods_subnet: "{{ 'fd85:ee78:d8a6:8607::1:0000/112' if not (ipv4_stack | default(true)) else '10.233.64.0/18' }}" kube_pods_subnet: "{{ 'fd85:ee78:d8a6:8607::1:0000/112' if not (ipv4_stack | default(true)) else '10.233.64.0/18' }}"