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

Release v2 changes #177

Merged
merged 2 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 0 additions & 17 deletions .gitignore

This file was deleted.

6 changes: 6 additions & 0 deletions helmcharts/kitchen/additional/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dependencies:
- name: common
repository: https://nimbushubin.github.io/helmcharts
version: 0.1.0
digest: sha256:1caa4d36f25ec305383122b0a8a6d585921a608b03d9aaf15fa70b5044d109ea
generated: "2023-10-10T06:58:15.158733765+02:00"
7 changes: 7 additions & 0 deletions helmcharts/kitchen/additional/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v2
appVersion: 1.0.0
description: Obsrv Helm Chart
maintainers:
- name: Sanketika.in
name: obsrv
version: 0.1.0
Empty file.
23 changes: 23 additions & 0 deletions helmcharts/kitchen/additional/charts/druid-exporter/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
24 changes: 24 additions & 0 deletions helmcharts/kitchen/additional/charts/druid-exporter/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
apiVersion: v1
appVersion: "v0.11.0"
description: Druid exporter to monitor druid metrics with Prometheus
name: druid-exporter
version: 0.11.0
home: https://github.com/opstree/druid-exporter
maintainers:
- email: [email protected]
name: iamabhishek-dubey
- email: [email protected]
name: sandy724
- email: [email protected]
name: Stephan3555
sources:
- https://github.com/opstree/druid-exporter/helm
keywords:
- kubernetes
- apache
- druid
- exporter
- prometheus
- grafana
icon: https://github.com/opstree/druid-exporter/blob/master/static/druid-exporter-logo.svg
91 changes: 91 additions & 0 deletions helmcharts/kitchen/additional/charts/druid-exporter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Prometheus Druid Exporter

