summaryrefslogtreecommitdiff
path: root/roles/kubernetes
diff options
context:
space:
mode:
Diffstat (limited to 'roles/kubernetes')
-rw-r--r--roles/kubernetes/net/kubeguard/node/templates/kubeguard-peer.service.j22
1 files changed, 1 insertions, 1 deletions
diff --git a/roles/kubernetes/net/kubeguard/node/templates/kubeguard-peer.service.j2 b/roles/kubernetes/net/kubeguard/node/templates/kubeguard-peer.service.j2
index 72b39c3f..0503ca03 100644
--- a/roles/kubernetes/net/kubeguard/node/templates/kubeguard-peer.service.j2
+++ b/roles/kubernetes/net/kubeguard/node/templates/kubeguard-peer.service.j2
@@ -6,7 +6,7 @@ After=kubeguard-interfaces.service
{% set pod_ip_self = kubernetes.pod_ip_range | ipsubnet(kubernetes.pod_ip_range_size, kubeguard.node_index[inventory_hostname]) | ipaddr(1) | ipaddr('address') -%}
{% set pod_net_peer = kubernetes.pod_ip_range | ipsubnet(kubernetes.pod_ip_range_size, kubeguard.node_index[peer]) -%}
-{% set direct_zone = kubeguard.direct_net_zones | direct_net_zone(inventory_hostname, peer) -%}
+{% set direct_zone = kubeguard.direct_net_zones | default({}) | direct_net_zone(inventory_hostname, peer) -%}
{% if direct_zone %}
{% set direct_ip = kubeguard.direct_net_zones[direct_zone].transfer_net | ipaddr(kubeguard.node_index[inventory_hostname]) %}
{% set direct_interface = kubeguard.direct_net_zones[direct_zone].node_interface[inventory_hostname] %}