Skip to content

Commit

Permalink
Add options to configure labelFilter and managedRecordTypes in He…
Browse files Browse the repository at this point in the history
…lm Chart

By promoting this options to dedicated values they no longer have to be configured via `extraArgs`

In the [K8GB project](https://github.com/k8gb-io/k8gb), a DNS based load balancer, we use external-dns as a chart dependency.
We would like to configure all values specific to the controller in the default values of our Chart, and leave to the users the provider configuration. This provider configuration usually includes `extraArgs`.
Since `extraArgs` is a list that would be overwritten we would like to keep it empty, otherwise users will have to copy paste our base configuration.
  • Loading branch information
abaguas committed Nov 5, 2024
1 parent b2ec522 commit 40ee980
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/external-dns/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added options to configure `labelFilter` and `managedRecordTypes` via dedicated helm values ([]()) _@abaguas_

- Ability to configure `imagePullSecrets` via helm `global` value ([#4667](https://github.com/kubernetes-sigs/external-dns/pull/4667)) _@jkroepke_

## [v1.15.0] - 2023-09-10
Expand Down
2 changes: 2 additions & 0 deletions charts/external-dns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains
| imagePullSecrets | list | `[]` | Image pull secrets. |
| initContainers | list | `[]` | [Init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/) to add to the `Pod` definition. |
| interval | string | `"1m"` | Interval for DNS updates. |
| labelFilter | string | `nil` | |
| 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. |
| logFormat | string | `"text"` | Log format. |
| logLevel | string | `"info"` | Log level. |
| managedRecordTypes | list | `[]` | |
| nameOverride | string | `nil` | Override the name of the chart. |
| namespaced | bool | `false` | if `true`, _ExternalDNS_ will run in a namespaced scope (`Role`` and `Rolebinding`` will be namespaced too). |
| nodeSelector | object | `{}` | Node labels to match for `Pod` [scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/). |
Expand Down
6 changes: 6 additions & 0 deletions charts/external-dns/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,12 @@ spec:
{{- range .Values.excludeDomains }}
- --exclude-domains={{ . }}
{{- end }}
{{- if .Values.labelFilter }}
- --label-filter={{ .Values.labelFilter }}
{{- end }}
{{- range .Values.managedRecordTypes }}
- --managed-record-types={{ . }}
{{- end }}
- --provider={{ $providerName }}
{{- range .Values.extraArgs }}
- {{ tpl . $ }}
Expand Down
6 changes: 6 additions & 0 deletions charts/external-dns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ domainFilters: []
## -- Intentionally exclude domains from being managed.
excludeDomains: []

## -- (string) Filter resources queried for endpoints by label selector
labelFilter:

## -- Record types to manage (default: A, AAAA, CNAME)
managedRecordTypes: []

provider:
# -- _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).
name: aws
Expand Down

0 comments on commit 40ee980

Please sign in to comment.