Skip to content

gw-tester/nse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Network Service Mesh Endpoint

Go Report Card GoDoc Docker License

Summary

This project provides a generic Network Service Mesh Endpoint which supports multiple services in one endpoint. It reads the network configuration values from the downwardAPI feature.

apiVersion: v1
kind: Pod 
metadata:
  name: pgw 
  annotations:
    ns.networkservicemesh.io/endpoints: |
      {   
        "name": "lte-network",
        "networkServices": [
          {"link": "s5u", "labels": "app=pgw-s5u", "ipaddress": "172.25.0.0/24"},
          {"link": "s5c", "labels": "app=pgw-s5c", "ipaddress": "172.25.1.0/24"},
          {"link": "sgi", "labels": "app=http-server-sgi", "ipaddress": "10.0.1.0/24", "route": "10.0.3.0/24"}
        ]   
      }   
spec:
  containers:
    - name: sidecar
      image: gwtester/nse:0.0.1
      resources:
        limits:
          networkservicemesh.io/socket: 1
      volumeMounts:
        - name: nsm-endpoints
          mountPath: /etc/nsminfo
    - image: gwtester/pgw:0.0.1
      name: pgw 
      securityContext:
        capabilities:
          add: ["NET_ADMIN"]
  volumes:
    - name: nsm-endpoints
      downwardAPI:
        items:
          - path: endpoints
            fieldRef:
              fieldPath: metadata.annotations['ns.networkservicemesh.io/endpoints']