summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-02-08 04:49:50 +0100
committerChristian Pointner <equinox@spreadspace.org>2020-02-08 04:49:55 +0100
commita6340f2dc6474353666295063498e58873bb4b26 (patch)
treeaf3343fff099dc83e5aa8e3a4c4f3ff8d9dfaadb
parentkubernetes: added workaround for encryption config (diff)
k8s-emc: added ele-helene und ele-dione to cluster
-rw-r--r--dan/k8s-emc.yml1
-rw-r--r--inventory/host_vars/ch-mimas.yml2
-rw-r--r--inventory/host_vars/emc-master.yml1
-rw-r--r--inventory/host_vars/sk-testvm.yml1
-rw-r--r--inventory/hosts.ini4
-rw-r--r--roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j22
-rw-r--r--spreadspace/k8s-test.yml1
7 files changed, 9 insertions, 3 deletions
diff --git a/dan/k8s-emc.yml b/dan/k8s-emc.yml
index ddaf3739..b966460b 100644
--- a/dan/k8s-emc.yml
+++ b/dan/k8s-emc.yml
@@ -20,6 +20,7 @@
tasks:
- set_fact:
kubernetes_secrets_cooked: "{{ kubernetes_secrets }}"
+ external_ip_cooked: "{{ external_ip }}"
- import_playbook: ../common/kubernetes.yml
- import_playbook: ../common/kubernetes-cleanup.yml
diff --git a/inventory/host_vars/ch-mimas.yml b/inventory/host_vars/ch-mimas.yml
index 79246de5..9a89fe7c 100644
--- a/inventory/host_vars/ch-mimas.yml
+++ b/inventory/host_vars/ch-mimas.yml
@@ -29,3 +29,5 @@ network:
mask: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('netmask') }}"
gateway: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('address') }}"
overlay: "{{ (hostvars[vm_host].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}"
+
+external_ip: "{{ network.primary.overlay }}"
diff --git a/inventory/host_vars/emc-master.yml b/inventory/host_vars/emc-master.yml
index 7b1f3210..6c11048a 100644
--- a/inventory/host_vars/emc-master.yml
+++ b/inventory/host_vars/emc-master.yml
@@ -35,6 +35,7 @@ network:
gateway: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('address') }}"
overlay: "{{ (hostvars[vm_host].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}"
+external_ip: "{{ network.primary.overlay }}"
docker_lvm:
vg: "{{ host_name }}"
diff --git a/inventory/host_vars/sk-testvm.yml b/inventory/host_vars/sk-testvm.yml
index bad899e5..8ffb8ac7 100644
--- a/inventory/host_vars/sk-testvm.yml
+++ b/inventory/host_vars/sk-testvm.yml
@@ -30,6 +30,7 @@ network:
gateway: "{{ hostvars[vm_host].vm_host.network.bridges.public.prefix | ipaddr('address') }}"
overlay: "{{ (hostvars[vm_host].vm_host.network.bridges.public.overlay.prefix | ipaddr(hostvars[vm_host].vm_host.network.bridges.public.overlay.offsets[inventory_hostname])).split('/')[0] }}"
+external_ip: "{{ network.primary.overlay }}"
### this machine will be used to migrate wolke.chaox.org:
#
diff --git a/inventory/hosts.ini b/inventory/hosts.ini
index b2957b17..26674ac9 100644
--- a/inventory/hosts.ini
+++ b/inventory/hosts.ini
@@ -275,8 +275,8 @@ ele-dolmetsch-raspi
### kubernetes cluster: emc
[k8s-emc-encoder]
-#ele-dione
-#ele-helene
+ele-dione
+ele-helene
[k8s-emc-distribution:children]
emc-dist
diff --git a/roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2 b/roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2
index 9ca444e8..72b39c3f 100644
--- a/roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2
+++ b/roles/kubernetes/net/kubeguard/templates/kubeguard-peer.service.j2
@@ -14,7 +14,7 @@ After=kubeguard-interfaces.service
{% else %}
{% set tun_ip = kubernetes.pod_ip_range | ipsubnet(kubernetes.pod_ip_range_size, 0) | ipaddr(kubeguard.node_index[peer]) -%}
{% set wg_pubkey = hostvars[peer].kubeguard_wireguard_pubkey.stdout -%}
-{% set wg_host = hostvars[peer].external_ip | default(hostvars[peer].ansible_default_ipv4.address) -%}
+{% set wg_host = hostvars[peer].external_ip_cooked | default(hostvars[peer].ansible_default_ipv4.address) -%}
{% set wg_port = hostvars[peer].kubeguard_wireguard_port -%}
{% set wg_allowedips = (tun_ip | ipaddr('address')) + "/32," + pod_net_peer %}
{% endif %}
diff --git a/spreadspace/k8s-test.yml b/spreadspace/k8s-test.yml
index 3cadbb92..9c06dbae 100644
--- a/spreadspace/k8s-test.yml
+++ b/spreadspace/k8s-test.yml
@@ -20,6 +20,7 @@
tasks:
- set_fact:
kubernetes_secrets_cooked: "{{ kubernetes_secrets }}"
+ external_ip_cooked: "{{ external_ip }}"
- import_playbook: ../common/kubernetes.yml
- import_playbook: ../common/kubernetes-cleanup.yml