Skip to content

Instantly share code, notes, and snippets.

@rdimitrov
Created August 20, 2019 14:22
Show Gist options
  • Save rdimitrov/b58f7e4d092a44e7916172f942c1d159 to your computer and use it in GitHub Desktop.
Save rdimitrov/b58f7e4d092a44e7916172f942c1d159 to your computer and use it in GitHub Desktop.
Adding custom routes to simple network service client
diff --git a/k8s/conf/nsc.yaml b/k8s/conf/nsc.yaml
index 43f17e2b..d4f18be3 100644
--- a/k8s/conf/nsc.yaml
+++ b/k8s/conf/nsc.yaml
@@ -15,8 +15,18 @@ spec:
- name: alpine-img
image: alpine:latest
command: ['tail', '-f', '/dev/null']
+ initContainers:
+ - name: nsm-init-container
+ image: networkservicemesh/nsm-init:master
+ imagePullPolicy: IfNotPresent
+ env:
+ - name: NS_NETWORKSERVICEMESH_IO
+ value: icmp-responder?app=icmp
+ - name: ROUTES
+ value: "8.8.8.8/30"
+ resources:
+ limits:
+ networkservicemesh.io/socket: "1"
metadata:
name: alpine-nsc
namespace: nsm-system
- annotations:
- ns.networkservicemesh.io: icmp-responder?app=icmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment