Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch #5

Merged
merged 100 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
4a963de
Support for scram sasl mechanisms
squ1d123 Apr 11, 2019
09cc043
updaed to use go modules
squ1d123 Apr 11, 2019
2032654
changed mechanism type to have scram prefix
squ1d123 Apr 12, 2019
211ab75
using latest commit on master for samara as it contains <https://gith…
squ1d123 Apr 14, 2019
467c68f
updated SCRAM to use generator function in the case of creating multi…
squ1d123 May 27, 2019
a402bdc
Add Helm Chart
abhishekjiitr Dec 10, 2019
d8a8460
Merge pull request #135 from abhishekjiitr/add-helm-chart
danielqsj Dec 24, 2019
61a00f5
Merge pull request #101 from squ1d123/scram
danielqsj Apr 17, 2020
35e6a82
Add configurable labels to everything
avanier Feb 17, 2021
4bb6bab
Bump chart version to 1.1.0
avanier Feb 17, 2021
450968d
fix: liveness and readiness probes added to k8s specs
Feb 24, 2021
96dbb3f
Merge pull request #204 from avanier/feature/add-labels-on-everything
danielqsj Feb 25, 2021
34867fc
Merge pull request #205 from mnacharov/200
danielqsj Mar 15, 2021
a09bb01
upgrade sarama to 1.28.0, go to 1.16
danielqsj Mar 16, 2021
d7f1a13
update crossbuild base image
danielqsj Mar 16, 2021
2f348b4
Fixing a bug, changing some indents, choosing consistent way of throw…
nikunjy Apr 9, 2021
c338e2d
fix "invalid sasl mechanism" error occuring in version 1.3.0
saurabhshendye Apr 20, 2021
fb84b44
use group assignment to fetch consumer offset instead of fetch all pa…
iamgd67 Apr 28, 2021
0e014a2
Merge pull request #215 from saurabhshendye/master
danielqsj May 18, 2021
9514777
Merge pull request #220 from iamgd67/consumer_offset_request_fetch_on…
danielqsj May 18, 2021
95f0d6b
Merge pull request #214 from nikunjy/bugs_and_indents
danielqsj May 18, 2021
037af0e
update vendor
danielqsj May 18, 2021
5efa65d
Merge branch 'master' of github.com:danielqsj/kafka_exporter
danielqsj May 18, 2021
a47b2d4
update vendor
danielqsj May 18, 2021
8ce04e4
Initial smoke test.
alesj May 19, 2021
1aef78a
Merge pull request #223 from alesj/test1
danielqsj May 25, 2021
c44d571
update vendor
danielqsj May 25, 2021
6ced721
Update kafka_exporter.go
wangqinghuan Jun 5, 2021
00a9337
correct typos
wangqinghuan Jun 5, 2021
a5452ab
update readme.md
wangqinghuan Jun 5, 2021
4fd335f
add kustomization base to repo
qclaogui Jun 20, 2021
962ebc8
Merge pull request #233 from qclaogui/add-kustomize-support
danielqsj Jun 28, 2021
e135244
Merge pull request #230 from wangqinghuan/support-kerberos-auth
danielqsj Jun 28, 2021
47859bd
Allow to skip certificate verification when tls is enabled
mfamador Jul 24, 2021
3da1186
Replace github.com/prometheus/common/log with standard libary log
mihail-i4v Aug 2, 2021
f58f1c9
go mod vendor
mihail-i4v Aug 2, 2021
a47c954
go mod tidy
mihail-i4v Aug 2, 2021
b2769a0
Set vendor properly
mihail-i4v Aug 2, 2021
4983f57
Upgrade sarama version to v1.29.0 to fix ASN errors during Kerberos a…
caizhihao1 Aug 16, 2021
36437c6
fix gssapi not show in the flag of sasl.mechanism
caizhihao1 Aug 17, 2021
decd790
Enable building multi-arch docker images for s390x
Sidong-Wei Aug 18, 2021
2f17d00
offset/lag collect use all partition if consumer group is not Stable
iamgd67 Sep 7, 2021
8c8be24
Merge pull request #255 from iamgd67/group_lag_fetch_consider_state
danielqsj Sep 7, 2021
b0a018e
Merge pull request #251 from linux-on-ibm-z/s390x_CI_image_enablement
danielqsj Sep 7, 2021
2f10cbe
Merge pull request #249 from Fatpa/master
danielqsj Sep 7, 2021
244850c
Merge pull request #242 from anovateam/allow_skip_tls_verify
danielqsj Sep 7, 2021
562e2d6
bump sarama to 1.29.1
danielqsj Sep 7, 2021
e67956d
update vendor
danielqsj Sep 7, 2021
c51cc9a
Merge branch 'master' into master
danielqsj Sep 7, 2021
bb0d645
Merge pull request #246 from mihail-sky/master
danielqsj Sep 7, 2021
3d76437
update vendor
danielqsj Sep 7, 2021
7a6e3c5
update readme
danielqsj Sep 7, 2021
ebb5516
add contributors in readme
danielqsj Sep 7, 2021
60a5243
add dev files and update vendor
danielqsj Sep 8, 2021
af20ba0
add offset.show-all to control offset logic
danielqsj Sep 8, 2021
b2d6bdd
fix build info missing
danielqsj Sep 8, 2021
7246c7a
uograde to go 1.17
danielqsj Sep 8, 2021
9ed7176
release 1.4.0
danielqsj Sep 8, 2021
ec51f5d
Limit number of getTopicMetrics routines.
alesj Apr 1, 2021
9eeb25c
Replace plog with promlog and glog.
alesj Jun 7, 2021
e09314b
Fix glog console output.
alesj Jun 10, 2021
c190e87
Add verbosity log level.
alesj Jun 10, 2021
bb94ceb
Hack around flag.Parse
alesj Jun 10, 2021
6de0519
fix and update vendor
danielqsj Sep 8, 2021
afbafe6
release 1.4.1
danielqsj Sep 8, 2021
b6cb6af
update readme
danielqsj Sep 8, 2021
9f116ce
Add possibility to enable TLS for web server
Sep 8, 2021
23a9746
Add tls.server-name for certif validation
Sep 9, 2021
a4d10e9
update README as well
Sep 9, 2021
aa75118
adjust README and chart
Sep 9, 2021
4797111
adjust chart
Sep 9, 2021
bc1d1a9
mutual auth
Sep 10, 2021
5ea0716
helm chart: changed log level to verbosity
nandanrao Sep 12, 2021
3e7b54b
Set glog levels to control verbosity
sknot-rh Sep 15, 2021
3a98569
Paolo's suggestion
sknot-rh Sep 15, 2021
34dd85e
Merge pull request #258 from edwin092/edwin/tls-server
danielqsj Sep 16, 2021
158e35e
Merge branch 'master' into helm-chart-to-verbosity
danielqsj Sep 16, 2021
49ae4a1
Merge pull request #261 from nandanrao/helm-chart-to-verbosity
danielqsj Sep 16, 2021
50666c4
Merge branch 'master' into logging
danielqsj Sep 16, 2021
b44f44d
Merge pull request #263 from sknot-rh/logging
danielqsj Sep 16, 2021
fe1622f
add more architectures
danielqsj Sep 16, 2021
7f76823
only contain supported platform of base image
danielqsj Sep 16, 2021
c3fe18e
update flag
danielqsj Sep 16, 2021
0d5d4ac
release 1.4.2
danielqsj Sep 16, 2021
1ec11f7
use go install instead of go get
danielqsj Sep 16, 2021
bc838fc
Remove dep
darklore Sep 17, 2021
b8e916a
github-release repo is moved
darklore Sep 17, 2021
653a5f1
Remove unused modules
darklore Sep 17, 2021
fb2baac
go fmt
darklore Sep 17, 2021
eec5440
Merge pull request #267 from darklore/gofmt
danielqsj Sep 18, 2021
9601004
Merge pull request #265 from darklore/repo-moved
danielqsj Sep 18, 2021
f8fd770
Merge pull request #264 from darklore/remove-dep
danielqsj Sep 18, 2021
c5a8fd4
Merge pull request #266 from darklore/remove-unused
danielqsj Sep 18, 2021
e8cd9a9
support disable FAST in kerberos
danielqsj Sep 22, 2021
3ba6041
Fix helm chart error in deployment.yaml
ALX-TH Nov 5, 2021
15e4ad6
Merge pull request #281 from ALX-TH/fix_helmchart_error
danielqsj Nov 8, 2021
b373e46
Fix number of workers when we have less than 2 topics
echernous Jan 17, 2022
6e14e80
Merge pull request #291 from echernous/fix/topic-metadata-workers
danielqsj Jan 18, 2022
4b8cf7e
Merge remote-tracking branch 'upstream/master' into fetch
foxdalas Feb 11, 2022
e03a7cf
Actualize fork
foxdalas Feb 11, 2022
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
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.*
vendor
Dockerfile
Makefile
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ kafka_exporter

