Skip to content

Commit

Permalink
feat(helm-chart): Allow configuration of ipFamilyPolicy (kubernetes-s…
Browse files Browse the repository at this point in the history
…igs#4153)

* update chart version && support dualstack && update values.schema.json info

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* update by codereview

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* update values.schema.json

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* fix by helm-docs

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* just add service schema

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* with 2 space indent

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* fix EOF

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>

* 更新 CHANGELOG.md

Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>

---------

Signed-off-by: dongjiang1989 <dongjiang1989@126.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
  • Loading branch information
2 people authored and pull[bot] committed Jan 14, 2024
1 parent e69b500 commit 47bd515
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/external-dns/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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 @@ -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`. |
Expand Down
7 changes: 7 additions & 0 deletions charts/external-dns/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
35 changes: 35 additions & 0 deletions charts/external-dns/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
}
}
4 changes: 4 additions & 0 deletions charts/external-dns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 47bd515

Please sign in to comment.