feat: add strimzi Kafka operator

This commit is contained in:
Stefan Reimer 2024-12-04 18:38:21 +00:00
parent d0431f3193
commit b17f8d403a
9 changed files with 110 additions and 7 deletions

View File

@ -2,7 +2,7 @@ apiVersion: v2
name: kubezero-operators name: kubezero-operators
description: Various operators supported by KubeZero description: Various operators supported by KubeZero
type: application type: application
version: 0.1.6 version: 0.1.7
home: https://kubezero.com home: https://kubezero.com
icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png icon: https://cdn.zero-downtime.net/assets/kubezero/logo-small-64.png
keywords: keywords:
@ -10,6 +10,7 @@ keywords:
- operators - operators
- opensearch - opensearch
- postgres - postgres
- kafka
maintainers: maintainers:
- name: Stefan Reimer - name: Stefan Reimer
email: stefan@zero-downtime.net email: stefan@zero-downtime.net
@ -29,4 +30,8 @@ dependencies:
version: 0.22.1 version: 0.22.1
repository: https://cloudnative-pg.github.io/charts repository: https://cloudnative-pg.github.io/charts
condition: cloudnative-pg.enabled condition: cloudnative-pg.enabled
- name: strimzi-kafka-operator
version: 0.44.0
repository: "oci://quay.io/strimzi-helm"
condition: strimzi-kafka-operator.enabled
kubeVersion: ">= 1.26.0" kubeVersion: ">= 1.26.0"

View File

@ -1,6 +1,6 @@
# kubezero-operators # kubezero-operators
![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![Version: 0.1.7](https://img.shields.io/badge/Version-0.1.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
Various operators supported by KubeZero Various operators supported by KubeZero
@ -22,6 +22,7 @@ Kubernetes: `>= 1.26.0`
| https://cloudnative-pg.github.io/charts | cloudnative-pg | 0.22.1 | | https://cloudnative-pg.github.io/charts | cloudnative-pg | 0.22.1 |
| https://helm.elastic.co | eck-operator | 2.15.0 | | https://helm.elastic.co | eck-operator | 2.15.0 |
| https://opensearch-project.github.io/opensearch-k8s-operator/ | opensearch-operator | 2.7.0 | | https://opensearch-project.github.io/opensearch-k8s-operator/ | opensearch-operator | 2.7.0 |
| oci://quay.io/strimzi-helm | strimzi-kafka-operator | 0.44.0 |
## Values ## Values
@ -46,6 +47,17 @@ Kubernetes: `>= 1.26.0`
| opensearch-operator.nodeSelector."node-role.kubernetes.io/control-plane" | string | `""` | | | opensearch-operator.nodeSelector."node-role.kubernetes.io/control-plane" | string | `""` | |
| opensearch-operator.tolerations[0].effect | string | `"NoSchedule"` | | | opensearch-operator.tolerations[0].effect | string | `"NoSchedule"` | |
| opensearch-operator.tolerations[0].key | string | `"node-role.kubernetes.io/control-plane"` | | | opensearch-operator.tolerations[0].key | string | `"node-role.kubernetes.io/control-plane"` | |
| strimzi-kafka-operator.enabled | bool | `false` | |
| strimzi-kafka-operator.leaderElection.enable | bool | `false` | |
| strimzi-kafka-operator.monitoring.podMonitorEnabled | bool | `false` | |
| strimzi-kafka-operator.nodeSelector."node-role.kubernetes.io/control-plane" | string | `""` | |
| strimzi-kafka-operator.resources.limits.memory | string | `"384Mi"` | |
| strimzi-kafka-operator.resources.requests.cpu | string | `"20m"` | |
| strimzi-kafka-operator.resources.requests.memory | string | `"256Mi"` | |
| strimzi-kafka-operator.revisionHistoryLimit | int | `3` | |
| strimzi-kafka-operator.tolerations[0].effect | string | `"NoSchedule"` | |
| strimzi-kafka-operator.tolerations[0].key | string | `"node-role.kubernetes.io/control-plane"` | |
| strimzi-kafka-operator.watchAnyNamespace | bool | `true` | |
---------------------------------------------- ----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2)

View File

@ -1,7 +1,7 @@
configmap: grafana-dashboards configmap: grafana-dashboards-pg
gzip: true gzip: true
condition: 'index .Values "cloudnative-pg" "monitoring" "podMonitorEnabled"' condition: 'index .Values "cloudnative-pg" "monitoring" "podMonitorEnabled"'
folder: KubeZero folder: Operators
dashboards: dashboards:
- name: Cloudnative-pg - name: Cloudnative-pg
url: https://raw.githubusercontent.com/cloudnative-pg/grafana-dashboards/refs/heads/main/charts/cluster/grafana-dashboard.json url: https://raw.githubusercontent.com/cloudnative-pg/grafana-dashboards/refs/heads/main/charts/cluster/grafana-dashboard.json

View File

@ -0,0 +1,10 @@
configmap: grafana-dashboards-strimzi
gzip: true
condition: 'index .Values "strimzi-kafka-operator" "monitoring" "podMonitorEnabled"'
folder: Operators
dashboards:
- name: strimzi-kafka-operator
url: https://raw.githubusercontent.com/strimzi/strimzi-kafka-operator/refs/heads/main/helm-charts/helm3/strimzi-kafka-operator/files/grafana-dashboards/strimzi-operators.json
tags:
- Kafka
- Strimzi

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
{{- if index .Values "strimzi-kafka-operator" "monitoring" "podMonitorEnabled" }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ printf "%s-%s" (include "kubezero-lib.fullname" $) "grafana-dashboards-strimzi" | trunc 63 | trimSuffix "-" }}
namespace: {{ .Release.Namespace }}
labels:
grafana_dashboard: "1"
{{- include "kubezero-lib.labels" . | nindent 4 }}
annotations:
k8s-sidecar-target-directory: Operators
binaryData:
strimzi-kafka-operator.json.gz:
H4sIAAAAAAAC/+1dW3PbuBV+96/g8KETzzhbUbIcb2f2wXE2u2ljx2M76bSJRwORkIQ1SXBBMLbiqr+9B+ANvElyZMdy57zYIkACONfvI0CQdzuWZY9Ggv6ZMEFj+2/WZyixrDv9F+rkPKJQak8FmZCQ2Ht5BfNai0MS6PN/q1d8pSJmPFR1r37a/2lo64rFXnt3EQmpX+8slkQ2e7pQpUsb84gkMU+ES+stRoIHVM5oEjfbPSvr7j9UyQIaU8FoS8OXZV3aMPy9UmfZJAw5SANqUpZIe7J9FsvCLmX/UDNOmC/fKZU6e2WpIW1VCuMcGpKxr+qlSKhRPmNeSylzeXjMfS5Ug2I6Ji96e1bfceDPcLhnObtm07mUR6Us1l+sI58K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/vGb8dLJb7KZVBRaVhlZS9mwwdmw2Yv/X3zwJiTfeWZ483HUlHfN5VMc6uaW611uFgfsvSTxd3XIuI0Ntk3lF7rXdm6iZ3F/wDuyXP7T6AAAA==
{{- end }}

