mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-03-17 00:47:32 -02:30
Calico wireguard (#7638)
* Calico: add Wireguard support * CI: Add Calico Wireguard scenario
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
---
|
||||
- name: Calico | Install Wireguard packages
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: present
|
||||
with_items: "{{ calico_wireguard_packages }}"
|
||||
register: calico_package_install
|
||||
until: calico_package_install is succeeded
|
||||
retries: 4
|
||||
when: calico_wireguard_enabled
|
||||
|
||||
- name: Calico | Copy calicoctl binary from download dir
|
||||
copy:
|
||||
src: "{{ local_release_dir }}/calicoctl"
|
||||
@@ -148,6 +158,7 @@
|
||||
"bpfLogLevel": "{{ calico_bpf_log_level }}",
|
||||
"bpfEnabled": {{ calico_bpf_enabled | bool }},
|
||||
"bpfExternalServiceMode": "{{ calico_bpf_service_mode }}",
|
||||
"wireguardEnabled": {{ calico_wireguard_enabled | bool }},
|
||||
"logSeverityScreen": "{{ calico_felix_log_severity_screen }}" }}
|
||||
when:
|
||||
- inventory_hostname == groups['kube_control_plane'][0]
|
||||
|
||||
@@ -3,4 +3,6 @@
|
||||
|
||||
- import_tasks: pre.yml
|
||||
|
||||
- import_tasks: repos.yml
|
||||
|
||||
- include_tasks: install.yml
|
||||
|
||||
@@ -25,3 +25,20 @@
|
||||
delegate_to: "{{ groups['kube_control_plane'][0] }}"
|
||||
when:
|
||||
- "cloud_provider is defined"
|
||||
|
||||
- name: Calico | Gather os specific variables
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- files:
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version|lower|replace('/', '_') }}.yml"
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_release }}.yml"
|
||||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version|lower|replace('/', '_') }}.yml"
|
||||
- "{{ ansible_distribution|lower }}.yml"
|
||||
- "{{ ansible_os_family|lower }}-{{ ansible_architecture }}.yml"
|
||||
- "{{ ansible_os_family|lower }}.yml"
|
||||
- defaults.yml
|
||||
paths:
|
||||
- ../vars
|
||||
skip: true
|
||||
tags:
|
||||
- facts
|
||||
|
||||
20
roles/network_plugin/calico/tasks/repos.yml
Normal file
20
roles/network_plugin/calico/tasks/repos.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
- name: Calico | Add wireguard yum repo
|
||||
when:
|
||||
- calico_wireguard_enabled
|
||||
block:
|
||||
|
||||
- name: Calico | Add wireguard yum repo
|
||||
yum_repository:
|
||||
name: copr:copr.fedorainfracloud.org:jdoss:wireguard
|
||||
file: _copr:copr.fedorainfracloud.org:jdoss:wireguard
|
||||
description: Copr repo for wireguard owned by jdoss
|
||||
baseurl: "{{ calico_wireguard_repo }}"
|
||||
gpgcheck: yes
|
||||
gpgkey: https://download.copr.fedorainfracloud.org/results/jdoss/wireguard/pubkey.gpg
|
||||
skip_if_unavailable: yes
|
||||
enabled: yes
|
||||
repo_gpgcheck: no
|
||||
when:
|
||||
- ansible_os_family in ['RedHat']
|
||||
- ansible_distribution not in ['Fedora']
|
||||
Reference in New Issue
Block a user