mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-21 02:56:50 +10:00
[bitnami/kafka] Add global imagePullSecrets to overwrite any other existing one
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
apiVersion: v1
|
||||
name: kafka
|
||||
version: 1.5.0
|
||||
version: 1.6.0
|
||||
appVersion: 2.1.1
|
||||
description: Apache Kafka is a distributed streaming platform.
|
||||
keywords:
|
||||
|
||||
@@ -48,6 +48,7 @@ The following tables lists the configurable parameters of the Kafka chart and th
|
||||
| Parameter | Description | Default |
|
||||
| -------------------------------------- | --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
||||
| `global.imageRegistry` | Global Docker image registry | `nil` |
|
||||
| `global.imagePullSecrets` | Global Docker registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
|
||||
| `image.registry` | Kafka image registry | `docker.io` |
|
||||
| `image.repository` | Kafka Image name | `bitnami/kafka` |
|
||||
| `image.tag` | Kafka Image tag | `{VERSION}` |
|
||||
|
||||
@@ -80,3 +80,39 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
{{- $name := default "zookeeper" .Values.zookeeper.nameOverride -}}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 24 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the proper Docker Image Registry Secret Names
|
||||
*/}}
|
||||
{{- define "kafka.imagePullSecrets" -}}
|
||||
{{/*
|
||||
Helm 2.11 supports the assignment of a value to a variable defined in a different scope,
|
||||
but Helm 2.9 and 2.10 does not support it, so we need to implement this if-else logic.
|
||||
Also, we can not use a single if because lazy evaluation is not an option
|
||||
*/}}
|
||||
{{- if .Values.global }}
|
||||
{{- if .Values.global.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range
|
||||
.Values.global.imagePullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- else if or .Values.image.pullSecrets .Values.metrics.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- range .Values.metrics.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -25,12 +25,7 @@ spec:
|
||||
app: {{ template "kafka.name" . }}
|
||||
release: "{{ .Release.Name }}"
|
||||
spec:
|
||||
{{- if .Values.metrics.kafka.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.metrics.kafka.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
{{- include "kafka.imagePullSecrets" . | indent 6 }}
|
||||
containers:
|
||||
- image: {{ template "kafka.metrics.kafka.image" . }}
|
||||
name: kafka-exporter
|
||||
@@ -41,4 +36,4 @@ spec:
|
||||
- containerPort: {{ .Values.metrics.kafka.port }}
|
||||
resources:
|
||||
{{ toYaml .Values.metrics.kafka.resources | indent 10 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -32,12 +32,7 @@ spec:
|
||||
release: {{ .Release.Name | quote }}
|
||||
heritage: {{ .Release.Service | quote }}
|
||||
spec:
|
||||
{{- if .Values.image.pullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- range .Values.image.pullSecrets }}
|
||||
- name: {{ . }}
|
||||
{{- end}}
|
||||
{{- end }}
|
||||
{{- include "kafka.imagePullSecrets" . | indent 6 }}
|
||||
{{- if .Values.securityContext.enabled }}
|
||||
securityContext:
|
||||
fsGroup: {{ .Values.securityContext.fsGroup }}
|
||||
@@ -289,5 +284,3 @@ spec:
|
||||
- name: data
|
||||
emptyDir: {}
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
## Global Docker image registry
|
||||
## Please, note that this will override the image registry for all the images, including dependencies, configured to use the global value
|
||||
## Global Docker image parameters
|
||||
## Please, note that this will override the image parameters, including dependencies, configured to use the global value
|
||||
## Current available global Docker image parameters: imageRegistry and imagepullSecrets
|
||||
##
|
||||
# global:
|
||||
# imageRegistry:
|
||||
# imageRegistry: myRegistryName
|
||||
# imagePullSecrets:
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Bitnami Kafka image version
|
||||
## ref: https://hub.docker.com/r/bitnami/kafka/tags/
|
||||
@@ -22,7 +25,7 @@ image:
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistrKeySecretName
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Set to true if you would like to see extra information on logs
|
||||
## It turns BASH and NAMI debugging in minideb
|
||||
@@ -250,7 +253,7 @@ metrics:
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistrKeySecretName
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Interval at which Prometheus scrapes metrics, note: only used by Prometheus Operator
|
||||
interval: 10s
|
||||
@@ -281,7 +284,7 @@ metrics:
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
##
|
||||
# pullSecrets:
|
||||
# - myRegistrKeySecretName
|
||||
# - myRegistryKeySecretName
|
||||
|
||||
## Interval at which Prometheus scrapes metrics, note: only used by Prometheus Operator
|
||||
interval: 10s
|
||||
|
||||
Reference in New Issue
Block a user