Skip to content

gw-tester/nse-injector-webhook

Repository files navigation

NSE Webhook Injector

Go Report Card GoDoc Docker License

Summary

This project provides a Kubernetes Mutating Admission Webhook server that injects Network Service Mesh Endpoint sidecar.

Requirements

  • Install the latest NSM services.

  • The namespace must have enabled the sidecar injection through a label:

kubectl label namespace default nse-sidecar-injection=enabled
  • The Kubernetes Pod requires at least one NSM endpoint definition:
apiVersion: v1
kind: Pod
metadata:
  name: example
  annotations:
    ns.networkservicemesh.io/endpoints: |
      {
        "name": "lte-network",
        "networkServices": [
          {
            "link": "s5u",
            "labels": "app=pgw-s5u",
            "ipaddress": "172.25.0.0/24"
          },
          {
            "link": "sgi",
            "labels": "app=http-server-sgi",
            "ipaddress": "10.0.1.0/24",
            "route": "10.0.3.0/24"
          }
        ]
      }
spec:
  containers:
    - image: busybox:stable
      name: instance
      command:
        - sleep
      args:
        - infinity