A Prometheus exporter for [Druid](https://druid.apache.org/) metrics.

Installs the [Druid Exporter](https://github.com/opstree/druid-exporter) for [Prometheus](https://prometheus.io/).

Some of the metrics collections are:-
- Druid's health metrics
- Druid's datasource metrics
- Druid's segment metrics
- Druid's supervisor metrics
- Druid's tasks metrics
- Druid's components metrics like:- broker, historical, ingestion(kafka), coordinator, sys

## Get Repo Info

```console
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
```

_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._

## Install Chart

```console
# Helm 3
$ helm install [RELEASE_NAME] prometheus-community/prometheus-druid-exporter

# Helm 2
$ helm install --name [RELEASE_NAME] prometheus-community/prometheus-druid-exporter
```

_See [configuration](#configuration) below._

_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._

## Uninstall Chart

```console
# Helm 3
$ helm uninstall [RELEASE_NAME]

# Helm 2
# helm delete --purge [RELEASE_NAME]
```

This removes all the Kubernetes components associated with the chart and deletes the release.

_See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command documentation._

## Upgrading Chart

```console
# Helm 3 or 2
$ helm upgrade [RELEASE_NAME] [CHART] --install
```

_See [helm upgrade](https://helm.sh/docs/helm/helm_upgrade/) for command documentation._

## Configuration

See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments, visit the chart's [values.yaml](https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus-druid-exporter/values.yaml), or run these configuration commands:

```console
# Helm 2
$ helm inspect values prometheus-community/prometheus-druid-exporter

# Helm 3
$ helm show values prometheus-community/prometheus-druid-exporter
```

### Druid Server Connection

To use this chart, ensure that `druidURL` is populated with valid Druid URL. Basically this is the URL of druid router or coordinator service.

An example could be:-

```console
http://druid.opstreelabs.in
```

### Service Monitor

The chart comes with a ServiceMonitor for use with the [kube-pometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack). If you're not using the Prometheus Operator, you can disable the ServiceMonitor by setting `serviceMonitor.enabled` to `false` and instead populate the `podAnnotations` as below:

```yaml
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "metrics"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "prometheus-druid-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 "prometheus-druid-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 "prometheus-druid-exporter.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create the name of the service account to use
*/}}
{{- define "prometheus-druid-exporter.serviceAccountName" -}}
{{- if .Values.serviceAccount.create -}}
{{ default (include "prometheus-druid-exporter.fullname" .) .Values.serviceAccount.name }}
{{- else -}}
{{ default "default" .Values.serviceAccount.name }}
{{- end -}}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# .Values.namespace will get overridden by .Values.global.namespace.chart-name
{{- define "base.namespace" -}}
{{- $chartName := .Chart.Name }}
{{- $namespace := default .Release.Namespace .Values.namespace }}
{{- if .Values.global }}
{{- with .Values.global.namespace }}
{{- if hasKey . $chartName }}
{{- $namespace = index . $chartName }}
{{- end }}
{{- end }}
{{- end }}
{{- $namespace | trunc 63 | trimSuffix "-" }}
{{- end }}

Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "prometheus-druid-exporter.fullname" . }}
namespace: {{ include "base.namespace" . }}
labels:
app.kubernetes.io/name: {{ include "prometheus-druid-exporter.fullname" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
annotations:
{{- toYaml .Values.annotations | nindent 4 }}
spec:
selector:
matchLabels:
app.kubernetes.io/name: {{ include "prometheus-druid-exporter.fullname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
template:
metadata:
labels:
app.kubernetes.io/name: {{ include "prometheus-druid-exporter.fullname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
system.monitoring: "true"
spec:
containers:
- env:
- name: DRUID_URL
value: {{ .Values.druidURL }}
- name: PORT
value: {{ .Values.exporterPort | quote}}
- name: LOG_LEVEL
value: {{ .Values.logLevel }}
- name: LOG_FORMAT
value: {{ .Values.logFormat }}
- name: NO_HISTOGRAM
value: {{ .Values.noHistogram | quote}}
{{- if .Values.extraEnv }}
{{ toYaml .Values.extraEnv | indent 8 }}
{{- end }}
{{- if .Values.security.enabled }}
- name: DRUID_USER
value: {{ .Values.security.druidUser }}
- name: DRUID_PASSWORD
{{- if not .Values.security.druidPassword.secretKeyRef.enabled }}
value: {{ .Values.security.druidPassword.value }}
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Values.security.druidPassword.secretKeyRef.secretName }}
key: {{ .Values.security.druidPassword.secretKeyRef.secretKey }}
{{- end }}
{{- end }}
image: "{{ .Values.image.name }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
name: {{ include "prometheus-druid-exporter.fullname" . }}
ports:
- containerPort: {{ .Values.exporterPort }}
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- if .Values.serviceAccount.create }}
serviceAccount: {{ include "prometheus-druid-exporter.fullname" . }}
serviceAccountName: {{ include "prometheus-druid-exporter.fullname" . }}
{{- end }}
{{- if .Values.affinity }}
affinity: {{- toYaml .Values.affinity | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- toYaml .Values.tolerations | nindent 8 }}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
apiVersion: v1
kind: Service
metadata:
labels:
app.kubernetes.io/name: {{ include "prometheus-druid-exporter.fullname" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
release: monitoring
system.monitoring: "true"
name: {{ include "prometheus-druid-exporter.fullname" . }}
namespace: {{ include "base.namespace" . }}
spec:
ports:
- name: metrics
port: {{ .Values.exporterPort }}
protocol: TCP
targetPort: {{ .Values.exporterPort }}
selector:
app.kubernetes.io/name: {{ include "prometheus-druid-exporter.fullname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
type: {{ .Values.serviceType }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{- if .Values.serviceAccount.create -}}
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "prometheus-druid-exporter.fullname" . }}
namespace: {{ include "base.namespace" . }}
labels:
app.kubernetes.io/name: {{ include "prometheus-druid-exporter.fullname" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{{- if .Values.serviceMonitor.enabled -}}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
app.kubernetes.io/name: {{ include "prometheus-druid-exporter.fullname" . }}
helm.sh/chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/version: {{ .Chart.AppVersion }}
release: monitoring
system.monitoring: "true"
{{- range $key, $value := .Values.serviceMonitor.additionalLabels }}
{{ $key }}: {{ $value | quote }}
{{- end }}
name: {{ include "prometheus-druid-exporter.fullname" . }}
namespace: {{ include "base.namespace" . }}
spec:
endpoints:
- interval: {{ .Values.serviceMonitor.interval }}
path: /metrics
port: metrics
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- if .Values.serviceMonitor.relabelings }}
relabelings:
{{ toYaml .ValuesserviceMonitor.relabelings | indent 4 }}
{{- end }}
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{ toYaml .Values.serviceMonitor.metricRelabelings | indent 4 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ include "base.namespace" . }}
selector:
matchLabels:
app.kubernetes.io/name: {{ include "prometheus-druid-exporter.fullname" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
release: monitoring
{{- if .Values.serviceMonitor.targetLabels }}
targetLabels:
{{- range .Values.serviceMonitor.targetLabels }}
- {{ . }}
{{- end }}
{{- end }}
{{- end -}}
Loading