Facebook
From Queen Prairie Dog, 4 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 132
  1. # curl -O https://raw.githubusercontent.com/openshift/origin/master/contrib/migration/migrate-network-policy.sh
  2. # chmod +x migrate-network-policy.sh
  3.  
  4.  
  5. # oc export networkpolicy/allow-from-global-namespaces
  6. apiVersion: extensions/v1beta1
  7. kind: NetworkPolicy
  8. metadata:
  9.   creationTimestamp: null
  10.   generation: 1
  11.   name: allow-from-global-namespaces
  12. spec:
  13.   ingress:
  14.   - from:
  15.     - namespaceSelector:
  16.         matchLabels:
  17.           pod.network.openshift.io/legacy-netid: "0"
  18.   podSelector: {}
  19.   policyTypes:
  20.   - Ingress