You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ExternalDNS configuration can come from these sources: resource annotations, CLI flags, environment variables, and defaults.
4
+
The effective value is determined by the following precedence order:
5
+
6
+
```mermaid
7
+
flowchart TD
8
+
A[1. Resource Annotations] -->|Override| Result
9
+
B[2. CLI Flags] -->|Used if no annotation| Result
10
+
C[3. Environment Variables] -->|May override defaults<br/>and in some cases flags/annotations| Result
11
+
D[4. Defaults] -->|Fallback| Result
12
+
13
+
subgraph Flags
14
+
B1[Filter Flags: --flag-with-filter] -->|Define scope<br/>Annotations outside scope ignored| B
15
+
B2[Non-filter Flags] -->|Apply if no annotation| B
16
+
end
17
+
18
+
Result[Effective ExternalDNS Configuration]
19
+
20
+
A --> Result
21
+
B --> Result
22
+
D --> Result
23
+
```
24
+
25
+
1.**Annotations**
26
+
- Most configuration options can be set via annotations on supported resources.
27
+
- When present, annotations override the corresponding CLI flags and defaults.
28
+
- Exception: should be documented.
29
+
- Exception: ignored when applied to `kind: DNSEndpoint`
30
+
- Exception: filter flags (e.g. `--service-type-filter`, `--source`) define the *scope* of resources considered.
31
+
32
+
2.**CLI Flags**
33
+
- Non-filter flags apply if no annotation overrides them.
34
+
- Filter flags (`--source`, `--service-type-filter`, `--*-filter`) limit which resources are processed.
35
+
- Annotations outside the defined scope are ignored.
36
+
- If a resource is excluded by a filter, annotations configured on the resource or defaults will not be applied.
37
+
38
+
3.**Environment Variables**
39
+
- May override defaults, and in some cases may take precedence over CLI flags and annotations.
40
+
- Behavior depends on how the variable is mapped in the code. Where or not it replicates CLI flag or provider specific. Example: `kubectl` or `cloudflare`.
41
+
42
+
4.**Defaults**
43
+
- If none of the above specify a value, ExternalDNS falls back to its defaults.
Specifies which set of addresses to use for a headless `Service`.
50
+
Specifies which set of addresses to use for a [`headless Service`](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services).
51
+
52
+
Supported values:
53
+
54
+
-`NodeExternalIP`. Required `--service-type-filter=ClusterIP` and `--service-type-filter=Node` or no `--service-type-filter` flag specified.
55
+
-`HostIP`.
51
56
52
57
If the value is `NodeExternalIP`, use each relevant `Pod`'s `Node`'s address of type `ExternalIP`
0 commit comments