View File

@ -0,0 +1,35 @@
{{- if index .Values "cloudnative-pg" "monitoring" "podMonitorEnabled" }}
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ printf "%s-%s" (include "kubezero-lib.fullname" $) "strimzi-kafka-operator" | trunc 63 | trimSuffix "-" }}
labels:
{{- include "kubezero-lib.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
strimzi.io/kind: cluster-operator
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
podMetricsEndpoints:
- path: /metrics
port: http
---
apiVersion: monitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: {{ printf "%s-%s" (include "kubezero-lib.fullname" $) "strimzi-kafka-entity" | trunc 63 | trimSuffix "-" }}
labels:
{{- include "kubezero-lib.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: entity-operator
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
podMetricsEndpoints:
- path: /metrics
port: healthcheck
{{- end }}

View File

@ -17,6 +17,7 @@ rm -rf charts/eck-operator/charts
yq eval -Mi 'del(.dependencies)' charts/eck-operator/Chart.yaml yq eval -Mi 'del(.dependencies)' charts/eck-operator/Chart.yaml
# Create ZDT dashboard configmap # Create ZDT dashboard configmap
../kubezero-metrics/sync_grafana_dashboards.py dashboards.yaml templates/cloudnative-pg/grafana-dashboards.yaml ../kubezero-metrics/sync_grafana_dashboards.py dashboards-pg.yaml templates/cloudnative-pg/grafana-dashboards.yaml
../kubezero-metrics/sync_grafana_dashboards.py dashboards-strimzi.yaml templates/strimzi/grafana-dashboards.yaml
update_docs update_docs

View File

@ -41,3 +41,28 @@ cloudnative-pg:
# We pull in the dashboard via our pipeline ! # We pull in the dashboard via our pipeline !
grafanaDashboard: grafanaDashboard:
create: false create: false
strimzi-kafka-operator:
enabled: false
revisionHistoryLimit: 3
watchAnyNamespace: true
leaderElection:
enable: false
tolerations:
- key: node-role.kubernetes.io/control-plane
effect: NoSchedule
nodeSelector:
node-role.kubernetes.io/control-plane: ""
resources:
requests:
cpu: 20m
memory: 256Mi
limits:
memory: 384Mi
monitoring:
podMonitorEnabled: false