k8s.io/perf-tests/clusterloader2@v0.0.0-20240304094227-64bdb12da87e/testing/load/networkpolicy.yaml (about)

     1  {{if eq (Mod .Index 10) 0}} # Create for only 10% of deployments
     2  apiVersion: networking.k8s.io/v1
     3  kind: NetworkPolicy
     4  metadata:
     5    name: {{.Name}}
     6  spec:
     7    podSelector:
     8      matchLabels:
     9        name: {{.BaseName}}-{{.Index}}
    10    policyTypes:
    11      - Egress
    12    egress:
    13      - to:
    14          - ipBlock:
    15              cidr: 10.0.0.0/24
    16        ports:
    17          - protocol: TCP
    18            port: 8080
    19  {{end}}