Skip to content

Commit f145f2b

Browse files
authored
Merge pull request #30 from kir4h/add_process_exporter
add process exporter chart
2 parents edafd7f + 2bd5809 commit f145f2b

16 files changed

Lines changed: 467 additions & 11 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Description
2+
3+
Describe the purpose of this pull request.
4+
5+
## Changes
6+
7+
List the changes you have made.
8+
9+
## Additional Information
10+
11+
Include any additional information, such as how to test your changes.
12+
13+
## Checklist
14+
15+
- [ ] Chart version bumped in Chart.yaml (semver)
16+
- [ ] Documentation updated using [readme generator for Helm](https://github.com/bitnami/readme-generator-for-helm/tree/main)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Description
2+
3+
Describe the purpose of this pull request.
4+
5+
## Changes
6+
7+
List the changes you have made.
8+
9+
## Additional Information
10+
11+
Include any additional information, such as how to test your changes.
12+
13+
## Checklist
14+
15+
- [ ] Chart version bumped in Chart.yaml (semver)
16+
- [ ] Documentation updated

.github/workflows/lint-test.yaml

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,32 @@ name: Lint and Test Charts
33
on: pull_request
44

55
jobs:
6+
detect-changes:
7+
runs-on: ubuntu-latest
8+
outputs:
9+
changed: ${{ steps.set-output.outputs.changed }}
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set up chart-testing
17+
uses: helm/chart-testing-action@v2.7.0
18+
19+
- name: Run chart-testing (list-changed)
20+
id: set-output
21+
run: |
22+
changed=$(ct list-changed --config ct.yaml)
23+
echo "Changed charts: $changed"
24+
if [[ -n "$changed" ]]; then
25+
echo "changed=true" >> $GITHUB_OUTPUT
26+
else
27+
echo "changed=false" >> $GITHUB_OUTPUT
28+
fi
629
lint-test:
30+
needs: detect-changes
31+
if: needs.detect-changes.outputs.changed == 'true'
732
runs-on: ubuntu-latest
833
steps:
934
- name: Checkout
@@ -26,20 +51,28 @@ jobs:
2651
- name: Set up chart-testing
2752
uses: helm/chart-testing-action@v2.7.0
2853

29-
- name: Run chart-testing (list-changed)
30-
id: list-changed
31-
run: |
32-
changed=$(ct list-changed --config ct.yaml)
33-
if [[ -n "$changed" ]]; then
34-
echo "::set-output name=changed::true"
35-
fi
36-
3754
- name: Run chart-testing (lint)
3855
run: ct lint --config ct.yaml
3956

4057
- name: Create kind cluster
4158
uses: helm/kind-action@v1.12.0
42-
if: steps.list-changed.outputs.changed == 'true'
59+
60+
- name: Deploy Prometheus Operator CRDs
61+
run: |
62+
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
63+
helm repo update
64+
helm upgrade --install prometheus-operator-crds prometheus-community/prometheus-operator-crds \
65+
--namespace default \
66+
--wait \
67+
--set alertmanagerconfigs.enabled=false \
68+
--set alertmanagers.enabled=false \
69+
--set podmonitors.enabled=false \
70+
--set probes.enabled=false \
71+
--set prometheusagents.enabled=false \
72+
--set prometheuses.enabled=false \
73+
--set prometheusrules.enabled=false \
74+
--set scrapeconfigs.enabled=false \
75+
--set thanosrulers.enabled=false
4376
4477
- name: Run chart-testing (install)
4578
run: ct install --config ct.yaml

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# CONTRIBUTING
22

33
* Please create your Pull Requests to the `master` branch
4-
* Remember to update the chart's `README.md` whenever applicable (e.g: adding or editing parameters)
5-
* Bump version to `Chart.yaml`
4+
* Use the template that matches the chart you are updating
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*~
18+
# Various IDEs
19+
.project
20+
.idea/
21+
*.tmproj
22+
.vscode/

charts/process-exporter/Chart.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
dependencies:
2+
- name: common
3+
repository: oci://registry-1.docker.io/bitnamicharts
4+
version: 2.30.0
5+
digest: sha256:46afdf79eae69065904d430f03f7e5b79a148afed20aa45ee83ba88adc036169
6+
generated: "2025-04-13T13:28:42.552455+02:00"

charts/process-exporter/Chart.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
apiVersion: v2
2+
name: process-exporter
3+
description: A Helm chart for process-exporter
4+
type: application
5+
version: 1.0.0
6+
appVersion: 0.8.5
7+
home: https://github.com/kir4h/charts/tree/master/charts/process-exporter
8+
dependencies:
9+
- name: common
10+
repository: oci://registry-1.docker.io/bitnamicharts
11+
tags:
12+
- bitnami-common
13+
version: 2.x.x
14+
keywords:
15+
- prometheus
16+
- exporter
17+
sources:
18+
- https://github.com/ncabatoff/process-exporter
19+
maintainers:
20+
- name: kir4h
21+
email: 1671935+kir4h@users.noreply.github.com

charts/process-exporter/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Process exporter Helm Chart
2+
3+
## Chart Details
4+
5+
Helm Chart for [process exporter](https://github.com/ncabatoff/process-exporter)
6+
7+
## Parameters
8+
9+
### Common
10+
11+
| Name | Description | Value |
12+
| ------------------ | ------------------------------------------------------------------------------------- | ----- |
13+
| `nameOverride` | String to partially override gitea.fullname template (will maintain the release name) | `""` |
14+
| `fullnameOverride` | String to fully override gitea.fullname template | `""` |
15+
| `extraDeploy` | Array of extra objects to deploy with the release | `[]` |
16+
17+
### Process exporter
18+
19+
| Name | Description | Value |
20+
| ------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- |
21+
| `image.registry` | Process exporter image registry | `docker.io` |
22+
| `image.repository` | Process exporter image repository | `ncabatoff/process-exporter` |
23+
| `image.tag` | Process exporter image tag | `.Chart.AppVersion` |
24+
| `image.digest` | Image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | `sha256:6f0549dc24e97a51a3a3524271082cfa2f44352d96fd6a038bfa00659470639a` |
25+
| `image.pullPolicy` | Process exporter image pull policy | `IfNotPresent` |
26+
| `resources` | Set container requests and limits for different resources like CPU or memory | `{}` |
27+
| `config.threads` | specifies if metrics will be broken down by thread name as well as group name. | `false` |
28+
| `config.nameMatchers` | Check [configuration and group naming](https://github.com/ncabatoff/process-exporter/tree/master?tab=readme-ov-file#configuration-and-group-naming) | `[]` |
29+
| `nodeSelector` | Process exporter node labels for pod assignment | `{}` |
30+
| `tolerations` | Process exporter tolerations for pod assignment | `[]` |
31+
| `affinity` | Process exporter affinity for pod assignment | `{}` |
32+
| `livenessProbe.enabled` | Enable livenessProbe on Process exporter containers | `true` |
33+
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for livenessProbe | `30` |
34+
| `livenessProbe.periodSeconds` | Period seconds for livenessProbe | `30` |
35+
| `livenessProbe.timeoutSeconds` | Timeout seconds for livenessProbe | `30` |
36+
| `livenessProbe.failureThreshold` | Failure threshold for livenessProbe | `5` |
37+
| `livenessProbe.successThreshold` | Success threshold for livenessProbe | `1` |
38+
| `readinessProbe.enabled` | Enable readinessProbe on Process exporter containers | `true` |
39+
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readinessProbe | `30` |
40+
| `readinessProbe.periodSeconds` | Period seconds for readinessProbe | `30` |
41+
| `readinessProbe.timeoutSeconds` | Timeout seconds for readinessProbe | `30` |
42+
| `readinessProbe.failureThreshold` | Failure threshold for readinessProbe | `5` |
43+
| `readinessProbe.successThreshold` | Success threshold for readinessProbe | `1` |
44+
| `extraArgs` | Additional container arguments | `[]` |
45+
46+
### Traffic exposure
47+
48+
| Name | Description | Value |
49+
| -------------- | ---------------------------- | ----------- |
50+
| `service.type` | Kubernetes service type | `ClusterIP` |
51+
| `service.port` | Kubernetes service HTTP port | `9256` |
52+
53+
### Metrics
54+
55+
| Name | Description | Value |
56+
| ---------------------------------- | -------------------------------------------------------------------- | ------ |
57+
| `serviceMonitor.enabled` | Specify if a ServiceMonitor will be deployed for Prometheus Operator | `true` |
58+
| `serviceMonitor.metricRelabelings` | MetricRelabelConfigs to apply to samples before ingestion | `[]` |
59+
60+
### Other
61+
62+
| Name | Description | Value |
63+
| ----------------------- | ---------------------------------------------------- | ------ |
64+
| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` |
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "process-exporter.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
6+
{{- end -}}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "process-exporter.fullname" -}}
14+
{{- if .Values.fullnameOverride -}}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
16+
{{- else -}}
17+
{{- $name := default .Chart.Name .Values.nameOverride -}}
18+
{{- if contains $name .Release.Name -}}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
20+
{{- else -}}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
22+
{{- end -}}
23+
{{- end -}}
24+
{{- end -}}
25+
26+
{{- define "process-exporter.serviceAccountName" -}}
27+
{{ include "process-exporter.fullname" . }}
28+
{{- end }}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: v1
2+
kind: ConfigMap
3+
metadata:
4+
name: {{ template "process-exporter.fullname" . }}
5+
labels:
6+
app.kubernetes.io/name: {{ include "process-exporter.name" . }}
7+
app.kubernetes.io/instance: {{ .Release.Name }}
8+
data:
9+
config.yaml: |
10+
process_names:
11+
{{- toYaml .Values.config.nameMatchers | nindent 6}}

0 commit comments

Comments
 (0)