Compare commits
12 commits
master
...
release-2.
Author | SHA1 | Date | |
---|---|---|---|
|
b75ee0b111 | ||
|
63e3f4dea9 | ||
|
1026b5974f | ||
|
453dbcef1d | ||
|
4a6600002f | ||
|
6eb313584e | ||
|
a270632466 | ||
|
00550ba832 | ||
|
b4951da405 | ||
|
cd93d10688 | ||
|
e6940d8a7b | ||
|
dca5cde493 |
15 changed files with 37 additions and 13 deletions
|
@ -57,10 +57,10 @@ A simple way to ensure you get all the correct version of Ansible is to use the
|
|||
You will then need to use [bind mounts](https://docs.docker.com/storage/bind-mounts/) to get the inventory and ssh key into the container, like this:
|
||||
|
||||
```ShellSession
|
||||
docker pull quay.io/kubespray/kubespray:v2.18.1
|
||||
docker pull quay.io/kubespray/kubespray:v2.19.1
|
||||
docker run --rm -it --mount type=bind,source="$(pwd)"/inventory/sample,dst=/inventory \
|
||||
--mount type=bind,source="${HOME}"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \
|
||||
quay.io/kubespray/kubespray:v2.18.1 bash
|
||||
quay.io/kubespray/kubespray:v2.19.1 bash
|
||||
# Inside the container you may now run the kubespray playbooks:
|
||||
ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml
|
||||
```
|
||||
|
|
|
@ -74,7 +74,6 @@ kube_kubeadm_scheduler_extra_args:
|
|||
etcd_deployment_type: kubeadm
|
||||
|
||||
## kubelet
|
||||
kubelet_authorization_mode_webhook: true
|
||||
kubelet_authentication_token_webhook: true
|
||||
kube_read_only_port: 0
|
||||
kubelet_rotate_server_certificates: true
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
---
|
||||
- name: runc | check if fedora coreos
|
||||
stat:
|
||||
path: /run/ostree-booted
|
||||
get_attributes: no
|
||||
get_checksum: no
|
||||
get_mime: no
|
||||
register: ostree
|
||||
|
||||
- name: runc | set is_ostree
|
||||
set_fact:
|
||||
is_ostree: "{{ ostree.stat.exists }}"
|
||||
|
|
|
@ -142,8 +142,8 @@ kubectl_download_url: "https://storage.googleapis.com/kubernetes-release/release
|
|||
kubeadm_download_url: "https://storage.googleapis.com/kubernetes-release/release/{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
|
||||
etcd_download_url: "https://github.com/etcd-io/etcd/releases/download/{{ etcd_version }}/etcd-{{ etcd_version }}-linux-{{ image_arch }}.tar.gz"
|
||||
cni_download_url: "https://github.com/containernetworking/plugins/releases/download/{{ cni_version }}/cni-plugins-linux-{{ image_arch }}-{{ cni_version }}.tgz"
|
||||
calicoctl_download_url: "https://github.com/projectcalico/calicoctl/releases/download/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
|
||||
calicoctl_alternate_download_url: "https://github.com/projectcalico/calico/releases/download/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
|
||||
calicoctl_download_url: "https://github.com/projectcalico/calico/releases/download/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
|
||||
calicoctl_alternate_download_url: "https://github.com/projectcalico/calicoctl/releases/download/{{ calico_ctl_version }}/calicoctl-linux-{{ image_arch }}"
|
||||
calico_crds_download_url: "https://github.com/projectcalico/calico/archive/{{ calico_version }}.tar.gz"
|
||||
crictl_download_url: "https://github.com/kubernetes-sigs/cri-tools/releases/download/{{ crictl_version }}/crictl-{{ crictl_version }}-{{ ansible_system | lower }}-{{ image_arch }}.tar.gz"
|
||||
helm_download_url: "https://get.helm.sh/helm-{{ helm_version }}-linux-{{ image_arch }}.tar.gz"
|
||||
|
|
|
@ -26,6 +26,7 @@ nodelocaldns_secondary_prometheus_port: 9255
|
|||
dns_autoscaler_cpu_requests: 20m
|
||||
dns_autoscaler_memory_requests: 10Mi
|
||||
dns_autoscaler_deployment_nodeselector: "kubernetes.io/os: linux"
|
||||
# dns_autoscaler_extra_tolerations: [{effect: NoSchedule, operator: "Exists"}]
|
||||
|
||||
# etcd metrics
|
||||
# etcd_metrics_service_labels:
|
||||
|
@ -83,3 +84,6 @@ dashboard_master_toleration: true
|
|||
# Override dashboard default settings
|
||||
dashboard_token_ttl: 900
|
||||
dashboard_skip_login: false
|
||||
|
||||
# Policy Controllers
|
||||
# policy_controller_extra_tolerations: [{effect: NoSchedule, operator: "Exists"}]
|
||||
|
|
|
@ -34,7 +34,7 @@ spec:
|
|||
effect: NoSchedule
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
effect: NoSchedule
|
||||
{% if dns_extra_tolerations | default(None) %}
|
||||
{% if dns_extra_tolerations is defined %}
|
||||
{{ dns_extra_tolerations | list | to_nice_yaml(indent=2) | indent(8) }}
|
||||
{% endif %}
|
||||
affinity:
|
||||
|
|
|
@ -45,6 +45,9 @@ spec:
|
|||
key: node-role.kubernetes.io/master
|
||||
- effect: NoSchedule
|
||||
key: node-role.kubernetes.io/control-plane
|
||||
{% if dns_autoscaler_extra_tolerations is defined %}
|
||||
{{ dns_autoscaler_extra_tolerations | list | to_nice_yaml(indent=2) | indent(8) }}
|
||||
{% endif %}
|
||||
affinity:
|
||||
podAntiAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
|
|
|
@ -28,6 +28,9 @@ spec:
|
|||
effect: NoSchedule
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
effect: NoSchedule
|
||||
{% if policy_controller_extra_tolerations is defined %}
|
||||
{{ policy_controller_extra_tolerations | list | to_nice_yaml(indent=2) | indent(8) }}
|
||||
{% endif %}
|
||||
priorityClassName: system-cluster-critical
|
||||
containers:
|
||||
- name: calico-kube-controllers
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
kube_apiserver_insecure_bind_address: 127.0.0.1
|
||||
|
||||
# advertised host IP for kubelet. This affects network plugin config. Take caution
|
||||
kubelet_address: "{{ ip | default(fallback_ips[inventory_hostname]) }}{{ ',' + ip6 if enable_dual_stack_networks and ip6 is defined }}"
|
||||
kubelet_address: "{{ ip | default(fallback_ips[inventory_hostname]) }}{{ (',' + ip6) if enable_dual_stack_networks and ip6 is defined else '' }}"
|
||||
|
||||
# bind address for kubelet. Set to 0.0.0.0 to listen on all interfaces
|
||||
kubelet_bind_address: "{{ ip | default('0.0.0.0') }}"
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
- name: Stop if unknown OS
|
||||
assert:
|
||||
that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'Suse', 'openSUSE Leap', 'ClearLinux', 'OracleLinux', 'AlmaLinux', 'Rocky', 'Amazon']
|
||||
that: ansible_distribution in ['RedHat', 'CentOS', 'Fedora', 'Ubuntu', 'Debian', 'Flatcar', 'Flatcar Container Linux by Kinvolk', 'Suse', 'openSUSE Leap', 'openSUSE Tumbleweed', 'ClearLinux', 'OracleLinux', 'AlmaLinux', 'Rocky', 'Amazon']
|
||||
msg: "{{ ansible_distribution }} is not a known OS"
|
||||
when: not ignore_assert_errors
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@
|
|||
nameserverentries: |-
|
||||
{{ ( ( [nodelocaldns_ip] if enable_nodelocaldns else []) + coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([]) + configured_nameservers|d([])) | unique | join(',') }}
|
||||
supersede_nameserver:
|
||||
supersede domain-name-servers {{ ( coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(', ') }};
|
||||
supersede domain-name-servers {{ ( ( [nodelocaldns_ip] if enable_nodelocaldns else []) + coredns_server|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(', ') }};
|
||||
when: not dns_early or dns_late
|
||||
|
||||
# This task should run instead of the above task when cluster/nodelocal DNS hasn't
|
||||
|
|
|
@ -484,7 +484,7 @@ rbac_enabled: "{{ 'RBAC' in authorization_modes }}"
|
|||
kubelet_authentication_token_webhook: true
|
||||
|
||||
# When enabled, access to the kubelet API requires authorization by delegation to the API server
|
||||
kubelet_authorization_mode_webhook: true
|
||||
kubelet_authorization_mode_webhook: false
|
||||
|
||||
# kubelet uses certificates for authenticating to the Kubernetes API
|
||||
# Automatically generate a new key and request a new certificate from the Kubernetes API as the current certificate approaches expiration
|
||||
|
|
|
@ -582,6 +582,7 @@
|
|||
- {name: calico, file: calico-ipamconfig.yml, type: ipam}
|
||||
when:
|
||||
- inventory_hostname in groups['kube_control_plane']
|
||||
- calico_datastore == "kdd"
|
||||
|
||||
- name: Calico | Create ipamconfig resources
|
||||
kube:
|
||||
|
@ -590,3 +591,4 @@
|
|||
state: "latest"
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
- calico_datastore == "kdd"
|
|
@ -186,7 +186,7 @@ spec:
|
|||
- mountPath: /tmp/cilium/config-map
|
||||
name: cilium-config-path
|
||||
readOnly: true
|
||||
{% if not cilium_ip_masq_agent_enable %}
|
||||
{% if cilium_ip_masq_agent_enable %}
|
||||
- name: ip-masq-agent
|
||||
mountPath: /etc/config
|
||||
readOnly: true
|
||||
|
@ -370,7 +370,7 @@ spec:
|
|||
- configMap:
|
||||
name: cilium-config
|
||||
name: cilium-config-path
|
||||
{% if not cilium_ip_masq_agent_enable %}
|
||||
{% if cilium_ip_masq_agent_enable %}
|
||||
- configMap:
|
||||
name: ip-masq-agent
|
||||
items:
|
||||
|
|
|
@ -33,7 +33,12 @@
|
|||
environment: "{{ proxy_disable_env }}"
|
||||
roles:
|
||||
- { role: kubespray-defaults }
|
||||
- { role: etcd, tags: etcd, etcd_cluster_setup: false }
|
||||
- role: etcd
|
||||
tags: etcd
|
||||
vars:
|
||||
etcd_cluster_setup: false
|
||||
etcd_events_cluster_setup: false
|
||||
when: etcd_deployment_type != "kubeadm"
|
||||
|
||||
- name: Download images to ansible host cache via first kube_control_plane node
|
||||
hosts: kube_control_plane[0]
|
||||
|
|
Loading…
Reference in a new issue