mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
99 lines
4.0 KiB
Plaintext
99 lines
4.0 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/external_dns_operator/nw-configuration-parameters.adoc
|
|
|
|
:_mod-docs-content-type: REFERENCE
|
|
[id="nw-external-dns-operator-configuration-parameters_{context}"]
|
|
= External DNS Operator configuration parameters
|
|
|
|
[role="_abstract"]
|
|
To customize the behavior of the External DNS Operator, configure the available parameters in the `ExternalDNS` custom resource (CR). By configuring parameters, you can control how the Operator synchronizes services and routes with your external DNS provider.
|
|
|
|
[cols="3a,8a",options="header"]
|
|
|===
|
|
|Parameter |Description
|
|
|
|
|`spec`
|
|
|Enables the type of a cloud provider.
|
|
|
|
[source,yaml]
|
|
----
|
|
spec:
|
|
provider:
|
|
type: AWS
|
|
aws:
|
|
credentials:
|
|
name: aws-access-key
|
|
----
|
|
* `provider.type`: Specifies available options such as AWS, {gcp-short}, Azure, and Infoblox.
|
|
* `provider.aws.credentials.name`: Specifies a secret name for your cloud provider.
|
|
|
|
|`zones`
|
|
|Enables you to specify DNS zones by their domains. If you do not specify zones, the `ExternalDNS` resource discovers all of the zones present in your cloud provider account.
|
|
|
|
[source,yaml]
|
|
----
|
|
zones:
|
|
- "<zone_id>"
|
|
----
|
|
* `<zone_id>`: Specifies the name of DNS zones.
|
|
|
|
|`domains`
|
|
|Enables you to specify AWS zones by their domains. If you do not specify domains, the `ExternalDNS` resource discovers all of the zones present in your cloud provider account.
|
|
|
|
[source,yaml]
|
|
----
|
|
domains:
|
|
- filterType: Include
|
|
matchType: Exact
|
|
name: "myzonedomain1.com"
|
|
- filterType: Include
|
|
matchType: Pattern
|
|
pattern: ".*\\.otherzonedomain\\.com"
|
|
----
|
|
* `domains.filterType`: Specifies that the `ExternalDNS` resource includes the domain name.
|
|
* `domains.matchType`: Specifies that the domain matching has to be exact as opposed to regular expression match.
|
|
* `domains.name`: Specifies the name of the domain.
|
|
* `filterType.matchType`: Specifies the `regex-domain-filter` flag in the `ExternalDNS` resource. You can limit possible domains by using a Regex filter.
|
|
* `filterType.pattern`: Specifies the regex pattern to be used by the `ExternalDNS` resource to filter the domains of the target zones.
|
|
|
|
|`source`
|
|
|Enables you to specify the source for the DNS records, `Service` or `Route`.
|
|
|
|
[source,yaml]
|
|
----
|
|
source:
|
|
type: Service
|
|
service:
|
|
serviceType:
|
|
- LoadBalancer
|
|
- ClusterIP
|
|
labelFilter:
|
|
matchLabels:
|
|
external-dns.mydomain.org/publish: "yes"
|
|
hostnameAnnotation: "Allow"
|
|
fqdnTemplate:
|
|
- "{{.Name}}.myzonedomain.com"
|
|
----
|
|
* `source`: Specifies the settings for the source of DNS records.
|
|
* `source.type`: Specifies that the `ExternalDNS` CR uses the `Service` type as the source for creating DNS records.
|
|
* `service.serviceType`: Specifies the `service-type-filter` flag in the `ExternalDNS` resource. The `serviceType` contains the following fields: `default`: `LoadBalancer`; `expected`: `ClusterIP`; `NodePort`; `LoadBalancer`; `ExternalName`.
|
|
* `service.labelFilter`: Specifies that the controller considers only those resources that match with label filter.
|
|
* `hostnameAnnotation`: Specifies that the default value for `hostnameAnnotation` is `Ignore` which instructs `ExternalDNS` to generate DNS records by using the templates specified in the field `fqdnTemplates`. When the value is `Allow` the DNS records get generated based on the value specified in the `external-dns.alpha.kubernetes.io/hostname` annotation.
|
|
* `fqdnTemplate`: Specifies that the External DNS Operator uses a string to generate DNS names from sources that do not define a hostname, or to add a hostname suffix when paired with the fake source.
|
|
|
|
[source,yaml]
|
|
----
|
|
source:
|
|
type: OpenShiftRoute
|
|
openshiftRouteOptions:
|
|
routerName: default
|
|
labelFilter:
|
|
matchLabels:
|
|
external-dns.mydomain.org/publish: "yes"
|
|
----
|
|
* `source.type`: Specifies the creation of DNS records.
|
|
* `openshiftRouteOptions.routerName`: Specifies if the source type is `OpenShiftRoute`. If so, you can pass the Ingress Controller name. The `ExternalDNS` resource uses the canonical name of the Ingress Controller as the target for CNAME records.
|
|
|
|
|===
|