Last active
October 12, 2019 15:10
-
-
Save stewartshea/b1b183bdf161163c340a8f1803121a53 to your computer and use it in GitHub Desktop.
aporeto-microservice-policies
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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