apiVersion: cilium.io/v2
kind: CiliumClusterwideNetworkPolicy
metadata:
  name: allow-mariadb-operator
spec:
  description: allow mariadb instances to be reached by operator
  endpointSelector:
    matchLabels:
      app.kubernetes.io/name: mariadb
  ingress:
    - fromEndpoints:
        - matchLabels:
            app.kubernetes.io/name: mariadb-operator
            io.kubernetes.pod.namespace: mariadb-operator
      toPorts:
        - ports:
            - port: "3306"
              protocol: TCP
