From: Le Yao Date: Wed, 22 Dec 2021 07:06:41 +0000 (+0000) Subject: Fix service issue and patch cnf X-Git-Tag: 21.12.02~5 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=55d2f3d2d8e48173d2b7b1b3189e85a6302eaffd;p=icn%2Fsdwan.git Fix service issue and patch cnf Signed-off-by: Le Yao Change-Id: Icdf1a2d87034e2e04600ed0613e26eaf78000bc8 --- diff --git a/platform/cnf-openwrt/src/Dockerfile_sdewan.tpl b/platform/cnf-openwrt/src/Dockerfile_sdewan.tpl index 5d6b7e2..c1f634c 100644 --- a/platform/cnf-openwrt/src/Dockerfile_sdewan.tpl +++ b/platform/cnf-openwrt/src/Dockerfile_sdewan.tpl @@ -21,6 +21,7 @@ RUN mkdir /var/lock && \ opkg install luci-app-mwan3; exit 0 COPY strongswan.conf /etc/strongswan.conf +COPY cnfroute /etc/cnfroute COPY system /etc/config/system COPY ipsec /etc/config/ipsec COPY ipsec_exec /etc/init.d/ipsec diff --git a/platform/cnf-openwrt/src/Dockerfile_sdewan_noproxy.tpl b/platform/cnf-openwrt/src/Dockerfile_sdewan_noproxy.tpl index c490692..f564878 100644 --- a/platform/cnf-openwrt/src/Dockerfile_sdewan_noproxy.tpl +++ b/platform/cnf-openwrt/src/Dockerfile_sdewan_noproxy.tpl @@ -18,6 +18,7 @@ RUN mkdir /var/lock && \ opkg install luci-app-mwan3; exit 0 COPY strongswan.conf /etc/strongswan.conf +COPY cnfroute /etc/cnfroute COPY system /etc/config/system COPY ipsec /etc/config/ipsec COPY ipsec_exec /etc/init.d/ipsec diff --git a/platform/cnf-openwrt/src/rest_v1/cnfroute b/platform/cnf-openwrt/src/cnfroute similarity index 100% rename from platform/cnf-openwrt/src/rest_v1/cnfroute rename to platform/cnf-openwrt/src/cnfroute diff --git a/platform/crd-ctrlr/src/controllers/cnfservice_controller.go b/platform/crd-ctrlr/src/controllers/cnfservice_controller.go index 182eb94..2efaacf 100644 --- a/platform/crd-ctrlr/src/controllers/cnfservice_controller.go +++ b/platform/crd-ctrlr/src/controllers/cnfservice_controller.go @@ -8,7 +8,7 @@ import ( "github.com/go-logr/logr" appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" + //corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" ctrl "sigs.k8s.io/controller-runtime" "sigs.k8s.io/controller-runtime/pkg/client" @@ -114,11 +114,11 @@ func (r *CNFServiceReconciler) SetupWithManager(mgr ctrl.Manager) error { ToRequests: handler.ToRequestsFunc(GetToRequestsFunc(r, &batchv1alpha1.CNFServiceList{})), }, Filter). - Watches( - &source.Kind{Type: &corev1.Service{}}, - &handler.EnqueueRequestsFromMapFunc{ - ToRequests: handler.ToRequestsFunc(GetServiceToRequestsFunc(r)), - }, - IPFilter). + //Watches( + // &source.Kind{Type: &corev1.Service{}}, + // &handler.EnqueueRequestsFromMapFunc{ + // ToRequests: handler.ToRequestsFunc(GetServiceToRequestsFunc(r)), + // }, + // IPFilter). Complete(r) } diff --git a/platform/deployment/helm/sdewan_cnf/templates/cm.yaml b/platform/deployment/helm/sdewan_cnf/templates/cm.yaml index 15e15aa..5616207 100644 --- a/platform/deployment/helm/sdewan_cnf/templates/cm.yaml +++ b/platform/deployment/helm/sdewan_cnf/templates/cm.yaml @@ -19,6 +19,7 @@ data: #!/bin/bash # Always exit on errors. set -ex + sysctl -w net.ipv4.ip_forward=1 echo "" > /etc/config/network cat > /etc/config/mwan3 <