Allow custom routes inside UPF

This is required to work around liveness failure in a single interface
machine where Kubelet node IP is part of eNB subnet.

Change-Id: I37549d89fbe7e045e6639295c29652ba0d6fb5e4
diff --git a/bess-upf/Chart.yaml b/bess-upf/Chart.yaml
index 9cb42b8..42f21df 100644
--- a/bess-upf/Chart.yaml
+++ b/bess-upf/Chart.yaml
@@ -7,4 +7,4 @@
 name: bess-upf
 icon: https://guide.opencord.org/logos/cord.svg
 
-version: 0.0.5
+version: 0.0.6
diff --git a/bess-upf/templates/statefulset-upf.yaml b/bess-upf/templates/statefulset-upf.yaml
index 8816359..3786a89 100644
--- a/bess-upf/templates/statefulset-upf.yaml
+++ b/bess-upf/templates/statefulset-upf.yaml
@@ -61,6 +61,9 @@
         args:
         - ip route replace {{ .Values.config.upf.enb.subnet }} via {{ .Values.config.upf.access.gateway }};
           ip route replace default via {{ .Values.config.upf.core.gateway }} metric 110;
+          {{- range .Values.config.upf.routes }}
+          ip route replace {{ .to }} via {{ .via }};
+          {{- end }}
           iptables -I OUTPUT -p icmp --icmp-type port-unreachable -j DROP;
         securityContext:
           capabilities:
diff --git a/bess-upf/values.yaml b/bess-upf/values.yaml
index e48d0b3..bf1a8e0 100644
--- a/bess-upf/values.yaml
+++ b/bess-upf/values.yaml
@@ -65,6 +65,10 @@
       enabled: true
     # Dynamic IP allocation is not supported yet
     ipam: static
+    # Custom routes inside UPF
+    #routes:
+    #  - to: 10.76.28.173/32
+    #    via: 169.254.1.1
     cniPlugin: vfioveth
     enb:
       subnet: 192.168.251.0/24