Skip to content

Commit

Permalink
New Task to create tunelo-calico network/subnet
Browse files Browse the repository at this point in the history
Added a task in the k3s playbook to create the tunelo-calico network and
the tunelo-calico subnet that are both necessary for the management of
hub and spoke ports and the proper functioning of tunelo.
  • Loading branch information
Soufiane Jounaid committed Jun 12, 2024
1 parent c082b23 commit 0d70c82
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions roles/k3s/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ k3s_extra_server_args: ""

k3s_dry_run: no

k3s_tunelo_cidr: "10.0.3.0/24"
k3s_cluster_cidr: "192.168.64.0/18"
k3s_cluster_node_blocksize: 28

Expand Down
22 changes: 22 additions & 0 deletions roles/k3s/tasks/config-neutron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,28 @@
enable_dhcp: no
become: yes

- name: Create tunelo-calico network
kolla_toolbox:
module_name: os_network
module_args:
auth: "{{ openstack_auth }}"
name: tunelo-calico
provider_network_type: flat
provider_physical_network: tunelo
shared: false
become: yes

- name: Create tunelo-calico subnet
kolla_toolbox:
module_name: os_subnet
module_args:
auth: "{{ openstack_auth }}"
network_name: tunelo-calico
name: tunelo-calico-subnet
cidr: "{{ k3s_tunelo_cidr }}"
enable_dhcp: yes
become: yes

# FIXME(jason): this doesn't actually add the subnet to the router!
# When we have updated to a later Ansible we can potentially fetch the router's
# interfaces with routers_info and then merge this interface into the list?
Expand Down

0 comments on commit 0d70c82

Please sign in to comment.