|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/openshift_network_security/configuring-egress-firewall-ovn.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: CONCEPT |
| 6 | +[id="nw-coredns-egress-firewall_{context}"] |
| 7 | += Improved DNS resolution and resolving wildcard domain names |
| 8 | + |
| 9 | +There might be situations where the IP addresses associated with a DNS record change frequently, or you might want to specify wildcard domain names in your egress firewall policy rules. |
| 10 | + |
| 11 | +In this situation, the OVN-Kubernetes cluster manager creates a `DNSNameResolver` custom resource object for each unique DNS name used in your egress firewall policy rules. This custom resource stores the following information: |
| 12 | + |
| 13 | +:FeatureName: Improved DNS resolution for egress firewall rules |
| 14 | +include::snippets/technology-preview.adoc[] |
| 15 | + |
| 16 | +[source,yaml] |
| 17 | +.Example `DNSNameResolver` CR definition |
| 18 | +---- |
| 19 | +apiVersion: networking.openshift.io/v1alpha1 |
| 20 | +kind: DNSNameResolver |
| 21 | +spec: |
| 22 | + name: www.example.com. <1> |
| 23 | +status: |
| 24 | + resolvedNames: |
| 25 | + - dnsName: www.example.com. <2> |
| 26 | + resolvedAddress: |
| 27 | + - ip: "1.2.3.4" <3> |
| 28 | + ttlSeconds: 60 <4> |
| 29 | + lastLookupTime: "2023-08-08T15:07:04Z" <5> |
| 30 | +---- |
| 31 | +<1> The DNS name. This can be either a standard DNS name or a wildcard DNS name. For a wildcard DNS name, the DNS name resolution information contains all of the DNS names that match the wildcard DNS name. |
| 32 | +<2> The resolved DNS name matching the `spec.name` field. If the `spec.name` field contains a wildcard DNS name, then multiple `dnsName` entries are created that contain the standard DNS names that match the wildcard DNS name when resolved. If the wildcard DNS name can also be successfully resolved, then this field also stores the wildcard DNS name. |
| 33 | +<3> The current IP addresses associated with the DNS name. |
| 34 | +<4> The last time-to-live (TTL) duration. |
| 35 | +<5> The last lookup time. |
| 36 | + |
| 37 | +If during DNS resolution the DNS name in the query matches any name defined in a `DNSNameResolver` CR, then the previous information is updated accordingly in the CR `status` field. For unsuccessful DNS wildcard name lookups, the request is retried after a default TTL of 30 minutes. |
| 38 | + |
| 39 | +The OVN-Kubernetes cluster manager watches for updates to an `EgressFirewall` custom resource object, and creates, modifies, or deletes `DNSNameResolver` CRs associated with those egress firewall policies when that update occurs. |
| 40 | + |
| 41 | +[WARNING] |
| 42 | +==== |
| 43 | +Do not modify `DNSNameResolver` custom resources directly. This can lead to unwanted behavior of your egress firewall. |
| 44 | +==== |
0 commit comments