From 070e38284dcdd546ad416d23d049d4c19730cb48 Mon Sep 17 00:00:00 2001 From: Matt Morrison Date: Wed, 27 Nov 2024 14:42:29 +1300 Subject: [PATCH] fix: Annotations needs to be on all resources Otherwise sync wave will not include all resources required to deploy Kafka. --- charts/kafka/Chart.yaml | 2 +- charts/kafka/templates/kafka-nodepool.yaml | 12 ++++++++++++ .../networkpolicy-egress-cruisecontrol.yaml | 4 ++++ .../kafka/templates/networkpolicy-egress-kafka.yaml | 4 ++++ .../templates/networkpolicy-egress-zookeeper.yaml | 4 ++++ .../networkpolicy-entity-operator-kube-api.yaml | 4 ++++ .../templates/networkpolicy-entity-operator.yaml | 4 ++++ .../templates/networkpolicy-kafka-exporter.yaml | 4 ++++ 8 files changed, 37 insertions(+), 1 deletion(-) diff --git a/charts/kafka/Chart.yaml b/charts/kafka/Chart.yaml index 49b0351..edc599f 100644 --- a/charts/kafka/Chart.yaml +++ b/charts/kafka/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: Setup a Kafka cluster using Strimzi operator name: kafka -version: 0.3.1 +version: 0.3.2 type: application dependencies: [] keywords: diff --git a/charts/kafka/templates/kafka-nodepool.yaml b/charts/kafka/templates/kafka-nodepool.yaml index dec8f50..45981d5 100644 --- a/charts/kafka/templates/kafka-nodepool.yaml +++ b/charts/kafka/templates/kafka-nodepool.yaml @@ -5,6 +5,10 @@ kind: KafkaNodePool metadata: name: {{ include "kafka.fullname" . }} namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: strimzi.io/cluster: {{ include "kafka.fullname" . }} {{- include "kafka.labels" . | nindent 4 }} @@ -33,6 +37,10 @@ kind: KafkaNodePool metadata: name: {{ include "kafka.fullname" . }}-controller namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: strimzi.io/cluster: {{ include "kafka.fullname" . }} {{- include "kafka.labels" . | nindent 4 }} @@ -60,6 +68,10 @@ kind: KafkaNodePool metadata: name: {{ include "kafka.fullname" . }}-broker namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: strimzi.io/cluster: {{ include "kafka.fullname" . }} {{- include "kafka.labels" . | nindent 4 }} diff --git a/charts/kafka/templates/networkpolicy-egress-cruisecontrol.yaml b/charts/kafka/templates/networkpolicy-egress-cruisecontrol.yaml index 9dec9f7..81498fa 100644 --- a/charts/kafka/templates/networkpolicy-egress-cruisecontrol.yaml +++ b/charts/kafka/templates/networkpolicy-egress-cruisecontrol.yaml @@ -5,6 +5,10 @@ kind: NetworkPolicy metadata: name: {{ include "kafka.fullname" . }}-egress-cruise-control namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: {{ include "kafka.labels" . | nindent 4 }} spec: policyTypes: diff --git a/charts/kafka/templates/networkpolicy-egress-kafka.yaml b/charts/kafka/templates/networkpolicy-egress-kafka.yaml index 7ca4c8d..d692d05 100644 --- a/charts/kafka/templates/networkpolicy-egress-kafka.yaml +++ b/charts/kafka/templates/networkpolicy-egress-kafka.yaml @@ -5,6 +5,10 @@ kind: NetworkPolicy metadata: name: {{ include "kafka.fullname" . }}-egress-kafka namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: {{ include "kafka.labels" . | nindent 4 }} spec: policyTypes: diff --git a/charts/kafka/templates/networkpolicy-egress-zookeeper.yaml b/charts/kafka/templates/networkpolicy-egress-zookeeper.yaml index 2ba99c8..b3ff99a 100644 --- a/charts/kafka/templates/networkpolicy-egress-zookeeper.yaml +++ b/charts/kafka/templates/networkpolicy-egress-zookeeper.yaml @@ -5,6 +5,10 @@ kind: NetworkPolicy metadata: name: {{ include "kafka.fullname" . }}-egress-zookeeper namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: {{ include "kafka.labels" . | nindent 4 }} spec: policyTypes: diff --git a/charts/kafka/templates/networkpolicy-entity-operator-kube-api.yaml b/charts/kafka/templates/networkpolicy-entity-operator-kube-api.yaml index eaa57d1..b786891 100644 --- a/charts/kafka/templates/networkpolicy-entity-operator-kube-api.yaml +++ b/charts/kafka/templates/networkpolicy-entity-operator-kube-api.yaml @@ -12,6 +12,10 @@ kind: CiliumNetworkPolicy metadata: name: {{ include "kafka.fullname" . }}-egress-entity-operator namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: {{ include "kafka.labels" . | nindent 4 }} spec: endpointSelector: diff --git a/charts/kafka/templates/networkpolicy-entity-operator.yaml b/charts/kafka/templates/networkpolicy-entity-operator.yaml index a8a0e01..0a6b5cf 100644 --- a/charts/kafka/templates/networkpolicy-entity-operator.yaml +++ b/charts/kafka/templates/networkpolicy-entity-operator.yaml @@ -5,6 +5,10 @@ kind: NetworkPolicy metadata: name: {{ include "kafka.fullname" . }}-egress-entity-operator namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: {{ include "kafka.labels" . | nindent 4 }} spec: policyTypes: diff --git a/charts/kafka/templates/networkpolicy-kafka-exporter.yaml b/charts/kafka/templates/networkpolicy-kafka-exporter.yaml index 54f6fef..949e44c 100644 --- a/charts/kafka/templates/networkpolicy-kafka-exporter.yaml +++ b/charts/kafka/templates/networkpolicy-kafka-exporter.yaml @@ -5,6 +5,10 @@ kind: NetworkPolicy metadata: name: {{ include "kafka.fullname" . }}-egress-kafka-exporter namespace: {{ .Release.Namespace }} +{{- if .Values.additionalAnnotations }} + annotations: + {{ toYaml .Values.additionalAnnotations | nindent 4 }} +{{- end }} labels: {{ include "kafka.labels" . | nindent 4 }} spec: policyTypes: