Skip to content

Commit

Permalink
Remove zookeeper
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Stejskal <[email protected]>
  • Loading branch information
Frawless committed Sep 6, 2024
1 parent b035356 commit e6abcbf
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 126 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Collection of deployment files for projects deployed in our long-running scenari
One of the used projects is [Strimzi](https://github.com/strimzi/strimzi-kafka-operator) project.
You can find the examples of our deployment configuration in [strimzi](strimzi) folder.

In our example we deploy 2 Strimzi operators to manager KRaft and Zookeeper mode Kafka clusters.
In our example we deploy 2 Strimzi operators to manager Main and Mirror Kafka clusters.
Between the clusters there is a KafkaMirrorMaker2 established to mirror data from one cluster to another.

## Debezium
Expand Down
47 changes: 0 additions & 47 deletions metrics/alerts/kafka/kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -421,53 +421,6 @@ spec:
annotations:
summary: 'One or more Kafka containers restarted too often ({{ $labels.namespace }}/{{ $labels.pod }})'
description: 'One or more Kafka containers were restarted too often within the last 5 minutes'
- name: zookeeper
rules:
- alert: AvgRequestLatency
expr: zookeeper_avgrequestlatency > 10
for: 1m
labels:
severity: warning
app: strimzi
annotations:
summary: 'Zookeeper average request latency'
description: 'The average request latency is {{ $value }} on {{ $labels.kubernetes_pod_name }}'
- alert: OutstandingRequests
expr: zookeeper_outstandingrequests > 10
for: 1m
labels:
severity: warning
app: strimzi
annotations:
summary: 'Zookeeper outstanding requests'
description: 'There are {{ $value }} outstanding requests on {{ $labels.kubernetes_pod_name }}'
- alert: ZookeeperRunningOutOfSpace
expr: kubelet_volume_stats_available_bytes{persistentvolumeclaim=~"data-(.+)-zookeeper-[0-9]+"} < 5368709120
for: 2m
labels:
severity: warning
app: strimzi
annotations:
summary: 'Zookeeper is running out of free disk space'
description: 'There are only {{ $value }} bytes available at {{ $labels.persistentvolumeclaim }} PVC'
- alert: ZookeeperContainerRestartedInTheLast5Minutes
expr: count(count_over_time(container_last_seen{container="zookeeper"}[5m])) > 2 * count(container_last_seen{container="zookeeper",pod=~".+-zookeeper-[0-9]+"})
for: 5m
labels:
severity: warning
app: strimzi
annotations:
summary: 'One or more Zookeeper containers were restarted too often ({{ $labels.namespace }}/{{ $labels.pod }})'
description: 'One or more Zookeeper containers were restarted too often within the last 5 minutes. This alert can be ignored when the Zookeeper cluster is scaling up'
- alert: ZookeeperContainersDown
expr: absent(container_last_seen{container="zookeeper",pod=~".+-zookeeper-[0-9]+"})
for: 3m
labels:
severity: major
app: strimzi
annotations:
summary: 'All `zookeeper` containers in the Zookeeper pods ({{ $labels.namespace }}/{{ $labels.pod }}) down or in CrashLookBackOff status'
description: 'All `zookeeper` containers in the Zookeeper pods ({{ $labels.namespace }}/{{ $labels.pod }}) have been down or in CrashLookBackOff status for 3 minutes'
- name: entityOperator
rules:
- alert: TopicOperatorContainerDown
Expand Down
78 changes: 0 additions & 78 deletions strimzi/main/kafka/00-kafka-route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -208,47 +208,6 @@ spec:
configMapKeyRef:
key: anubis-kafka-jmx-exporter-configuration.yaml
name: anubis-kafka-jmx-exporter-configuration
zookeeper:
replicas: 3
storage:
type: persistent-claim
size: 10Gi
class: standard-csi
metricsConfig:
type: jmxPrometheusExporter
valueFrom:
configMapKeyRef:
key: anubis-zookeeper-jmx-exporter-configuration.yaml
name: anubis-zookeeper-jmx-exporter-configuration
template:
podDisruptionBudget:
maxUnavailable: 0
pod:
tolerations:
- key: "nodetype"
operator: "Equal"
value: "kafka"
effect: "NoSchedule"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: nodetype
operator: In
values:
- kafka
topologySpreadConstraints:
# Deploy Zookeeper pods with spread with difference max 2 pod
- maxSkew: 4
# All nodes with same key are considered as one group, so we should pick a key, which has different values on the nodes
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
# label on Zookeper pods
strimzi.io/kind: Kafka

entityOperator:
template:
pod:
Expand Down Expand Up @@ -538,43 +497,6 @@ data:
---
apiVersion: v1
kind: ConfigMap
metadata:
name: anubis-zookeeper-jmx-exporter-configuration
data:
anubis-zookeeper-jmx-exporter-configuration.yaml: |
# See https://github.com/prometheus/jmx_exporter for more info about JMX Prometheus Exporter metrics
lowercaseOutputName: true
rules:
# replicated Zookeeper
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+)><>(\\w+)"
name: "zookeeper_$2"
type: GAUGE
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+), name1=replica.(\\d+)><>(\\w+)"
name: "zookeeper_$3"
type: GAUGE
labels:
replicaId: "$2"
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+), name1=replica.(\\d+), name2=(\\w+)><>(Packets\\w+)"
name: "zookeeper_$4"
type: COUNTER
labels:
replicaId: "$2"
memberType: "$3"
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+), name1=replica.(\\d+), name2=(\\w+)><>(\\w+)"
name: "zookeeper_$4"
type: GAUGE
labels:
replicaId: "$2"
memberType: "$3"
- pattern: "org.apache.ZooKeeperService<name0=ReplicatedServer_id(\\d+), name1=replica.(\\d+), name2=(\\w+), name3=(\\w+)><>(\\w+)"
name: "zookeeper_$4_$5"
type: GAUGE
labels:
replicaId: "$2"
memberType: "$3"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: anubis-cruise-control-jmx-exporter-configuration
data:
Expand Down

0 comments on commit e6abcbf

Please sign in to comment.