Skip to content

Instantly share code, notes, and snippets.

@stewartshea
Last active October 12, 2019 16:39
Show Gist options
  • Save stewartshea/696ede69a2195ea021d878513438bd57 to your computer and use it in GitHub Desktop.
Save stewartshea/696ede69a2195ea021d878513438bd57 to your computer and use it in GitHub Desktop.
$ cat isolate-default-k8s-ns.yml
APIVersion: 0
data:
networkaccesspolicies:
- action: Reject
logsEnabled: true
fallback: true
name: isolate-default-namespace
object:
- - "@app:k8s:namespace=default"
propagate: true
subject:
- - $namespace=/aporeto/gigaom/mct/*
- $type=Docker
identities:
- networkaccesspolicy
label: isolate-default-namespace
$ apoctl api import --file isolate-default-k8s-ns.yml -n /aporeto/gigaom/mct
successfully imported data in /aporeto/gigaom/mct
$ cat allow-testns-to-defaultns.yml
APIVersion: 0
data:
networkaccesspolicies:
- logsEnabled: true
name: allow-testns-to-defaultns
object:
- - "@app:k8s:namespace=default"
propagate: true
subject:
- - "@app:k8s:namespace=testns"
identities:
- networkaccesspolicy
label: allow-testns-to-defaultns
$ apoctl api import --file allow-testns-to-defaultns.yml -n /aporeto/gigaom/mct
successfully imported data in /aporeto/gigaom/mct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment