github.com/fafucoder/cilium@v1.6.11/examples/kubernetes-istio/kafka-v1-policy.yaml (about)

     1  apiVersion: "cilium.io/v2"
     2  kind: CiliumNetworkPolicy
     3  metadata:
     4    name: kafka-authaudit
     5  specs:
     6    - endpointSelector:
     7        matchLabels:
     8          "k8s:app": kafka
     9      ingress:
    10      - fromEndpoints:
    11        - matchLabels:
    12            "k8s:app": productpage
    13            "k8s:version": v2
    14        toPorts:
    15        - ports:
    16          - port: "9092"
    17            protocol: TCP
    18          rules:
    19            kafka:
    20            - apiKey: "produce"
    21              topic: "authaudit"
    22            - apiKey: "apiversions"
    23            - apiKey: "metadata"
    24            - apiKey: "heartbeat"
    25      - fromEndpoints:
    26        - matchLabels:
    27            app: kafka
    28      - fromEndpoints:
    29        - matchLabels:
    30            "k8s:app": authaudit-logger
    31        toPorts:
    32        - ports:
    33          - port: "9092"
    34            protocol: TCP
    35          rules:
    36            kafka:
    37            - apiKey: "fetch"
    38              topic: "authaudit"
    39            - apiKey: "apiversions"
    40            - apiKey: "metadata"
    41            - apiKey: "findcoordinator"
    42            - apiKey: "joingroup"
    43            - apiKey: "leavegroup"
    44            - apiKey: "syncgroup"
    45            - apiKey: "offsets"
    46            - apiKey: "offsetcommit"
    47            - apiKey: "offsetfetch"
    48            - apiKey: "heartbeat"