apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: netpolicy-jenkins
spec:
  podSelector:
    matchLabels:
      app: jenkins
  ingress:
    - ports:
        - port: 80
        - port: 8080
        - port: 443
  egress: 
    - {}
  policyTypes:
   - Ingress
   - Egress
