github.com/form3tech-oss/cilium@v1.6.3/examples/kubernetes-memcached/memcd-sw-security-policy.yaml (about)

     1  apiVersion: "cilium.io/v2"
     2  kind: CiliumNetworkPolicy
     3  metadata:
     4    name: "secure-fleet"
     5  spec:
     6    endpointSelector:
     7      matchLabels:
     8        app: memcd-server
     9    ingress:
    10    - fromEndpoints:
    11      - matchLabels:
    12          app: a-wing
    13      toPorts:
    14      - ports:
    15        - port: '11211'
    16          protocol: TCP
    17        rules:
    18          l7proto: memcache
    19          l7:
    20          - command: get
    21            keyExact: awing-coord
    22          - command: set
    23            keyExact: awing-coord
    24    - fromEndpoints:
    25      - matchLabels:
    26          app: x-wing
    27      toPorts:
    28      - ports:
    29        - port: '11211'
    30          protocol: TCP
    31        rules:
    32          l7proto: memcache
    33          l7:
    34          - command: get
    35            keyExact: xwing-coord
    36          - command: set
    37            keyExact: xwing-coord
    38    - fromEndpoints:
    39      - matchLabels:
    40          name: fleet-tracker
    41      toPorts:
    42      - ports:
    43        - port: '11211'
    44          protocol: TCP
    45        rules:
    46          l7proto: memcache
    47          l7:
    48          - command: get
    49            keyExact: awing-coord
    50          - command: get
    51            keyExact: xwing-coord