Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
0c84c10
[INTERNAL] Publish to ghr
amuraru Jul 29, 2021
786dcc4
[INTERNAL] Export number of members and assigned partitions for each …
amuraru Sep 20, 2021
30c8271
[INTERNAL] Export numerical kafka_topic_info parameters/labels as ind…
amuraru Sep 20, 2021
3fbb6ef
[INTERNAL] Don't report metrics for empty consumer groups
amuraru Sep 20, 2021
61cfff7
[INTERNAL] Filter out ignored consumer groups earlier to avoid caching
amuraru Oct 23, 2021
c066127
[INTERNAL] Cache consumer groups cross requests
amuraru Oct 23, 2021
807d9e3
[INTERNAL] Add a new metrics to count all groups included those ignored
amuraru Oct 24, 2021
7627e60
[INTERNAL] Don't report offsets and lag for dead consumer groups
amuraru Oct 24, 2021
bbc1c7d
[INTERNAL] - Helm changes for Spinnaker deployment
amuraru Dec 22, 2021
9ce376c
Set GOMAXPROCS automatically
amuraru Jun 27, 2022
6f200bd
Expose max timestamp for each topic and/or partition (#3)
amuraru Sep 19, 2022
17c70a4
Run as non-root and root group for OpenShift compatibility
amuraru May 14, 2023
4f2c3b0
Run as non-root and root group for OpenShift compatibility ADDENDUM (#5)
dobrerazvan Jun 12, 2023
0e82c7c
Collect metrics for a set of CG states (#7)
dobrerazvan Jul 24, 2023
b201f8c
Collect metrics for a set of CG states ADDENDUM (#8)
dobrerazvan Jul 27, 2023
caa5c0a
fix: Dockerfile to reduce vulnerabilities (#6)
amuraru Jul 27, 2023
2a2054c
Added periodic client refresh for e2e monitoring.
azun Sep 25, 2023
ee72349
Comments and refactored topic management logic
azun Oct 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 37 additions & 43 deletions .github/workflows/docker-image.yaml
Original file line number Diff line number Diff line change
@@ -1,62 +1,56 @@
name: Build Docker image
name: docker-image-push

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on:
push:
tags:
- '*'
branches:
- "master"
paths-ignore:
- 'charts/**'
tags: [ '*' ]

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: adobe/kminion

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Checkout repository
uses: actions/checkout@v3
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
driver-opts: image=moby/buildkit:v0.10.3,network=host

registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set Release Date
run: |
echo "BUILT_AT=$(date --rfc-3339=date)" >> ${GITHUB_ENV}

- name: Docker meta
id: docker_meta
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
vectorized/kminion
redpandadata/kminion
# generate Docker tags based on the following events/attributes
# Semver type is only active on 'push tag' events, hence no enable condition required
tags: |
type=sha,prefix={{branch}}-,format=short,enable={{is_default_branch}}
type=semver,pattern={{raw}}

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build and push
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.docker_meta.outputs.tags }}
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ fromJSON(steps.docker_meta.outputs.json).labels['org.opencontainers.image.version'] }}
VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
BUILT_AT=${{ env.BUILT_AT }}
COMMIT=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
31 changes: 0 additions & 31 deletions .github/workflows/go-releaser.yaml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/workflows/kics-iac.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/snyk-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: |
snyk monitor --project-name=kminion --remote-repo=redpanda-data/kminion --target-reference=${GITHUB_REF#refs/heads/} .
shell: bash
snyk monitor --project-name=kminion --remote-repo=adobe/kminion --target-reference=${GITHUB_REF#refs/heads/} .
shell: bash
38 changes: 0 additions & 38 deletions .goreleaser.yml

This file was deleted.

7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ RUN CGO_ENABLED=0 go build \
############################################################
# Runtime Image
############################################################
FROM alpine:3.17
FROM alpine:3
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/bin/kminion /app/kminion
RUN addgroup -S redpanda \
&& adduser -S redpanda -G redpanda \
&& chmod o+rx /app/kminion
USER redpanda
RUN chmod -R +x /app/kminion

ENTRYPOINT ["/app/kminion"]
1 change: 0 additions & 1 deletion charts/kminion/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ helm.sh/chart: {{ include "kminion.chart" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.customLabels}}
{{ toYaml .Values.customLabels }}
{{- end}}
Expand Down
3 changes: 3 additions & 0 deletions charts/kminion/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ kind: ConfigMap
metadata:
name: {{include "kminion.fullname" .}}
namespace: {{ .Release.Namespace | quote }}
annotations:
strategy.spinnaker.io/versioned: "false"
strategy.spinnaker.io/replace: "true"
labels:
{{- include "kminion.labels" . | nindent 4}}
data:
Expand Down
12 changes: 6 additions & 6 deletions charts/kminion/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
replicaCount: 1

image:
repository: redpandadata/kminion
repository: ghcr.io/adobe/kminion
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
Expand All @@ -28,14 +28,14 @@ podAnnotations: {}
# prometheus.io/port: "8080"
# prometheus.io/path: "/metrics"

podSecurityContext:
runAsUser: 99
fsGroup: 99
podSecurityContext: {}
# runAsUser: 99
# fsGroup: 99

## See `kubectl explain poddisruptionbudget.spec` for more
## ref: https://kubernetes.io/docs/tasks/run-application/configure-pdb/
podDisruptionBudget:
maxUnavailable: 1
podDisruptionBudget: {}
# maxUnavailable: 1
# minAvailable: 1

securityContext: {}
Expand Down
44 changes: 42 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
version: '2.1'
version: '3.9'

services:

Expand All @@ -12,6 +12,8 @@ services:
ZOOKEEPER_TICK_TIME: 2000
container_name: zookeeper
hostname: zookeeper
networks:
- kminion

kafka:
image: confluentinc/cp-kafka:latest
Expand All @@ -30,6 +32,10 @@ services:
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
links:
- zookeeper
networks:
- kminion

kafka-minion:
build:
Expand All @@ -44,4 +50,38 @@ services:
- 8080:8080
environment:
KAFKA_BROKERS: kafka:29092
restart: unless-stopped
restart: unless-stopped
links:
- kafka
networks:
- kminion

grafana:
image: grafana/grafana-oss
ports:
- '3000:3000'
volumes:
- "/tmp/grafana:/var/lib/grafana"
container_name: grafana
hostname: grafana
networks:
- kminion

prometheus:
image: prom/prometheus
ports:
- '9090:9090'
configs:
- source: prometheus
target: /etc/prometheus/prometheus.yml
container_name: prometheus
hostname: prometheus
networks:
- kminion
configs:
prometheus:
file: example/sample_prometheus.yml


networks:
kminion:
12 changes: 7 additions & 5 deletions e2e/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ import (
)

type Config struct {
Enabled bool `koanf:"enabled"`
TopicManagement EndToEndTopicConfig `koanf:"topicManagement"`
ProbeInterval time.Duration `koanf:"probeInterval"`
Producer EndToEndProducerConfig `koanf:"producer"`
Consumer EndToEndConsumerConfig `koanf:"consumer"`
Enabled bool `koanf:"enabled"`
TopicManagement EndToEndTopicConfig `koanf:"topicManagement"`
ProbeInterval time.Duration `koanf:"probeInterval"`
ReconnectInterval time.Duration `koanf:"reconnectInterval"`
Producer EndToEndProducerConfig `koanf:"producer"`
Consumer EndToEndConsumerConfig `koanf:"consumer"`
}

func (c *Config) SetDefaults() {
c.Enabled = false
c.ProbeInterval = 100 * time.Millisecond
c.ReconnectInterval = 0 * time.Second
c.TopicManagement.SetDefaults()
c.Producer.SetDefaults()
c.Consumer.SetDefaults()
Expand Down
Loading