github.com/fafucoder/cilium@v1.6.11/examples/policies/l7/kafka/kafka.yaml (about)

     1  apiVersion: "cilium.io/v2"
     2  kind: CiliumNetworkPolicy
     3  description: "enable empire-hq to produce to empire-announce and deathstar-plans"
     4  metadata:
     5    name: "rule1"
     6  spec:
     7    endpointSelector:
     8      matchLabels:
     9        app: kafka
    10    ingress:
    11    - fromEndpoints:
    12      - matchLabels:
    13          app: empire-hq
    14      toPorts:
    15      - ports:
    16        - port: "9092"
    17          protocol: TCP
    18        rules:
    19          kafka:
    20          - apiKey: "apiversions"
    21          - apiKey: "metadata"
    22          - apiKey: "produce"
    23            topic: "deathstar-plans"
    24          - apiKey: "produce"
    25            topic: "empire-announce"