apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: easyai-application-ingress
spec:
  podSelector:
    matchExpressions:
      - key: app.kubernetes.io/name
        operator: In
        values: [easyai-api, easyai-worker, easyai-web, easyai-capacity-controller]
  policyTypes: [Ingress]
  ingress:
    - from:
        - namespaceSelector:
            matchLabels:
              kubernetes.io/metadata.name: easyai
        - ipBlock:
            cidr: 10.77.0.0/24
      ports:
        - protocol: TCP
          port: 8088
        - protocol: TCP
          port: 80
