From ff331f4ebae9e8202434ad17951dc2dce37029ca Mon Sep 17 00:00:00 2001
From: Book shu <styshoo@users.noreply.github.com>
Date: Wed, 14 Dec 2022 12:47:35 +0800
Subject: [PATCH] support flannel dual stack (#9564)

---
 roles/network_plugin/flannel/templates/cni-flannel.yml.j2 | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/roles/network_plugin/flannel/templates/cni-flannel.yml.j2 b/roles/network_plugin/flannel/templates/cni-flannel.yml.j2
index 819061119..607d22567 100644
--- a/roles/network_plugin/flannel/templates/cni-flannel.yml.j2
+++ b/roles/network_plugin/flannel/templates/cni-flannel.yml.j2
@@ -31,6 +31,11 @@ data:
   net-conf.json: |
     {
       "Network": "{{ kube_pods_subnet }}",
+      "EnableIPv4": true,
+{%   if enable_dual_stack_networks %}
+      "EnableIPv6": true,
+      "IPv6Network": "{{ kube_pods_subnet_ipv6 }}",
+{%   endif %}
       "Backend": {
         "Type": "{{ flannel_backend_type }}"{% if flannel_backend_type == "vxlan" %},
         "VNI": {{ flannel_vxlan_vni }},
-- 
GitLab