Skip to content

Instantly share code, notes, and snippets.

@stewartshea
Last active October 12, 2019 15:10
Show Gist options
  • Save stewartshea/b1b183bdf161163c340a8f1803121a53 to your computer and use it in GitHub Desktop.
Save stewartshea/b1b183bdf161163c340a8f1803121a53 to your computer and use it in GitHub Desktop.
aporeto-microservice-policies
$ cat restrict-microservices-all.yml
APIVersion: 0
data:
networkaccesspolicies:
- action: Reject
logsEnabled: true
fallback: true
name: reject-microservice-fallback
object:
- - $namespace=/aporeto/gigaom/mct/gcp/*
propagate: true
subject:
- - $namespace=/aporeto/gigaom/mct/azure/*
- $type=Docker
identities:
- networkaccesspolicy
label: reject-microservice-fallback
$ apoctl api import --file restrict-microservices-all.yml -n /aporeto/gigaom/mct
successfully imported data in /aporeto/gigaom/mct
$ cat allow-microservices-http.yml
APIVersion: 0
data:
networkaccesspolicies:
- logsEnabled: true
name: allow-microservices-http
object:
- - $namespace=/aporeto/gigaom/mct/gcp/*
ports:
- tcp/80
propagate: true
subject:
- - $namespace=/aporeto/gigaom/mct/azure/*
- $type=Docker
identities:
- networkaccesspolicy
label: allow-microservices-http
$ apoctl api import --file allow-microservices-http.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