-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eirik A <[email protected]>
- Loading branch information
Showing
19 changed files
with
619 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
charts/kube-prometheus-stack/ci/05-alertmanager-ingress-host-with-wildcard-values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
alertmanager: | ||
ingress: | ||
enabled: true | ||
hosts: | ||
- "*.test.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
charts/prometheus-mysql-exporter/templates/prometheusrule.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{- if .Values.prometheusRule.enabled }} | ||
apiVersion: monitoring.coreos.com/v1 | ||
kind: PrometheusRule | ||
metadata: | ||
name: {{ template "prometheus-mysql-exporter.fullname" . }} | ||
{{- with .Values.prometheusRule.namespace }} | ||
namespace: {{ . }} | ||
{{- end }} | ||
labels: | ||
{{ include "prometheus-mysql-exporter.labels" . | indent 4 }} | ||
{{- with .Values.prometheusRule.additionalLabels }} | ||
{{ toYaml . | indent 4 }} | ||
{{- end }} | ||
spec: | ||
{{- with .Values.prometheusRule.rules }} | ||
groups: | ||
- name: {{ template "prometheus-mysql-exporter.name" $ }} | ||
rules: {{ tpl (toYaml .) $ | nindent 8 }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: v2 | ||
name: prometheus-systemd-exporter | ||
description: A Helm chart for prometheus systemd-exporter | ||
type: application | ||
version: 0.1.0 | ||
appVersion: "0.6.0" | ||
home: https://github.com/prometheus-community/systemd_exporter | ||
sources: | ||
- https://github.com/prometheus-community/systemd_exporter | ||
maintainers: | ||
- name: capuche2412 | ||
email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Prometheus Systemd Exporter | ||
|
||
Prometheus exporter for systemd units, written in Go. | ||
|
||
This chart bootstraps a prometheus [systemd exporter](https://github.com/prometheus-community/systemd_exporter) deployment on a [Kubernetes](http://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager. | ||
|
||
## Add Helm Chart Repository | ||
|
||
```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 install [RELEASE_NAME] prometheus-community/prometheus-systemd-exporter | ||
``` | ||
|
||
_See [configuration](#configuring) below._ | ||
|
||
_See [helm install](https://helm.sh/docs/helm/helm_install/) for command documentation._ | ||
|
||
## Uninstall Chart | ||
|
||
```console | ||
helm uninstall [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._ | ||
|
||
## Configuring | ||
|
||
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](./values.yaml), or run these configuration commands: | ||
|
||
```console | ||
helm show values prometheus-community/prometheus-systemd-exporter | ||
``` |
Empty file.
132 changes: 132 additions & 0 deletions
132
charts/prometheus-systemd-exporter/templates/_helpers.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
{{/* vim: set filetype=mustache: */}} | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "prometheus-systemd-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-systemd-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-systemd-exporter.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "prometheus-systemd-exporter.labels" -}} | ||
helm.sh/chart: {{ include "prometheus-systemd-exporter.chart" . }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/component: metrics | ||
app.kubernetes.io/part-of: {{ include "prometheus-systemd-exporter.name" . }} | ||
{{ include "prometheus-systemd-exporter.selectorLabels" . }} | ||
{{- with .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ . | quote }} | ||
{{- end }} | ||
{{- with .Values.podLabels }} | ||
{{ toYaml . }} | ||
{{- end }} | ||
{{- if .Values.releaseLabel }} | ||
release: {{ .Release.Name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "prometheus-systemd-exporter.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "prometheus-systemd-exporter.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "prometheus-systemd-exporter.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "prometheus-systemd-exporter.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
The image to use | ||
*/}} | ||
{{- define "prometheus-systemd-exporter.image" -}} | ||
{{- if .Values.image.sha }} | ||
{{- fail "image.sha forbidden. Use image.digest instead" }} | ||
{{- else if .Values.image.digest }} | ||
{{- if .Values.global.imageRegistry }} | ||
{{- printf "%s/%s:%s@%s" .Values.global.imageRegistry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) .Values.image.digest }} | ||
{{- else }} | ||
{{- printf "%s/%s:%s@%s" .Values.image.registry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) .Values.image.digest }} | ||
{{- end }} | ||
{{- else }} | ||
{{- if .Values.global.imageRegistry }} | ||
{{- printf "%s/%s:%s" .Values.global.imageRegistry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }} | ||
{{- else }} | ||
{{- printf "%s/%s:%s" .Values.image.registry .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Allow the release namespace to be overridden for multi-namespace deployments in combined charts | ||
*/}} | ||
{{- define "prometheus-systemd-exporter.namespace" -}} | ||
{{- if .Values.namespaceOverride }} | ||
{{- .Values.namespaceOverride }} | ||
{{- else }} | ||
{{- .Release.Namespace }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the namespace name of the service monitor | ||
*/}} | ||
{{- define "prometheus-systemd-exporter.monitor-namespace" -}} | ||
{{- if .Values.namespaceOverride }} | ||
{{- .Values.namespaceOverride }} | ||
{{- else }} | ||
{{- if .Values.prometheus.monitor.namespace }} | ||
{{- .Values.prometheus.monitor.namespace }} | ||
{{- else }} | ||
{{- .Release.Namespace }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Formats imagePullSecrets. Input is (dict "Values" .Values "imagePullSecrets" .{specific imagePullSecrets}) | ||
*/}} | ||
{{- define "prometheus-systemd-exporter.imagePullSecrets" -}} | ||
{{- range (concat .Values.global.imagePullSecrets .imagePullSecrets) }} | ||
{{- if eq (typeOf .) "map[string]interface {}" }} | ||
- {{ toYaml . | trim }} | ||
{{- else }} | ||
- name: {{ . }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end -}} |
Oops, something went wrong.