Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions charts/external-dns/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Add option to configure `annotationFilter` via dedicated chart value. ([#5737](https://github.com/kubernetes-sigs/external-dns/pull/5737)) _@dshatokhin_

### Changed

- Grant `discovery.k8s.io/endpointslices` permission only when using `service` source. ([#5746](https://github.com/kubernetes-sigs/external-dns/pull/5746)) _@vflaux_

## [v1.18.0] - 2025-07-14

### Changed
Expand Down
2 changes: 2 additions & 0 deletions charts/external-dns/templates/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["get","watch","list"]
{{- end }}
{{- if has "service" .Values.sources }}
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get","watch","list"]
Expand Down
53 changes: 44 additions & 9 deletions charts/external-dns/tests/rbac_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,50 @@ tests:
resources: ["ingresses"]
verbs: ["get","watch","list"]

- it: should create no RBAC rules when no sources are set
set:
sources: []
asserts:
- template: clusterrole.yaml
equal:
path: rules
value: null

- it: should create default RBAC rules for 'ingresses' with source 'ingress'
set:
sources:
- ingress
asserts:
- template: clusterrole.yaml
equal:
path: rules
value:
- apiGroups: ["extensions","networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get","watch","list"]

- it: should create default RBAC rules for 'nodes', 'pods', 'services' and 'endpointslices' with source 'service'
set:
sources:
- service
asserts:
- template: clusterrole.yaml
equal:
path: rules
value:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list", "watch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "watch", "list"]
- apiGroups: [""]
resources: ["services"]
verbs: ["get","watch","list"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get","watch","list"]

- it: should create default RBAC rules for 'ambassador-host'
set:
sources:
Expand Down Expand Up @@ -411,9 +455,6 @@ tests:
- apiGroups: [""]
resources: ["services"]
verbs: ["get","watch","list"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get","watch","list"]
- apiGroups: ["extensions","networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get","watch","list"]
Expand Down Expand Up @@ -443,9 +484,6 @@ tests:
- apiGroups: [""]
resources: ["services"]
verbs: ["get","watch","list"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get","watch","list"]
- apiGroups: ["extensions","networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get","watch","list"]
Expand All @@ -472,9 +510,6 @@ tests:
- apiGroups: [""]
resources: ["services"]
verbs: ["get","watch","list"]
- apiGroups: ["discovery.k8s.io"]
resources: ["endpointslices"]
verbs: ["get","watch","list"]
- apiGroups: ["extensions","networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get","watch","list"]
Expand Down
3 changes: 0 additions & 3 deletions docs/tutorials/godaddy.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,6 @@ rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list","watch"]
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get","watch","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
3 changes: 0 additions & 3 deletions docs/tutorials/ovh.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,6 @@ rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["list"]
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get","watch","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
Expand Down
Loading