Fix service issue and patch cnf 75/4575/1
authorLe Yao <le.yao@intel.com>
Wed, 22 Dec 2021 07:06:41 +0000 (07:06 +0000)
committerLe Yao <le.yao@intel.com>
Wed, 22 Dec 2021 07:06:41 +0000 (07:06 +0000)
Signed-off-by: Le Yao <le.yao@intel.com>
Change-Id: Icdf1a2d87034e2e04600ed0613e26eaf78000bc8

platform/cnf-openwrt/src/Dockerfile_sdewan.tpl
platform/cnf-openwrt/src/Dockerfile_sdewan_noproxy.tpl
platform/cnf-openwrt/src/cnfroute [moved from platform/cnf-openwrt/src/rest_v1/cnfroute with 100% similarity]
platform/crd-ctrlr/src/controllers/cnfservice_controller.go
platform/deployment/helm/sdewan_cnf/templates/cm.yaml

index 5d6b7e2..c1f634c 100644 (file)
@@ -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
index c490692..f564878 100644 (file)
@@ -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
index 182eb94..2efaacf 100644 (file)
@@ -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)
 }
index 15e15aa..5616207 100644 (file)
@@ -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 <<EOF
     config globals 'globals'