Skip to content

Commit

Permalink
kubernetes/connectivity-check: Whitelist OpenShift DNS
Browse files Browse the repository at this point in the history
OpenShift DNS is using non-standard labels and non-standard namespace.

Signed-off-by: Thomas Graf <thomas@cilium.io>
  • Loading branch information
tgraf committed Apr 1, 2020
1 parent 4459e83 commit 2069570
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/kubernetes/connectivity-check/connectivity-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ spec:
- ports:
- port: "53"
protocol: UDP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: openshift-dns
k8s:dns.operator.openshift.io/daemonset-dns: default
toPorts:
- ports:
- port: "5353"
protocol: UDP
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -243,6 +251,14 @@ spec:
- ports:
- port: "53"
protocol: UDP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: openshift-dns
k8s:dns.operator.openshift.io/daemonset-dns: default
toPorts:
- ports:
- port: "5353"
protocol: UDP
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -438,6 +454,17 @@ spec:
rules:
dns:
- matchPattern: "*"
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: openshift-dns
k8s:dns.operator.openshift.io/daemonset-dns: default
toPorts:
- ports:
- port: "5353"
protocol: UDP
rules:
dns:
- matchPattern: "*"
- toFQDNs:
- matchPattern: "*.google.com"
---
8 changes: 8 additions & 0 deletions examples/kubernetes/connectivity-check/pod-to-a-allowed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,11 @@ spec:
- ports:
- port: "53"
protocol: UDP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: openshift-dns
k8s:dns.operator.openshift.io/daemonset-dns: default
toPorts:
- ports:
- port: "5353"
protocol: UDP
8 changes: 8 additions & 0 deletions examples/kubernetes/connectivity-check/pod-to-a-denied.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,11 @@ spec:
- ports:
- port: "53"
protocol: UDP
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: openshift-dns
k8s:dns.operator.openshift.io/daemonset-dns: default
toPorts:
- ports:
- port: "5353"
protocol: UDP
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,16 @@ spec:
rules:
dns:
- matchPattern: "*"
- toEndpoints:
- matchLabels:
k8s:io.kubernetes.pod.namespace: openshift-dns
k8s:dns.operator.openshift.io/daemonset-dns: default
toPorts:
- ports:
- port: "5353"
protocol: UDP
rules:
dns:
- matchPattern: "*"
- toFQDNs:
- matchPattern: "*.google.com"

0 comments on commit 2069570

Please sign in to comment.