oc export networkpolicy produces semantically incorrect output
Issue
# oc export networkpolicy <name>
apiVersion: v1
items:
- Spec:
Ingress:
- From:
- NamespaceSelector:
matchLabels:
pod.network.openshift.io/legacy-netid: "0"
PodSelector: null
Ports: null
PodSelector: {}
creationTimestamp: null
generation: 1
name: allow-from-global-namespaces
- Spec:
Ingress:
- From:
- NamespaceSelector: null
PodSelector: {}
Ports: null
PodSelector: {}
creationTimestamp: null
generation: 1
name: allow-from-self
- Spec:
Ingress: null
PodSelector: {}
creationTimestamp: null
generation: 1
name: default-deny
kind: List
metadata: {}
# oc export networkpolicy allow-from-self
Spec:
Ingress:
- From:
- NamespaceSelector: null
PodSelector: {}
Ports: null
PodSelector: {}
creationTimestamp: null
generation: 1
name: allow-from-self
- Both apiVersion and kind are missing from the output.
Environment
- Openshift Container Platform
- 3.7.9
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.