Skip to content

Commit

Permalink
Merge pull request #463 from UrbanOS-Public/1103-kafka-monitoring
Browse files Browse the repository at this point in the history
Add kafka scraper to kafka exporter
  • Loading branch information
c-m-duncan authored Apr 19, 2023
2 parents 8cd4005 + 9ebe23a commit 581e2a7
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/kafka/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.0"
description: A Helm chart for deploying kafka via strimzi
name: kafka
version: 1.2.23
version: 1.2.24
sources:
- https://github.com/strimzi/strimzi-kafka-operator
- https://github.com/apache/kafka
Expand Down
7 changes: 6 additions & 1 deletion charts/kafka/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# kafka

![Version: 1.2.23](https://img.shields.io/badge/Version-1.2.23-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)
![Version: 1.2.24](https://img.shields.io/badge/Version-1.2.24-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)

A Helm chart for deploying kafka via strimzi

Expand Down Expand Up @@ -36,6 +36,11 @@ A Helm chart for deploying kafka via strimzi
| limitRange.enabled | bool | `true` | |
| rbac.enabled | bool | `true` | |
| resizeHook.enabled | bool | `true` | |
| scraper.cron | string | `"*/10 * * * *"` | |
| scraper.enabled | bool | `false` | |
| scraper.endpoint | string | `"kafka-exporter:9308/metrics"` | |
| scraper.image | string | `"alpine:latest"` | |
| scraper.serviceAccount | string | `"default"` | |
| strimzi-kafka-operator.enabled | bool | `true` | |
| strimzi-kafka-operator.resources.limits.cpu | string | `"500m"` | |
| strimzi-kafka-operator.resources.requests.cpu | string | `"100m"` | |
Expand Down
38 changes: 38 additions & 0 deletions charts/kafka/templates/kafka-exporter/scraper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{{- if .Values.scraper.enabled }}

apiVersion: batch/v1
kind: CronJob
metadata:
name: kafka-scraper-cron
spec:
schedule: "{{ .Values.scraper.cron }}"
concurrencyPolicy: Forbid
jobTemplate:
spec:
backoffLimit: 0
template:
spec:
securityContext:
runAsNonRoot: true
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
restartPolicy: Never
serviceAccount: "{{ .Values.scraper.serviceAccount }}"
containers:
- name: kafka-scraper
image: "{{ .Values.scraper.image }}"
imagePullPolicy: Always
resources:
limits:
memory: 100Mi
cpu: 100m
requests:
memory: 100Mi
cpu: 100m
command:
- "wget"
- "-qO-"
- "{{ .Values.scraper.endpoint }}"

{{- end }}
7 changes: 7 additions & 0 deletions charts/kafka/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ kafka:
cpu: 1400m
memory: 12500M

scraper:
enabled: false
cron: "*/10 * * * *"
image: "alpine:latest"
endpoint: kafka-exporter:9308/metrics
serviceAccount: default

zookeeper:
resources:
requests:
Expand Down
6 changes: 3 additions & 3 deletions charts/urban-os/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependencies:
version: 3.1.13
- name: kafka
repository: file://../kafka
version: 1.2.23
version: 1.2.24
- name: kubernetes-data-platform
repository: file://../kubernetes-data-platform
version: 1.7.3
Expand Down Expand Up @@ -56,5 +56,5 @@ dependencies:
- name: performancetesting
repository: file://../performancetesting
version: 0.1.8
digest: sha256:caea8eae7bc24a884b75488981dc69fbfe86b0691f8e036e66efd1d4fa8b3b80
generated: "2023-04-04T10:52:42.851282-04:00"
digest: sha256:9cd41e8e8f391438e184008976a63476d91c97336788f4e7bf8f9edd15e5fd71
generated: "2023-04-18T15:12:45.810426-05:00"
2 changes: 1 addition & 1 deletion charts/urban-os/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: "1.0"
description: Master chart that deploys the UrbanOS platform. See the individual dependency readmes for configuration options.
name: urban-os
version: 1.13.46
version: 1.13.47

dependencies:
- name: alchemist
Expand Down
2 changes: 1 addition & 1 deletion charts/urban-os/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# urban-os

![Version: 1.13.46](https://img.shields.io/badge/Version-1.13.46-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)
![Version: 1.13.47](https://img.shields.io/badge/Version-1.13.47-informational?style=flat-square) ![AppVersion: 1.0](https://img.shields.io/badge/AppVersion-1.0-informational?style=flat-square)

Master chart that deploys the UrbanOS platform. See the individual dependency readmes for configuration options.

Expand Down

0 comments on commit 581e2a7

Please sign in to comment.