adjust policy for dns
This commit is contained in:
@@ -11,21 +11,20 @@ spec:
|
|||||||
- Egress
|
- Egress
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
|
### Allow intra-namespace communication
|
||||||
- from:
|
- from:
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
kubernetes.io/metadata.name: irc
|
kubernetes.io/metadata.name: irc
|
||||||
|
###
|
||||||
|
### Allow traffic from gateways
|
||||||
- from:
|
- from:
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
kubernetes.io/metadata.name: istio-system
|
kubernetes.io/metadata.name: istio-system
|
||||||
|
###
|
||||||
egress:
|
egress:
|
||||||
- to:
|
### Allow DNS resolution
|
||||||
- namespaceSelector:
|
|
||||||
matchLabels:
|
|
||||||
kubernetes.io/metadata.name: irc
|
|
||||||
|
|
||||||
- to:
|
- to:
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@@ -38,7 +37,14 @@ spec:
|
|||||||
port: 53
|
port: 53
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 53
|
port: 53
|
||||||
|
###
|
||||||
|
### Allow intra-namespace communication
|
||||||
|
- to:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: irc
|
||||||
|
###
|
||||||
|
### Allow outbound to the world
|
||||||
- to:
|
- to:
|
||||||
- ipBlock:
|
- ipBlock:
|
||||||
cidr: 0.0.0.0/0
|
cidr: 0.0.0.0/0
|
||||||
@@ -46,3 +52,4 @@ spec:
|
|||||||
- 10.0.0.0/8
|
- 10.0.0.0/8
|
||||||
- 172.16.0.0/12
|
- 172.16.0.0/12
|
||||||
- 192.168.0.0/16
|
- 192.168.0.0/16
|
||||||
|
###
|
||||||
+22
-4
@@ -11,23 +11,40 @@ spec:
|
|||||||
- Egress
|
- Egress
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
|
### Allow intra-namespace communication
|
||||||
- from:
|
- from:
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
kubernetes.io/metadata.name: irc
|
kubernetes.io/metadata.name: irc
|
||||||
|
###
|
||||||
|
### Allow traffic from gateways
|
||||||
- from:
|
- from:
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
kubernetes.io/metadata.name: istio-system
|
kubernetes.io/metadata.name: istio-system
|
||||||
|
###
|
||||||
egress:
|
egress:
|
||||||
# namespace-local
|
### Allow DNS resolution
|
||||||
|
- to:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: kube-system
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: kube-dns
|
||||||
|
ports:
|
||||||
|
- protocol: UDP
|
||||||
|
port: 53
|
||||||
|
- protocol: TCP
|
||||||
|
port: 53
|
||||||
|
###
|
||||||
|
### Allow intra-namespace communication
|
||||||
- to:
|
- to:
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
kubernetes.io/metadata.name: irc
|
kubernetes.io/metadata.name: irc
|
||||||
|
###
|
||||||
# public internet only
|
### Allow outbound to the world
|
||||||
- to:
|
- to:
|
||||||
- ipBlock:
|
- ipBlock:
|
||||||
cidr: 0.0.0.0/0
|
cidr: 0.0.0.0/0
|
||||||
@@ -35,3 +52,4 @@ spec:
|
|||||||
- 10.0.0.0/8
|
- 10.0.0.0/8
|
||||||
- 172.16.0.0/12
|
- 172.16.0.0/12
|
||||||
- 192.168.0.0/16
|
- 192.168.0.0/16
|
||||||
|
###
|
||||||
Reference in New Issue
Block a user