apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  labels:
    app.kubernetes.io/instance: cbci
    app.kubernetes.io/name: cloudbees-core
  name: cjoc-controller-ingress
  namespace: cbci
spec:
  ingress:
  - from:
    - podSelector:
        matchLabels:
          com.cloudbees.cje.type: master
    - namespaceSelector:
        matchLabels:
          com.cloudbees.ci.type: controller
      podSelector:
        matchLabels:
          com.cloudbees.cje.type: master
    ports:
    - port: http
      protocol: TCP
    - port: jnlp
      protocol: TCP
  podSelector:
    matchLabels:
      app.kubernetes.io/component: cjoc
      app.kubernetes.io/instance: cbci