[bitnami/kafka] Allowing for customize dnsPolicy and dnsConfig for Kafka (#21402)

* Allowing for customize dnsPolicy and dnsConfig for Kafka

Signed-off-by: siyuan0322 <siyuanzhang.zsy@alibaba-inc.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

* rephrase the description

Signed-off-by: siyuan0322 <siyuanzhang.zsy@alibaba-inc.com>

* Update README.md with readme-generator-for-helm

Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>

---------

Signed-off-by: siyuan0322 <siyuanzhang.zsy@alibaba-inc.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Signed-off-by: Siyuan Zhang <siyuan0322@gmail.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
Siyuan Zhang
2023-12-19 19:23:06 +08:00
committed by GitHub
parent f29469dbbd
commit 0287ecf646
4 changed files with 32 additions and 1 deletions

View File

@@ -42,4 +42,4 @@ maintainers:
name: kafka
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/kafka
version: 26.5.0
version: 26.5.1

View File

@@ -181,6 +181,8 @@ The command removes all the Kubernetes components associated with the chart and
| `extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Kafka container(s) | `[]` |
| `sidecars` | Add additional sidecar containers to the Kafka pod(s) | `[]` |
| `initContainers` | Add additional Add init containers to the Kafka pod(s) | `[]` |
| `dnsPolicy` | Specifies the DNS policy for the zookeeper pods | `""` |
| `dnsConfig` | allows users more control on the DNS settings for a Pod. Required if `dnsPolicy` is set to `None` | `{}` |
### Controller-eligible statefulset parameters

View File

@@ -91,6 +91,12 @@ spec:
{{- end }}
serviceAccountName: {{ include "kafka.serviceAccountName" . }}
enableServiceLinks: {{ .Values.controller.enableServiceLinks }}
{{- if .Values.dnsPolicy }}
dnsPolicy: {{ .Values.dnsPolicy }}
{{- end }}
{{- if .Values.dnsConfig }}
dnsConfig: {{- include "common.tplvalues.render" (dict "value" .Values.dnsConfig "context" $) | nindent 8 }}
{{- end }}
initContainers:
{{- if and .Values.volumePermissions.enabled .Values.controller.persistence.enabled }}
- name: volume-permissions

View File

@@ -440,6 +440,29 @@ sidecars: []
##
initContainers: []
## DNS-Pod services
## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/
## @param dnsPolicy Specifies the DNS policy for the zookeeper pods
## DNS policies can be set on a per-Pod basis. Currently Kubernetes supports the following Pod-specific DNS policies.
## Available options: Default, ClusterFirst, ClusterFirstWithHostNet, None
## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-s-dns-policy
dnsPolicy: ""
## @param dnsConfig allows users more control on the DNS settings for a Pod. Required if `dnsPolicy` is set to `None`
## The dnsConfig field is optional and it can work with any dnsPolicy settings.
## Ref: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#pod-dns-config
## E.g.
## dnsConfig:
## nameservers:
## - 192.0.2.1 # this is an example
## searches:
## - ns1.svc.cluster-domain.example
## - my.dns.search.suffix
## options:
## - name: ndots
## value: "2"
## - name: edns0
dnsConfig: {}
## @section Controller-eligible statefulset parameters
##
controller: