[bitnami/zookeeper] Configure headless service name (#14144)

* [bitnami/zookeeper] Configure headless service name suffix

A new configuration parameter `service.headless.nameSuffix` now allows
to override the default "headless" name given to the headless service.

Signed-off-by: Fabien Marchand <fabien.marchand@intersec.com>

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

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

Signed-off-by: Fabien Marchand <fabien.marchand@intersec.com>
Signed-off-by: Bitnami Containers <bitnami-bot@vmware.com>
Co-authored-by: Bitnami Containers <bitnami-bot@vmware.com>
This commit is contained in:
fabien-marchand
2023-01-16 11:17:01 +01:00
committed by GitHub
parent 153c48b4d8
commit 6ac4738340
5 changed files with 6 additions and 3 deletions

View File

@@ -22,4 +22,4 @@ name: zookeeper
sources:
- https://github.com/bitnami/containers/tree/main/bitnami/zookeeper
- https://zookeeper.apache.org/
version: 11.0.3
version: 11.1.0

View File

@@ -216,6 +216,7 @@ The command removes all the Kubernetes components associated with the chart and
| `service.extraPorts` | Extra ports to expose in the ZooKeeper service (normally used with the `sidecar` value) | `[]` |
| `service.headless.annotations` | Annotations for the Headless Service | `{}` |
| `service.headless.publishNotReadyAddresses` | If the ZooKeeper headless service should publish DNS records for not ready pods | `true` |
| `service.headless.servicenameOverride` | String to partially override headless service name | `""` |
| `networkPolicy.enabled` | Specifies whether a NetworkPolicy should be created | `false` |
| `networkPolicy.allowExternal` | Don't require client label for connections | `true` |

View File

@@ -18,7 +18,7 @@ spec:
selector:
matchLabels: {{- include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: zookeeper
serviceName: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
serviceName: {{ printf "%s-%s" (include "common.names.fullname" .) (default "headless" .Values.service.headless.servicenameOverride) | trunc 63 | trimSuffix "-" }}
{{- if .Values.updateStrategy }}
updateStrategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}

View File

@@ -1,7 +1,7 @@
apiVersion: v1
kind: Service
metadata:
name: {{ printf "%s-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
name: {{ printf "%s-%s" (include "common.names.fullname" .) (default "headless" .Values.service.headless.servicenameOverride) | trunc 63 | trimSuffix "-" }}
namespace: {{ template "zookeeper.namespace" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: zookeeper

View File

@@ -539,10 +539,12 @@ service:
extraPorts: []
## @param service.headless.annotations Annotations for the Headless Service
## @param service.headless.publishNotReadyAddresses If the ZooKeeper headless service should publish DNS records for not ready pods
## @param service.headless.servicenameOverride String to partially override headless service name
##
headless:
publishNotReadyAddresses: true
annotations: {}
servicenameOverride: ""
## Network policies
## Ref: https://kubernetes.io/docs/concepts/services-networking/network-policies/
##