# Test configuration
test/
.DS_Store
10 changes: 5 additions & 5 deletions .promu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ repository:
build:
flags: -a -tags netgo
ldflags: |
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
-X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
-X github.com/prometheus/common/version.Version={{.Version}}
-X github.com/prometheus/common/version.Revision={{.Revision}}
-X github.com/prometheus/common/version.Branch={{.Branch}}
-X github.com/prometheus/common/version.BuildUser={{user}}@{{host}}
-X github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}}
tarball:
files:
- LICENSE
19 changes: 14 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
sudo: required

services:
- docker

language: go

go:
- 1.9
- 1.17

env:
- GOFLAGS="-mod=readonly"

before_install:
- sudo rm -rf /var/lib/apt/lists/*
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- mkdir -vp ~/.docker/cli-plugins/
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.6.1/buildx-v0.6.1.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
- chmod a+x ~/.docker/cli-plugins/docker-buildx

after_success:
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
make docker;
make push;
fi
- if [[ -n "$TRAVIS_TAG" ]]; then
Expand Down
26 changes: 17 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ DOCKER_IMAGE_NAME ?= kafka-exporter
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))
TAG := $(shell echo `if [ "$(TRAVIS_BRANCH)" = "master" ] || [ "$(TRAVIS_BRANCH)" = "" ] ; then echo "latest"; else echo $(TRAVIS_BRANCH) ; fi`)

PUSHTAG ?= type=registry,push=true
DOCKER_PLATFORMS ?= linux/amd64,linux/s390x,linux/arm64,linux/ppc64le

all: format build test

style:
Expand All @@ -28,25 +31,30 @@ vet:

build: promu
@echo ">> building binaries"
@$(GO) mod vendor
@$(PROMU) build --prefix $(PREFIX)


crossbuild: promu
@echo ">> crossbuilding binaries"
@$(PROMU) crossbuild
@$(PROMU) crossbuild --go=1.17

tarball: promu
@echo ">> building release tarball"
@$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)

docker:
docker: build
@echo ">> building docker image"
@docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .
@docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" --build-arg BIN_DIR=. .

push:
@echo ">> pushing docker image, $(DOCKER_USERNAME),$(DOCKER_IMAGE_NAME),$(TAG)"
push: crossbuild
@echo ">> building and pushing multi-arch docker images, $(DOCKER_USERNAME),$(DOCKER_IMAGE_NAME),$(TAG)"
@docker login -u $(DOCKER_USERNAME) -p $(DOCKER_PASSWORD)
@docker tag "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" "$(DOCKER_USERNAME)/$(DOCKER_IMAGE_NAME):$(TAG)"
@docker push "$(DOCKER_USERNAME)/$(DOCKER_IMAGE_NAME):$(TAG)"
@docker buildx create --use
@docker buildx build -t "$(DOCKER_USERNAME)/$(DOCKER_IMAGE_NAME):$(TAG)" \
--output "$(PUSHTAG)" \
--platform "$(DOCKER_PLATFORMS)" \
.

release: promu github-release
@echo ">> pushing binary to github with ghr"
Expand All @@ -56,11 +64,11 @@ release: promu github-release
promu:
@GOOS=$(shell uname -s | tr A-Z a-z) \
GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \
$(GO) get -u github.com/prometheus/promu
$(GO) install github.com/prometheus/promu@v0.12.0

github-release:
@GOOS=$(shell uname -s | tr A-Z a-z) \
GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \
$(GO) get -u github.com/aktau/github-release
$(GO) install github.com/github-release/github-release@v0.10.0

.PHONY: all style format build test vet tarball docker promu
72 changes: 50 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
kafka_exporter
==============

[![Build Status](https://travis-ci.org/danielqsj/kafka_exporter.svg?branch=master)](https://travis-ci.org/danielqsj/kafka_exporter)[![Docker Pulls](https://img.shields.io/docker/pulls/danielqsj/kafka-exporter.svg)](https://hub.docker.com/r/danielqsj/kafka-exporter)[![Go Report Card](https://goreportcard.com/badge/github.com/danielqsj/kafka_exporter)](https://goreportcard.com/report/github.com/danielqsj/kafka_exporter)[![Language](https://img.shields.io/badge/language-Go-red.svg)](https://github.com/danielqsj/kafka-exporter)[![GitHub release](https://img.shields.io/badge/release-1.2.0-green.svg)](https://github.com/alibaba/derrick/releases)[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![Build Status](https://app.travis-ci.com/danielqsj/kafka_exporter.svg?branch=master)](https://app.travis-ci.com/danielqsj/kafka_exporter)[![Docker Pulls](https://img.shields.io/docker/pulls/danielqsj/kafka-exporter.svg)](https://hub.docker.com/r/danielqsj/kafka-exporter)[![Go Report Card](https://goreportcard.com/badge/github.com/danielqsj/kafka_exporter)](https://goreportcard.com/report/github.com/danielqsj/kafka_exporter)[![Language](https://img.shields.io/badge/language-Go-red.svg)](https://github.com/danielqsj/kafka-exporter)[![GitHub release](https://img.shields.io/badge/release-1.4.2-green.svg)](https://github.com/alibaba/derrick/releases)[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)

Kafka exporter for Prometheus. For other metrics from Kafka, have a look at the [JMX exporter](https://github.com/prometheus/jmx_exporter).

Expand All @@ -23,7 +23,7 @@ Table of Contents
- [Brokers](#brokers)
- [Topics](#topics)
- [Consumer Groups](#consumer-groups)
- [Grafana Dashboard](#grafana-dashboard)
- [Grafana Dashboard](#grafana-dashboard)
- [Contribute](#contribute)
- [Donation](#donation)
- [License](#license)
Expand All @@ -39,7 +39,6 @@ Dependency
- [Prometheus](https://prometheus.io)
- [Sarama](https://shopify.github.io/sarama)
- [Golang](https://golang.org)
- [Dep](https://github.com/golang/dep)

Download
--------
Expand Down Expand Up @@ -90,25 +89,45 @@ Flags

This image is configurable using different flags

| Flag name | Default | Description |
| ---------------------------- | ---------- | --------------------------------------------------------------------------------------------------- |
| kafka.server | kafka:9092 | Addresses (host:port) of Kafka server |
| kafka.version | 1.0.0 | Kafka broker version |
| sasl.enabled | false | Connect using SASL/PLAIN |
| sasl.handshake | true | Only set this to false if using a non-Kafka SASL proxy |
| sasl.username | | SASL user name |
| sasl.password | | SASL user password |
| tls.enabled | false | Connect using TLS |
| tls.ca-file | | The optional certificate authority file for TLS client authentication |
| tls.cert-file | | The optional certificate file for client authentication |
| tls.key-file | | The optional key file for client authentication |
| tls.insecure-skip-tls-verify | false | If true, the server's certificate will not be checked for validity |
| topic.filter | .* | Regex that determines which topics to collect |
| group.filter | .* | Regex that determines which consumer groups to collect |
| web.listen-address | :9308 | Address to listen on for web interface and telemetry |
| web.telemetry-path | /metrics | Path under which to expose metrics |
| log.level | info | Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal] |
| log.enable-sarama | false | Turn on Sarama logging |
| Flag name | Default | Description |
|------------------------------|----------------|----------------------------------------------------------------------------------------------------------------------------------------|
| kafka.server | kafka:9092 | Addresses (host:port) of Kafka server |
| kafka.version | 2.0.0 | Kafka broker version |
| sasl.enabled | false | Connect using SASL/PLAIN |
| sasl.handshake | true | Only set this to false if using a non-Kafka SASL proxy |
| sasl.username | | SASL user name |
| sasl.password | | SASL user password |
| sasl.mechanism | | SASL mechanism can be plain, scram-sha512, scram-sha256 |
| sasl.service-name | | Service name when using Kerberos Auth |
| sasl.kerberos-config-path | | Kerberos config path |
| sasl.realm | | Kerberos realm |
| sasl.keytab-path | | Kerberos keytab file path |
| sasl.kerberos-auth-type | | Kerberos auth type. Either 'keytabAuth' or 'userAuth' |
| tls.enabled | false | Connect to Kafka using TLS |
| tls.server-name | | Used to verify the hostname on the returned certificates unless tls.insecure-skip-tls-verify is given. The kafka server's name should be given |
| tls.ca-file | | The optional certificate authority file for Kafka TLS client authentication |
| tls.cert-file | | The optional certificate file for Kafka client authentication |
| tls.key-file | | The optional key file for Kafka client authentication |
| tls.insecure-skip-tls-verify | false | If true, the server's certificate will not be checked for validity |
| server.tls.enabled | false | Enable TLS for web server |
| server.tls.mutual-auth-enabled | false | Enable TLS client mutual authentication |
| server.tls.ca-file | | The certificate authority file for the web server |
| server.tls.cert-file | | The certificate file for the web server |
| server.tls.key-file | | The key file for the web server |
| topic.filter | .* | Regex that determines which topics to collect |
| group.filter | .* | Regex that determines which consumer groups to collect |
| web.listen-address | :9308 | Address to listen on for web interface and telemetry |
| web.telemetry-path | /metrics | Path under which to expose metrics |
| log.enable-sarama | false | Turn on Sarama logging |
| use.consumelag.zookeeper | false | if you need to use a group from zookeeper |
| zookeeper.server | localhost:2181 | Address (hosts) of zookeeper server |
| kafka.labels | | Kafka cluster name |
| refresh.metadata | 30s | Metadata refresh interval |
| offset.show-all | true | Whether show the offset/lag for all consumer group, otherwise, only show connected consumer groups |
| concurrent.enable | false | If true, all scrapes will trigger kafka operations otherwise, they will share results. WARN: This should be disabled on large clusters |
| topic.workers | 100 | Number of topic workers |
| verbosity | 0 | Verbosity log level |


### Notes

Expand Down Expand Up @@ -228,6 +247,15 @@ If you like Kafka Exporter, please give me a star. This will help more people kn

Please feel free to send me [pull requests](https://github.com/danielqsj/kafka_exporter/pulls).

Contributors ✨
----------

Thanks goes to these wonderful people:

<a href="https://github.com/danielqsj/kafka_exporter/graphs/contributors">
<img src="https://contrib.rocks/image?repo=danielqsj/kafka_exporter" />
</a>

Donation
--------

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.4.2
22 changes: 22 additions & 0 deletions charts/kafka-exporter/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
9 changes: 9 additions & 0 deletions charts/kafka-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: v1
appVersion: "1.0"
description: A Helm chart for Kubernetes
name: kafka-exporter
version: 1.2.0
home: https://github.com/abhishekjiitr/kafka-exporter-helm
maintainers:
- name: abhishekjiitr
email: abhi2254015@gmail.com
5 changes: 5 additions & 0 deletions charts/kafka-exporter/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
1.To see the metrics
{{- if contains "ClusterIP" .Values.service.type }}
kubectl port-forward svc/{{ include "kafka-exporter.fullname" . }} {{ .Values.service.port }}
echo "Visit http://127.0.0.1:{{ .Values.service.port }} to use your application"
{{- end }}
32 changes: 32 additions & 0 deletions charts/kafka-exporter/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "kafka-exporter.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "kafka-exporter.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "kafka-exporter.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Loading