Skip to content

Commit 5578004

Browse files
authored
feat(chart): add option to configure annotationFilter via dedicated helm value (#5737)
* chore(scripts): fix `helm schema` flag Signed-off-by: Denis Shatokhin <[email protected]> * feat(chart): add option to configure `annotationFilter` via dedicated helm value Signed-off-by: Denis Shatokhin <[email protected]> * chore(docs): update changelog with pr Signed-off-by: Denis Shatokhin <[email protected]> * chore(chart): add period to the description string Signed-off-by: Denis Shatokhin <[email protected]> * chore(docs): update changelog list of changes Signed-off-by: Denis Shatokhin <[email protected]> --------- Signed-off-by: Denis Shatokhin <[email protected]>
1 parent ccb3e6b commit 5578004

File tree

6 files changed

+43
-23
lines changed

6 files changed

+43
-23
lines changed

charts/external-dns/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818

1919
## [UNRELEASED]
2020

21+
### Added
22+
23+
- Add option to configure `annotationFilter` via dedicated chart value. ([#5737](https://github.com/kubernetes-sigs/external-dns/pull/5737)) _@dshatokhin_
24+
2125
## [v1.18.0] - 2025-07-14
2226

2327
### Changed

charts/external-dns/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains
9494
| Key | Type | Default | Description |
9595
|-----|------|---------|-------------|
9696
| affinity | object | `{}` | Affinity settings for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels. |
97+
| annotationFilter | string | `nil` | Filter resources queried for endpoints by annotation selector. |
9798
| automountServiceAccountToken | bool | `true` | Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `Pod`. |
9899
| commonLabels | object | `{}` | Labels to add to all chart resources. |
99100
| deploymentAnnotations | object | `{}` | Annotations to add to the `Deployment`. |
@@ -117,7 +118,7 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains
117118
| imagePullSecrets | list | `[]` | Image pull secrets. |
118119
| initContainers | list | `[]` | [Init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to add to the `Pod` definition. |
119120
| interval | string | `"1m"` | Interval for DNS updates. |
120-
| labelFilter | string | `nil` | Filter resources queried for endpoints by label selector |
121+
| labelFilter | string | `nil` | Filter resources queried for endpoints by label selector. |
121122
| livenessProbe | object | See _values.yaml_ | [Liveness probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) configuration for the `external-dns` container. |
122123
| logFormat | string | `"text"` | Log format. |
123124
| logLevel | string | `"info"` | Log level. |

charts/external-dns/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ spec:
123123
{{- if .Values.labelFilter }}
124124
- --label-filter={{ .Values.labelFilter }}
125125
{{- end }}
126+
{{- if .Values.annotationFilter }}
127+
- --annotation-filter={{ .Values.annotationFilter }}
128+
{{- end }}
126129
{{- range .Values.managedRecordTypes }}
127130
- --managed-record-types={{ . }}
128131
{{- end }}

charts/external-dns/values.schema.json

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
"description": "Affinity settings for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). If an explicit label selector is not provided for pod affinity or pod anti-affinity one will be created from the pod selector labels.",
77
"type": "object"
88
},
9+
"annotationFilter": {
10+
"description": "Filter resources queried for endpoints by annotation selector.",
11+
"type": [
12+
"string",
13+
"null"
14+
]
15+
},
916
"automountServiceAccountToken": {
1017
"description": "Set this to `false` to [opt out of API credential automounting](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting) for the `Pod`.",
1118
"type": "boolean"
@@ -23,9 +30,8 @@
2330
"type": "object",
2431
"properties": {
2532
"type": {
26-
"type": [
27-
"string"
28-
],
33+
"default": "Recreate",
34+
"type": "string",
2935
"enum": [
3036
"Recreate",
3137
"RollingUpdate"
@@ -98,6 +104,13 @@
98104
"null"
99105
]
100106
},
107+
"gatewayNamespace": {
108+
"description": "_Gateway API_ gateway namespace to watch.",
109+
"type": [
110+
"string",
111+
"null"
112+
]
113+
},
101114
"global": {
102115
"type": "object",
103116
"properties": {
@@ -151,7 +164,7 @@
151164
"type": "string"
152165
},
153166
"labelFilter": {
154-
"description": "Filter resources queried for endpoints by label selector",
167+
"description": "Filter resources queried for endpoints by label selector.",
155168
"type": [
156169
"string",
157170
"null"
@@ -192,9 +205,7 @@
192205
"logFormat": {
193206
"description": "Log format.",
194207
"default": "text",
195-
"type": [
196-
"string"
197-
],
208+
"type": "string",
198209
"enum": [
199210
"text",
200211
"json"
@@ -203,9 +214,7 @@
203214
"logLevel": {
204215
"description": "Log level.",
205216
"default": "info",
206-
"type": [
207-
"string"
208-
],
217+
"type": "string",
209218
"enum": [
210219
"panic",
211220
"debug",
@@ -272,9 +281,7 @@
272281
"policy": {
273282
"description": "How DNS records are synchronized between sources and providers; available values are `create-only`, `sync`, \u0026 `upsert-only`.",
274283
"default": "upsert-only",
275-
"type": [
276-
"string"
277-
],
284+
"type": "string",
278285
"enum": [
279286
"create-only",
280287
"sync",
@@ -367,6 +374,7 @@
367374
]
368375
},
369376
"port": {
377+
"default": "string",
370378
"type": [
371379
"integer",
372380
"string"
@@ -420,6 +428,7 @@
420428
]
421429
},
422430
"port": {
431+
"default": "string",
423432
"type": [
424433
"integer",
425434
"string"

charts/external-dns/values.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ image: # @schema additionalProperties: false
1212
# -- Image tag for the `external-dns` container, this will default to `.Chart.AppVersion` if not set.
1313
tag: # @schema type:[string, null]
1414
# -- Image pull policy for the `external-dns` container.
15-
pullPolicy: IfNotPresent # @schema enum:[IfNotPresent, Always];
15+
pullPolicy: IfNotPresent # @schema enum:[IfNotPresent, Always]
1616

1717
# -- Image pull secrets.
1818
imagePullSecrets: [] # @schema item: object
@@ -44,11 +44,11 @@ service:
4444
# -- Service HTTP port.
4545
port: 7979 # @schema minimum:0; default:7979
4646
# -- Service IP families (e.g. IPv4 and/or IPv6).
47-
ipFamilies: [] # @schema type: [array, null]; item: string; itemEnum: ["IPv4", "IPv6"]; minItems:0; maxItems:2; uniqueItems: true;
47+
ipFamilies: [] # @schema type: [array, null]; item: string; itemEnum: ["IPv4", "IPv6"]; minItems:0; maxItems:2; uniqueItems: true
4848
# - IPv4
4949
# - IPv6
5050
# -- Service IP family policy.
51-
ipFamilyPolicy: # @schema type: [string, null]; enum:[SingleStack, PreferDualStack, RequireDualStack, null];
51+
ipFamilyPolicy: # @schema type: [string, null]; enum:[SingleStack, PreferDualStack, RequireDualStack, null]
5252

5353
rbac: # @schema additionalProperties: true
5454
# -- If `true`, create a `ClusterRole` & `ClusterRoleBinding` with access to the Kubernetes API.
@@ -234,13 +234,16 @@ domainFilters: []
234234
# -- Intentionally exclude domains from being managed.
235235
excludeDomains: []
236236

237-
# -- Filter resources queried for endpoints by label selector
237+
# -- Filter resources queried for endpoints by label selector.
238238
labelFilter: # @schema type: [string,null]; default: null
239239

240+
# -- Filter resources queried for endpoints by annotation selector.
241+
annotationFilter: # @schema type: [string,null]; default: null
242+
240243
# -- Record types to manage (default: A, AAAA, CNAME)
241-
managedRecordTypes: [] # @schema type: [array, null]; item: string; uniqueItems: true;
244+
managedRecordTypes: [] # @schema type: [array, null]; item: string; uniqueItems: true
242245

243-
provider: # @schema type: [object, string];
246+
provider: # @schema type: [object, string]
244247
# -- _ExternalDNS_ provider name; for the available providers and how to configure them see [README](https://github.com/kubernetes-sigs/external-dns/blob/master/charts/external-dns/README.md#providers).
245248
name: aws
246249
webhook:
@@ -300,7 +303,7 @@ provider: # @schema type: [object, string];
300303

301304
# -- Extra arguments to provide to _ExternalDNS_.
302305
# An array or map can be used, with maps allowing for value overrides; maps also support slice values to use the same arg multiple times.
303-
extraArgs: {} # @schema type: [array, null, object]; item: string; uniqueItems: true;
306+
extraArgs: {} # @schema type: [array, null, object]; item: string; uniqueItems: true
304307

305308
secretConfiguration:
306309
# -- If `true`, create a `Secret` to store sensitive provider configuration (**DEPRECATED**).

scripts/helm-tools.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ update_schema() {
6767

6868
diff_schema() {
6969
cd charts/external-dns
70-
helm schema \
71-
-output diff-schema.schema.json
70+
helm schema \
71+
--output diff-schema.schema.json
7272
trap 'rm -rf -- "diff-schema.schema.json"' EXIT
7373
CURRENT_SCHEMA=$(cat values.schema.json)
7474
GENERATED_SCHEMA=$(cat diff-schema.schema.json)

0 commit comments

Comments
 (0)