Please enter the commit message for your changes. Lines starting
Ingress Policies
This commit is contained in:
parent
05758f56b8
commit
5ed158a69b
10 changed files with 231 additions and 0 deletions
17
network-policies/adservicepolicy.yaml
Normal file
17
network-policies/adservicepolicy.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: ad-allow-frontend
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: adservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
ports:
|
||||
- port: 9555
|
||||
|
33
network-policies/cartservicepolicy.yaml
Normal file
33
network-policies/cartservicepolicy.yaml
Normal file
|
@ -0,0 +1,33 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: cart-allow-checkout
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: cartservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: checkoutservice
|
||||
ports:
|
||||
- port: 7070
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: cart-allow-frontend
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: cartservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
ports:
|
||||
- port: 7070
|
16
network-policies/checkoutservicepolicy.yaml
Normal file
16
network-policies/checkoutservicepolicy.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: checkout-allow-frontend
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: checkoutservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
ports:
|
||||
- port: 5050
|
34
network-policies/currencyservicepolicy.yaml
Normal file
34
network-policies/currencyservicepolicy.yaml
Normal file
|
@ -0,0 +1,34 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: currencyservice-allow-frontend
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: currencyservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
ports:
|
||||
- port: 7000
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: currencyservice-allow-checkout
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: currencyservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: checkoutservice
|
||||
ports:
|
||||
- port: 7000
|
||||
---
|
16
network-policies/emailservicepolicy.yaml
Normal file
16
network-policies/emailservicepolicy.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: email-allow-checkout
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: emailservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: checkoutservice
|
||||
ports:
|
||||
- port: 5050
|
0
network-policies/frontendservicepolicy.yaml
Normal file
0
network-policies/frontendservicepolicy.yaml
Normal file
16
network-policies/paymentservicepolicy.yaml
Normal file
16
network-policies/paymentservicepolicy.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: payment-allow-checkout
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: paymentservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: checkoutservice
|
||||
ports:
|
||||
- port: 50051
|
50
network-policies/productcatalogservicepolicy.yaml
Normal file
50
network-policies/productcatalogservicepolicy.yaml
Normal file
|
@ -0,0 +1,50 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: product-allow-frontend
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: productcatalogservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
ports:
|
||||
- port: 3550
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: product-allow-recommend
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: productcatalogservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: recommendationservice
|
||||
ports:
|
||||
- port: 3550
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: product-allow-checkout
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: productcatalogservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: checkoutservice
|
||||
ports:
|
||||
- port: 3550
|
16
network-policies/recommendationservicepolicy.yaml
Normal file
16
network-policies/recommendationservicepolicy.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: recommendationservice-allow-frontend
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: recommendationservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
ports:
|
||||
- port: 8080
|
33
network-policies/shippingservicepolicy.yaml
Normal file
33
network-policies/shippingservicepolicy.yaml
Normal file
|
@ -0,0 +1,33 @@
|
|||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: shipping-allow-frontend
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: shippingservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: frontend
|
||||
ports:
|
||||
- port: 50051
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: NetworkPolicy
|
||||
metadata:
|
||||
name: shipping-allow-checkout
|
||||
namespace: default
|
||||
spec:
|
||||
podSelector:
|
||||
matchLabels:
|
||||
app: shippingservice
|
||||
ingress:
|
||||
- from:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
app: checkoutservice
|
||||
ports:
|
||||
- port: 50051
|
Loading…
Add table
Add a link
Reference in a new issue