diff --git a/charts/external-dns/CHANGELOG.md b/charts/external-dns/CHANGELOG.md index fd4a590637..6415fc6990 100644 --- a/charts/external-dns/CHANGELOG.md +++ b/charts/external-dns/CHANGELOG.md @@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added the option to explicitly enable or disable service account token automounting. ([#3983](https://github.com/kubernetes-sigs/external-dns/pull/3983)) [@gilles-gosuin](https://github.com/gilles-gosuin) - Added the option to configure revisionHistoryLimit on the K8s Deployment resource. ([#4008](https://github.com/kubernetes-sigs/external-dns/pull/4008)) [@arnisoph](https://github.com/arnisoph) +- Added the option to configure ipFamilyPolicy and ipFamilies of external-dns Service. ([#4153](https://github.com/kubernetes-sigs/external-dns/pull/4153)) [@dongjiang1989](https://github.com/dongjiang1989) ### Changed diff --git a/charts/external-dns/README.md b/charts/external-dns/README.md index 7ea5be2509..8ac2a3cac9 100644 --- a/charts/external-dns/README.md +++ b/charts/external-dns/README.md @@ -121,6 +121,8 @@ If `namespaced` is set to `true`, please ensure that `sources` my only contains | secretConfiguration.subPath | string | `nil` | Sub-path for mounting the `Secret`, this can be templated. | | securityContext | object | See _values.yaml_ | [Security context](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.22/#securitycontext-v1-core) for the `external-dns` container. | | service.annotations | object | `{}` | Service annotations. | +| service.ipFamilies | list | `[]` | Service IP families. | +| service.ipFamilyPolicy | string | `nil` | Service IP family policy. | | service.port | int | `7979` | Service HTTP port. | | serviceAccount.annotations | object | `{}` | Annotations to add to the service account. | | serviceAccount.automountServiceAccountToken | string | `nil` | 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 `ServiceAccount`. | diff --git a/charts/external-dns/templates/service.yaml b/charts/external-dns/templates/service.yaml index 5c9e90e5d1..d3cc1941d5 100644 --- a/charts/external-dns/templates/service.yaml +++ b/charts/external-dns/templates/service.yaml @@ -10,6 +10,13 @@ metadata: {{- toYaml . | nindent 4 }} {{- end }} spec: +{{- with .Values.service.ipFamilies }} + ipFamilies: + {{- toYaml . | nindent 4 }} +{{- end }} +{{- with .Values.service.ipFamilyPolicy }} + ipFamilyPolicy: {{ . }} +{{- end }} type: ClusterIP selector: {{- include "external-dns.selectorLabels" . | nindent 4 }} diff --git a/charts/external-dns/values.schema.json b/charts/external-dns/values.schema.json index 883c1b5053..614deeaca3 100644 --- a/charts/external-dns/values.schema.json +++ b/charts/external-dns/values.schema.json @@ -51,6 +51,41 @@ } } } + }, + "service": { + "type": "object", + "properties": { + "annotations": { + "type": "object" + }, + "ipFamilies": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "IPv6", + "IPv4" + ] + } + }, + "ipFamilyPolicy": { + "type": [ + "string", + "null" + ], + "items": { + "type": "string", + "enum": [ + "SingleStack", + "PreferDualStack", + "RequireDualStack" + ] + } + }, + "port": { + "type": "integer" + } + } } } } diff --git a/charts/external-dns/values.yaml b/charts/external-dns/values.yaml index 887874b882..2c3a976ee6 100644 --- a/charts/external-dns/values.yaml +++ b/charts/external-dns/values.yaml @@ -39,6 +39,10 @@ service: annotations: {} # -- Service HTTP port. port: 7979 + # -- Service IP families. + ipFamilies: [] + # -- (string) Service IP family policy. + ipFamilyPolicy: rbac: # -- If `true`, create a `ClusterRole` & `ClusterRoleBinding` with access to the Kubernetes API.