From 12d89ac1f0436bf20c64b948ca858ed87ef395c8 Mon Sep 17 00:00:00 2001 From: zeritti <47476160+zeritti@users.noreply.github.com> Date: Wed, 30 Jul 2025 00:59:17 +0200 Subject: [PATCH] Replace bitnami chart in CI with strimzi Signed-off-by: zeritti <47476160+zeritti@users.noreply.github.com> --- charts/prometheus-kafka-exporter/Chart.lock | 10 +- charts/prometheus-kafka-exporter/Chart.yaml | 16 ++-- charts/prometheus-kafka-exporter/README.md | 2 +- .../ci/ci-values.yaml | 96 +++++++++++++++++-- .../templates/extra-manifests.yaml | 4 + charts/prometheus-kafka-exporter/values.yaml | 12 ++- 6 files changed, 116 insertions(+), 24 deletions(-) create mode 100644 charts/prometheus-kafka-exporter/templates/extra-manifests.yaml diff --git a/charts/prometheus-kafka-exporter/Chart.lock b/charts/prometheus-kafka-exporter/Chart.lock index 34b3cf0f52f0..0342241e0378 100644 --- a/charts/prometheus-kafka-exporter/Chart.lock +++ b/charts/prometheus-kafka-exporter/Chart.lock @@ -1,6 +1,6 @@ dependencies: -- name: kafka - repository: https://charts.bitnami.com/bitnami - version: 18.5.0 -digest: sha256:4f64699ad60e23f399546dd55e18ceed6f329b046c694b6ecff22aefad709ffb -generated: "2023-04-06T22:25:36.6695595+09:00" +- name: strimzi-kafka-operator + repository: oci://quay.io/strimzi-helm + version: 0.47.0 +digest: sha256:dcd6c009aa611b7dc94baede42fdb4be154e3cef2253c72ca84218d3838576e5 +generated: "2025-07-30T15:31:03.790846+02:00" diff --git a/charts/prometheus-kafka-exporter/Chart.yaml b/charts/prometheus-kafka-exporter/Chart.yaml index a02d7450b37e..51916975f5e8 100644 --- a/charts/prometheus-kafka-exporter/Chart.yaml +++ b/charts/prometheus-kafka-exporter/Chart.yaml @@ -1,12 +1,14 @@ apiVersion: v2 +# renovate: github=danielqsj/kafka_exporter appVersion: "v1.9.0" -description: A Helm chart to export the metrics from Kafka in Prometheus format using the kafka-exporter from https://github.com/danielqsj/kafka_exporter +description: A Helm chart to export the metrics from Kafka in Prometheus format using Kafka exporter from https://github.com/danielqsj/kafka_exporter name: prometheus-kafka-exporter home: https://github.com/danielqsj/kafka_exporter -version: 2.16.0 +version: 2.17.0 kubeVersion: ">=1.19.0-0" sources: - - https://gkarthiks.github.io/helm-charts/charts/prometheus-kafka-exporter + - https://github.com/danielqsj/kafka_exporter + - https://github.com/prometheus-community/helm-charts keywords: - prometheus - kafka @@ -25,7 +27,7 @@ annotations: - name: Chart Source url: https://github.com/prometheus-community/helm-charts/tree/main/charts/prometheus-kafka-exporter dependencies: - - name: kafka - version: "18.5.0" - repository: https://charts.bitnami.com/bitnami - condition: kafka.enabled + - name: strimzi-kafka-operator + version: "0.47.0" + repository: oci://quay.io/strimzi-helm + condition: strimziOperator.enabled diff --git a/charts/prometheus-kafka-exporter/README.md b/charts/prometheus-kafka-exporter/README.md index 0f89a13ba7f3..6c4356482c71 100644 --- a/charts/prometheus-kafka-exporter/README.md +++ b/charts/prometheus-kafka-exporter/README.md @@ -18,7 +18,7 @@ The chart is distributed as an [OCI Artifact](https://helm.sh/docs/topics/regist - OCI Artifact: `oci://ghcr.io/prometheus-community/charts/prometheus-kafka-exporter` - Helm Repository: `https://prometheus-community.github.io/helm-charts` with chart `prometheus-kafka-exporter` -The installation instructions use the OCI registry. Refer to the [`helm repo`]([`helm repo`](https://helm.sh/docs/helm/helm_repo/)) command documentation for information on installing charts via the traditional repository. +The installation instructions use the OCI registry. Refer to the [`helm repo`](https://helm.sh/docs/helm/helm_repo/) command documentation for information on installing charts via the traditional repository. ### Install Chart diff --git a/charts/prometheus-kafka-exporter/ci/ci-values.yaml b/charts/prometheus-kafka-exporter/ci/ci-values.yaml index ea1628106fcb..67500f39bfab 100644 --- a/charts/prometheus-kafka-exporter/ci/ci-values.yaml +++ b/charts/prometheus-kafka-exporter/ci/ci-values.yaml @@ -1,10 +1,94 @@ +# common test case +strimziOperator: + enabled: true + kafkaServer: - - ci-kafka:9092 + - "kafka-ci-controller-broker-0.kafka-ci-kafka-brokers:9092" +kafkaBrokerVersion: "4.0.0" -kafka: +liveness: enabled: true - fullnameOverride: ci-kafka + probe: + initialDelaySeconds: 55 +readiness: + enabled: true + probe: + initialDelaySeconds: 50 + +kafkaLabels: + cluster: kafka-ci + +sarama: + logEnabled: true + +extraArgs: + - "--log.level=debug" + +containerSecurityContext: + allowPrivilegeEscalation: false + capabilities: + drop: ["ALL"] + readOnlyRootFilesystem: true + runAsGroup: 10000 + runAsNonRoot: true + runAsUser: 10000 + seccompProfile: + type: RuntimeDefault + +resources: + limits: + cpu: 100m + memory: 64Mi + requests: + cpu: 100m + memory: 64Mi - zookeeper: - enabled: true - fullnameOverride: ci-zookeeper +extraManifests: + - | + apiVersion: kafka.strimzi.io/v1beta2 + kind: KafkaNodePool + metadata: + name: controller-broker + labels: + strimzi.io/cluster: kafka-ci + spec: + replicas: 1 + roles: + - controller + - broker + storage: + type: jbod + volumes: + - id: 0 + type: ephemeral + kraftMetadata: shared + - | + apiVersion: kafka.strimzi.io/v1beta2 + kind: Kafka + metadata: + name: kafka-ci + annotations: + strimzi.io/node-pools: enabled + strimzi.io/kraft: enabled + spec: + kafka: + version: {{ .Values.kafkaBrokerVersion }} + metadataVersion: 4.0-IV3 + listeners: + - name: plain + port: 9092 + type: internal + tls: false + - name: tls + port: 9093 + type: internal + tls: true + config: + offsets.topic.replication.factor: 1 + transaction.state.log.replication.factor: 1 + transaction.state.log.min.isr: 1 + default.replication.factor: 1 + min.insync.replicas: 1 + entityOperator: + topicOperator: {} + userOperator: {} diff --git a/charts/prometheus-kafka-exporter/templates/extra-manifests.yaml b/charts/prometheus-kafka-exporter/templates/extra-manifests.yaml new file mode 100644 index 000000000000..2b21b710621f --- /dev/null +++ b/charts/prometheus-kafka-exporter/templates/extra-manifests.yaml @@ -0,0 +1,4 @@ +{{ range .Values.extraManifests }} +--- +{{ tpl . $ }} +{{ end }} diff --git a/charts/prometheus-kafka-exporter/values.yaml b/charts/prometheus-kafka-exporter/values.yaml index ac43bdce3684..67773348af07 100644 --- a/charts/prometheus-kafka-exporter/values.yaml +++ b/charts/prometheus-kafka-exporter/values.yaml @@ -222,11 +222,6 @@ server: # mountPath: /secret/certs # secretName: -# If enabled Kafka dependency chart will be used. -# This is only needed for the CI job so it should always be disabled. -kafka: - enabled: false - # Set security context for the kafka-exporter pod. Useful when you need to adapt to an existing PSP securityContext: {} # fsGroup: 2000 @@ -246,3 +241,10 @@ containerSecurityContext: {} # runAsUser: 10001 # seccompProfile: # type: RuntimeDefault + +# Extra manifests to deploy ([]string, templated) +extraManifests: [] + +# Enable strimzi kafka operator in Actions only (ci) +strimziOperator: + enabled: false