From 66eb9d715730c6f3c1bb83fc497589d9f6d9ec96 Mon Sep 17 00:00:00 2001 From: Vanessa Li <39896790+VanessaLi-oqton@users.noreply.github.com> Date: Thu, 10 Aug 2023 20:17:42 +0800 Subject: [PATCH] [bitnami/kafka] Add enableServiceLinks (#18324) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [bitnami/kafka]Add enableServiceLinks Signed-off-by: Vanessa Li * [bitnami/kafka]Add enableServiceLinks to README.md Signed-off-by: Vanessa Li * [bitnami/kafka] Bump kafka chart version Signed-off-by: Vanessa Li --------- Signed-off-by: Vanessa Li Signed-off-by: Carlos Rodríguez Hernández Co-authored-by: Carlos Rodríguez Hernández --- bitnami/kafka/Chart.yaml | 2 +- bitnami/kafka/README.md | 4 ++++ .../kafka/templates/broker/statefulset.yaml | 1 + .../controller-eligible/statefulset.yaml | 1 + .../kafka/templates/metrics/deployment.yaml | 1 + bitnami/kafka/templates/provisioning/job.yaml | 1 + bitnami/kafka/values.yaml | 20 +++++++++++++++++++ 7 files changed, 29 insertions(+), 1 deletion(-) diff --git a/bitnami/kafka/Chart.yaml b/bitnami/kafka/Chart.yaml index 67821c5046..95d393c043 100644 --- a/bitnami/kafka/Chart.yaml +++ b/bitnami/kafka/Chart.yaml @@ -42,4 +42,4 @@ maintainers: name: kafka sources: - https://github.com/bitnami/charts/tree/main/bitnami/kafka -version: 24.0.8 +version: 24.0.9 diff --git a/bitnami/kafka/README.md b/bitnami/kafka/README.md index 3728a352ee..2872345fd7 100644 --- a/bitnami/kafka/README.md +++ b/bitnami/kafka/README.md @@ -239,6 +239,7 @@ The command removes all the Kubernetes components associated with the chart and | `controller.podManagementPolicy` | StatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guarantees. There are two valid pod management policies: OrderedReady and Parallel | `Parallel` | | `controller.priorityClassName` | Name of the existing priority class to be used by kafka pods | `""` | | `controller.runtimeClassName` | Name of the runtime class to be used by pod(s) | `""` | +| `controller.enableServiceLinks` | Whether information about services should be injected into pod's environment variable | `true` | | `controller.schedulerName` | Name of the k8s scheduler (other than default) | `""` | | `controller.updateStrategy.type` | Kafka statefulset strategy type | `RollingUpdate` | | `controller.extraVolumes` | Optionally specify extra list of additional volumes for the Kafka pod(s) | `[]` | @@ -334,6 +335,7 @@ The command removes all the Kubernetes components associated with the chart and | `broker.podManagementPolicy` | StatefulSet controller supports relax its ordering guarantees while preserving its uniqueness and identity guarantees. There are two valid pod management policies: OrderedReady and Parallel | `Parallel` | | `broker.priorityClassName` | Name of the existing priority class to be used by kafka pods | `""` | | `broker.runtimeClassName` | Name of the runtime class to be used by pod(s) | `""` | +| `broker.enableServiceLinks` | Whether information about services should be injected into pod's environment variable | `true` | | `broker.schedulerName` | Name of the k8s scheduler (other than default) | `""` | | `broker.updateStrategy.type` | Kafka statefulset strategy type | `RollingUpdate` | | `broker.extraVolumes` | Optionally specify extra list of additional volumes for the Kafka pod(s) | `[]` | @@ -499,6 +501,7 @@ The command removes all the Kubernetes components associated with the chart and | `metrics.kafka.nodeSelector` | Node labels for pod assignment | `{}` | | `metrics.kafka.tolerations` | Tolerations for pod assignment | `[]` | | `metrics.kafka.schedulerName` | Name of the k8s scheduler (other than default) for Kafka exporter | `""` | +| `metrics.kafka.enableServiceLinks` | Whether information about services should be injected into pod's environment variable | `true` | | `metrics.kafka.priorityClassName` | Kafka exporter pods' priorityClassName | `""` | | `metrics.kafka.topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` | | `metrics.kafka.extraVolumes` | Optionally specify extra list of additional volumes for the Kafka exporter pod(s) | `[]` | @@ -602,6 +605,7 @@ The command removes all the Kubernetes components associated with the chart and | `provisioning.containerSecurityContext.readOnlyRootFilesystem` | Set Kafka provisioning containers' Security Context readOnlyRootFilesystem | `true` | | `provisioning.containerSecurityContext.capabilities.drop` | Set Kafka provisioning containers' Security Context capabilities to be dropped | `["ALL"]` | | `provisioning.schedulerName` | Name of the k8s scheduler (other than default) for kafka provisioning | `""` | +| `provisioning.enableServiceLinks` | Whether information about services should be injected into pod's environment variable | `true` | | `provisioning.extraVolumes` | Optionally specify extra list of additional volumes for the Kafka provisioning pod(s) | `[]` | | `provisioning.extraVolumeMounts` | Optionally specify extra list of additional volumeMounts for the Kafka provisioning container(s) | `[]` | | `provisioning.sidecars` | Add additional sidecar containers to the Kafka provisioning pod(s) | `[]` | diff --git a/bitnami/kafka/templates/broker/statefulset.yaml b/bitnami/kafka/templates/broker/statefulset.yaml index 0ae0c7663e..17beca3a8f 100644 --- a/bitnami/kafka/templates/broker/statefulset.yaml +++ b/bitnami/kafka/templates/broker/statefulset.yaml @@ -92,6 +92,7 @@ spec: securityContext: {{- omit .Values.broker.podSecurityContext "enabled" | toYaml | nindent 8 }} {{- end }} serviceAccountName: {{ include "kafka.serviceAccountName" . }} + enableServiceLinks: {{ .Values.broker.enableServiceLinks }} initContainers: {{- if and .Values.volumePermissions.enabled .Values.broker.persistence.enabled }} - name: volume-permissions diff --git a/bitnami/kafka/templates/controller-eligible/statefulset.yaml b/bitnami/kafka/templates/controller-eligible/statefulset.yaml index 425cc00744..f4a29b46f7 100644 --- a/bitnami/kafka/templates/controller-eligible/statefulset.yaml +++ b/bitnami/kafka/templates/controller-eligible/statefulset.yaml @@ -92,6 +92,7 @@ spec: securityContext: {{- omit .Values.controller.podSecurityContext "enabled" | toYaml | nindent 8 }} {{- end }} serviceAccountName: {{ include "kafka.serviceAccountName" . }} + enableServiceLinks: {{ .Values.controller.enableServiceLinks }} initContainers: {{- if and .Values.volumePermissions.enabled .Values.controller.persistence.enabled }} - name: volume-permissions diff --git a/bitnami/kafka/templates/metrics/deployment.yaml b/bitnami/kafka/templates/metrics/deployment.yaml index 33c298e100..51497c5ab3 100644 --- a/bitnami/kafka/templates/metrics/deployment.yaml +++ b/bitnami/kafka/templates/metrics/deployment.yaml @@ -69,6 +69,7 @@ spec: securityContext: {{- omit .Values.metrics.kafka.podSecurityContext "enabled" | toYaml | nindent 8 }} {{- end }} serviceAccountName: {{ template "kafka.metrics.kafka.serviceAccountName" . }} + enableServiceLinks: {{ .Values.metrics.kafka.enableServiceLinks }} {{- if .Values.metrics.kafka.initContainers }} initContainers: {{- include "common.tplvalues.render" (dict "value" .Values.metrics.kafka.initContainers "context" $) | nindent 8 }} {{- end }} diff --git a/bitnami/kafka/templates/provisioning/job.yaml b/bitnami/kafka/templates/provisioning/job.yaml index 70f5f1baf6..e2b7f77307 100644 --- a/bitnami/kafka/templates/provisioning/job.yaml +++ b/bitnami/kafka/templates/provisioning/job.yaml @@ -34,6 +34,7 @@ spec: {{- end }} spec: serviceAccountName: {{ template "kafka.provisioning.serviceAccountName" . }} + enableServiceLinks: {{ .Values.provisioning.enableServiceLinks }} {{- include "kafka.imagePullSecrets" . | nindent 6 }} {{- if .Values.provisioning.schedulerName }} schedulerName: {{ .Values.provisioning.schedulerName | quote }} diff --git a/bitnami/kafka/values.yaml b/bitnami/kafka/values.yaml index 2f731cf4c4..8453aa00c0 100644 --- a/bitnami/kafka/values.yaml +++ b/bitnami/kafka/values.yaml @@ -637,6 +637,11 @@ controller: ## ref: https://kubernetes.io/docs/concepts/containers/runtime-class/ ## runtimeClassName: "" + ## @param controller.enableServiceLinks Whether information about services should be injected into pod's environment variable + ## The environment variables injected by service links are not used, but can lead to slow kafka boot times or slow running of the scripts when there are many services in the current namespace. + ## If you experience slow pod startups or slow running of the scripts you probably want to set this to `false`. + ## + enableServiceLinks: true ## @param controller.schedulerName Name of the k8s scheduler (other than default) ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ ## @@ -1002,6 +1007,11 @@ broker: ## ref: https://kubernetes.io/docs/concepts/containers/runtime-class/ ## runtimeClassName: "" + ## @param broker.enableServiceLinks Whether information about services should be injected into pod's environment variable + ## The environment variables injected by service links are not used, but can lead to slow kafka boot times or slow running of the scripts when there are many services in the current namespace. + ## If you experience slow pod startups or slow running of the scripts you probably want to set this to `false`. + ## + enableServiceLinks: true ## @param broker.schedulerName Name of the k8s scheduler (other than default) ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ ## @@ -1722,6 +1732,11 @@ metrics: ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ ## schedulerName: "" + ## @param metrics.kafka.enableServiceLinks Whether information about services should be injected into pod's environment variable + ## The environment variables injected by service links are not used, but can lead to slow kafka boot times or slow running of the scripts when there are many services in the current namespace. + ## If you experience slow pod startups or slow running of the scripts you probably want to set this to `false`. + ## + enableServiceLinks: true ## @param metrics.kafka.priorityClassName Kafka exporter pods' priorityClassName ## priorityClassName: "" @@ -2187,6 +2202,11 @@ provisioning: ## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/ ## schedulerName: "" + ## @param provisioning.enableServiceLinks Whether information about services should be injected into pod's environment variable + ## The environment variables injected by service links are not used, but can lead to slow kafka boot times or slow running of the scripts when there are many services in the current namespace. + ## If you experience slow pod startups or slow running of the scripts you probably want to set this to `false`. + ## + enableServiceLinks: true ## @param provisioning.extraVolumes Optionally specify extra list of additional volumes for the Kafka provisioning pod(s) ## e.g: ## extraVolumes: