[bitnami/kafka]: Use merge helper (#19063)

This commit is contained in:
Juan Ariza Toledano
2023-09-07 12:21:32 +02:00
committed by GitHub
parent c197ec7a55
commit 5c7ed7770e
18 changed files with 44 additions and 44 deletions

View File

@@ -18,28 +18,28 @@ annotations:
apiVersion: v2
appVersion: 3.5.1
dependencies:
- condition: zookeeper.enabled
name: zookeeper
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.x.x
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
- condition: zookeeper.enabled
name: zookeeper
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.x.x
- name: common
repository: oci://registry-1.docker.io/bitnamicharts
tags:
- bitnami-common
version: 2.x.x
description: Apache Kafka is a distributed streaming platform designed to build real-time pipelines and can be used as a message broker or as a replacement for a log aggregation solution for big data applications.
home: https://bitnami.com
icon: https://bitnami.com/assets/stacks/kafka/img/kafka-stack-220x234.png
keywords:
- kafka
- zookeeper
- streaming
- producer
- consumer
- kafka
- zookeeper
- streaming
- producer
- consumer
maintainers:
- name: VMware, Inc.
url: https://github.com/bitnami/charts
- name: VMware, Inc.
url: https://github.com/bitnami/charts
name: kafka
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/kafka
version: 25.1.7
- https://github.com/bitnami/charts/tree/main/bitnami/kafka
version: 25.1.8

View File

@@ -23,7 +23,7 @@ spec:
{{- if .Values.broker.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.broker.pdb.maxUnavailable }}
{{- end }}
{{- $podLabels := merge .Values.broker.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.broker.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: broker

View File

@@ -19,7 +19,7 @@ metadata:
spec:
podManagementPolicy: {{ .Values.broker.podManagementPolicy }}
replicas: {{ .Values.broker.replicaCount }}
{{- $podLabels := merge .Values.broker.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.broker.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: broker

View File

@@ -13,7 +13,7 @@ kind: Service
metadata:
name: {{ printf "%s-%d-external" (include "common.names.fullname" $) $i | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" $ | quote }}
{{- $labels := merge $.Values.externalAccess.broker.service.labels $.Values.commonLabels }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.externalAccess.broker.service.labels $.Values.commonLabels ) "context" $ ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: kafka
pod: {{ $targetPod }}
@@ -23,7 +23,7 @@ metadata:
{{ include "common.tplvalues.render" ( dict "value" (index $.Values.externalAccess.broker.service.loadBalancerAnnotations $i) "context" $) | nindent 4 }}
{{- end }}
{{- if or $.Values.externalAccess.broker.service.annotations $.Values.commonAnnotations }}
{{- $annotations := merge $.Values.externalAccess.broker.service.annotations $.Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list $.Values.externalAccess.broker.service.annotations $.Values.commonAnnotations ) "context" $ ) }}
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
{{- end }}
@@ -53,7 +53,7 @@ spec:
{{- if and (eq $.Values.externalAccess.broker.service.type "NodePort") (le (add $i 1) (len $.Values.externalAccess.broker.service.externalIPs)) }}
externalIPs: [{{ index $.Values.externalAccess.broker.service.externalIPs $i | quote }}]
{{- end }}
{{- $podLabels := merge $.Values.broker.podLabels $.Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.broker.podLabels $.Values.commonLabels ) "context" $ ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kafka
app.kubernetes.io/component: broker

View File

@@ -10,12 +10,12 @@ kind: Service
metadata:
name: {{ printf "%s-broker-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $labels := merge .Values.externalAccess.broker.service.labels .Values.commonLabels }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.externalAccess.broker.service.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: broker
app.kubernetes.io/part-of: kafka
{{- if or .Values.service.headless.broker.annotations .Values.commonAnnotations }}
{{- $annotations := merge .Values.service.headless.broker.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.broker.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
@@ -31,7 +31,7 @@ spec:
port: {{ .Values.service.ports.client }}
protocol: TCP
targetPort: client
{{- $podLabels := merge .Values.broker.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.broker.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: broker
app.kubernetes.io/part-of: kafka

View File

@@ -23,7 +23,7 @@ spec:
{{- if .Values.controller.pdb.maxUnavailable }}
maxUnavailable: {{ .Values.controller.pdb.maxUnavailable }}
{{- end }}
{{- $podLabels := merge .Values.controller.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.controller.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: controller-eligible

View File

@@ -19,7 +19,7 @@ metadata:
spec:
podManagementPolicy: {{ .Values.controller.podManagementPolicy }}
replicas: {{ .Values.controller.replicaCount }}
{{- $podLabels := merge .Values.controller.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.controller.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: controller-eligible

View File

@@ -14,7 +14,7 @@ kind: Service
metadata:
name: {{ printf "%s-controller-%d-external" $fullname $i | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" $ | quote }}
{{- $labels := merge $.Values.externalAccess.controller.service.labels $.Values.commonLabels }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.externalAccess.controller.service.labels $.Values.commonLabels ) "context" $ ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: kafka
pod: {{ $targetPod }}
@@ -24,7 +24,7 @@ metadata:
{{ include "common.tplvalues.render" ( dict "value" (index $.Values.externalAccess.controller.service.loadBalancerAnnotations $i) "context" $) | nindent 4 }}
{{- end }}
{{- if or $.Values.externalAccess.controller.service.annotations $.Values.commonAnnotations }}
{{- $annotations := merge $.Values.externalAccess.controller.service.annotations $.Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list $.Values.externalAccess.controller.service.annotations $.Values.commonAnnotations ) "context" $ ) }}
{{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
{{- end }}
@@ -54,7 +54,7 @@ spec:
{{- if and (eq $.Values.externalAccess.controller.service.type "NodePort") (le (add $i 1) (len $.Values.externalAccess.controller.service.externalIPs)) }}
externalIPs: [{{ index $.Values.externalAccess.controller.service.externalIPs $i | quote }}]
{{- end }}
{{- $podLabels := merge $.Values.controller.podLabels $.Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list $.Values.controller.podLabels $.Values.commonLabels ) "context" $ ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/part-of: kafka
app.kubernetes.io/component: controller-eligible

View File

@@ -10,12 +10,12 @@ kind: Service
metadata:
name: {{ printf "%s-controller-headless" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
namespace: {{ include "common.names.namespace" . | quote }}
{{- $labels := merge .Values.service.headless.controller.labels .Values.commonLabels }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.controller.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: controller-eligible
app.kubernetes.io/part-of: kafka
{{- if or .Values.service.headless.controller.annotations .Values.commonAnnotations }}
{{- $annotations := merge .Values.service.headless.controller.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.headless.controller.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
@@ -39,7 +39,7 @@ spec:
port: {{ .Values.service.ports.controller }}
targetPort: controller
{{- end }}
{{- $podLabels := merge .Values.controller.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.controller.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: controller-eligible
app.kubernetes.io/part-of: kafka

View File

@@ -20,7 +20,7 @@ metadata:
{{- end }}
spec:
replicas: 1
{{- $podLabels := merge .Values.metrics.kafka.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.kafka.podLabels .Values.commonLabels ) "context" . ) }}
selector:
matchLabels: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 6 }}
app.kubernetes.io/component: cluster-metrics

View File

@@ -9,7 +9,7 @@ kind: ServiceMonitor
metadata:
name: {{ printf "%s-jmx-metrics" (include "common.names.fullname" .) }}
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }}
{{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.commonAnnotations }}

View File

@@ -12,7 +12,7 @@ metadata:
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: metrics
{{- if or .Values.metrics.jmx.service.annotations .Values.commonAnnotations }}
{{- $annotations := merge .Values.metrics.jmx.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.jmx.service.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:

View File

@@ -9,7 +9,7 @@ kind: PrometheusRule
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.prometheusRule.namespace }}
{{- $labels := merge .Values.metrics.prometheusRule.labels .Values.commonLabels }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.prometheusRule.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: metrics
{{- if .Values.commonAnnotations }}

View File

@@ -9,7 +9,7 @@ kind: ServiceMonitor
metadata:
name: {{ printf "%s-metrics" (include "common.names.fullname" .) }}
namespace: {{ default (include "common.names.namespace" .) .Values.metrics.serviceMonitor.namespace | quote }}
{{- $labels := merge .Values.metrics.serviceMonitor.labels .Values.commonLabels }}
{{- $labels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.serviceMonitor.labels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $labels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: cluster-metrics
{{- if .Values.commonAnnotations }}

View File

@@ -12,7 +12,7 @@ metadata:
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: cluster-metrics
{{- if or .Values.metrics.kafka.service.annotations .Values.commonAnnotations }}
{{- $annotations := merge .Values.metrics.kafka.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.kafka.service.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec:
@@ -26,7 +26,7 @@ spec:
port: {{ .Values.metrics.kafka.service.ports.metrics }}
protocol: TCP
targetPort: metrics
{{- $podLabels := merge .Values.metrics.kafka.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.metrics.kafka.podLabels .Values.commonLabels ) "context" . ) }}
selector: {{- include "common.labels.matchLabels" ( dict "customLabels" $podLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: cluster-metrics
{{- end }}

View File

@@ -20,7 +20,7 @@ metadata:
spec:
template:
metadata:
{{- $podLabels := merge .Values.provisioning.podLabels .Values.commonLabels }}
{{- $podLabels := include "common.tplvalues.merge" ( dict "values" ( list .Values.provisioning.podLabels .Values.commonLabels ) "context" . ) }}
labels: {{- include "common.labels.standard" ( dict "customLabels" $podLabels "context" $ ) | nindent 8 }}
app.kubernetes.io/component: kafka-provisioning
{{- if .Values.provisioning.podAnnotations }}

View File

@@ -12,7 +12,7 @@ metadata:
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: kafka
{{- if or .Values.serviceAccount.annotations .Values.commonAnnotations }}
{{- $annotations := merge .Values.serviceAccount.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.serviceAccount.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}

View File

@@ -11,7 +11,7 @@ metadata:
labels: {{- include "common.labels.standard" ( dict "customLabels" .Values.commonLabels "context" $ ) | nindent 4 }}
app.kubernetes.io/component: kafka
{{- if or .Values.service.annotations .Values.commonAnnotations }}
{{- $annotations := merge .Values.service.annotations .Values.commonAnnotations }}
{{- $annotations := include "common.tplvalues.merge" ( dict "values" ( list .Values.service.annotations .Values.commonAnnotations ) "context" . ) }}
annotations: {{- include "common.tplvalues.render" ( dict "value" $annotations "context" $) | nindent 4 }}
{{- end }}
spec: