apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: spec-policytypes-test-ingress
  namespace: kube-system
spec:
  podSelector: {}
  # exists with egress only but there is an ingress section :
  policyTypes:
  - Egress
  ingress:
  - from:
    - ipBlock:
        cidr: 172.17.0.0/16
        except:
        - 172.17.1.0/24