Skip to content

Commit 5fbeaeb

Browse files
eddycharlymumoshu
authored andcommitted
added support for pod annotations (#7)
* Add support for pod annotations * Bump chart version 0.4.0 * pod annotations template improvement * Update ncabatoff/process-exporter image tag to 0.5.0 * Update doc with new image tag
1 parent 0978cb5 commit 5fbeaeb

File tree

4 files changed

+45
-38
lines changed

4 files changed

+45
-38
lines changed

README.md

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -37,42 +37,43 @@ The command removes all the Kubernetes components associated with the chart and
3737

3838
The following table lists the configurable parameters of the process exporter chart and their default values.
3939

40-
| Parameter | Description | Default | |
41-
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | --- |
42-
| `image.repository` | Image repository | `ncabatoff/process-exporter` | |
43-
| `image.tag` | Image tag | `0.4.0` | |
44-
| `image.pullPolicy` | Image pull policy | `IfNotPresent` | |
45-
| `groups` | [Entries of `process_names:` in the process-expoter config](https://github.com/ncabatoff/process-exporter/tree/master#using-a-config-file) | `{"groups": [{"comm": ["chronyd"]}, {"comm": ["bash"]}, {"comm": ["rsync"]}, {"comm": ["scp"]}, {"comm": ["ssh"]}]` |
46-
| `extraArgs` | Additional container arguments | `[]` | |
47-
| `extraHostVolumeMounts` | Additional host volume mounts | {} | |
48-
| `podLabels` | Additional labels to be added to pods | {} | |
49-
| `rbac.create` | If true, create & use RBAC resources | `true` | |
50-
| `rbac.pspEnabled` | Specifies whether a PodSecurityPolicy should be created. | `true` | |
51-
| `hostNetwork` | Whether to enable hostNetwork on the DaemonSet | `false` | |
52-
| `resources` | CPU/Memory resource requests/limits | `{}` | |
53-
| `service.type` | Service type | `ClusterIP` | |
54-
| `service.port` | The service port | `9100` | |
55-
| `service.targetPort` | The target port of the container | `9100` | |
56-
| `service.nodePort` | The node port of the service | | |
57-
| `service.annotations` | Kubernetes service annotations | `{prometheus.io/scrape: "true"}` | |
58-
| `serviceAccount.create` | Specifies whether a service account should be created. | `true` | |
59-
| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | | |
60-
| `serviceAccount.imagePullSecrets` | Specify image pull secrets | `[]` | |
61-
| `serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor | `false` |
62-
| `securityContext` | SecurityContext | `{"runAsNonRoot": true, "runAsUser": 65534}` | |
63-
| `affinity` | A group of affinity scheduling rules for pod assignment | `{}` | |
64-
| `nodeSelector` | Node labels for pod assignment | `{}` | |
65-
| `tolerations` | List of node taints to tolerate | `- effect: NoSchedule operator: Exists` | |
66-
| `priorityClassName` | Name of Priority Class to assign pods | `nil` | |
67-
| `endpoints` | list of addresses that have process exporter deployed outside of the cluster | `[]` | |
68-
| `livenessProbe.initialDelaySeconds`| Amount of seconds to wait before the first probe | `20` |
69-
| `livenessProbe.periodSeconds` | Amount of seconds between the probes | `10` |
70-
| `livenessProbe.failureThreshold` | Amount of probe failures before the pod is restared | `3` |
71-
| `livenessProbe.successThreshold` | Amount of consecutive probe successes to mark the pod as healthy | `1` |
72-
| `readinessProbe.initialDelaySeconds`| Amount of seconds to wait before the first probe | `20` |
73-
| `readinessProbe.periodSeconds` | Amount of seconds between the probes | `10` |
74-
| `readinessProbe.failureThreshold` | Amount of probe failures before the pod is restared | `3` |
75-
| `readinessProbe.successThreshold` | Amount of consecutive probe successes to mark the pod as ready | `1` |
40+
| Parameter | Description | Default |
41+
| ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
42+
| `image.repository` | Image repository | `ncabatoff/process-exporter` |
43+
| `image.tag` | Image tag | `0.5.0` |
44+
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
45+
| `groups` | [Entries of `process_names:` in the process-expoter config](https://github.com/ncabatoff/process-exporter/tree/master#using-a-config-file) | `{"groups": [{"comm": ["chronyd"]}, {"comm": ["bash"]}, {"comm": ["rsync"]}, {"comm": ["scp"]}, {"comm": ["ssh"]}]` |
46+
| `extraArgs` | Additional container arguments | `[]` |
47+
| `extraHostVolumeMounts` | Additional host volume mounts | {} |
48+
| `podLabels` | Additional labels to be added to pods | {} |
49+
| `podAnnotations` | Additional annotations to be added to pods | {} |
50+
| `rbac.create` | If true, create & use RBAC resources | `true` |
51+
| `rbac.pspEnabled` | Specifies whether a PodSecurityPolicy should be created. | `true` |
52+
| `hostNetwork` | Whether to enable hostNetwork on the DaemonSet | `false` |
53+
| `resources` | CPU/Memory resource requests/limits | `{}` |
54+
| `service.type` | Service type | `ClusterIP` |
55+
| `service.port` | The service port | `9100` |
56+
| `service.targetPort` | The target port of the container | `9100` |
57+
| `service.nodePort` | The node port of the service | |
58+
| `service.annotations` | Kubernetes service annotations | `{prometheus.io/scrape: "true"}` |
59+
| `serviceAccount.create` | Specifies whether a service account should be created. | `true` |
60+
| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the fullname template | |
61+
| `serviceAccount.imagePullSecrets` | Specify image pull secrets | `[]` |
62+
| `serviceMonitor.enabled` | if `true`, creates a Prometheus Operator ServiceMonitor | `false` |
63+
| `securityContext` | SecurityContext | `{"runAsNonRoot": true, "runAsUser": 65534}` |
64+
| `affinity` | A group of affinity scheduling rules for pod assignment | `{}` |
65+
| `nodeSelector` | Node labels for pod assignment | `{}` |
66+
| `tolerations` | List of node taints to tolerate | `- effect: NoSchedule operator: Exists` |
67+
| `priorityClassName` | Name of Priority Class to assign pods | `nil` |
68+
| `endpoints` | list of addresses that have process exporter deployed outside of the cluster | `[]` |
69+
| `livenessProbe.initialDelaySeconds` | Amount of seconds to wait before the first probe | `20` |
70+
| `livenessProbe.periodSeconds` | Amount of seconds between the probes | `10` |
71+
| `livenessProbe.failureThreshold` | Amount of probe failures before the pod is restared | `3` |
72+
| `livenessProbe.successThreshold` | Amount of consecutive probe successes to mark the pod as healthy | `1` |
73+
| `readinessProbe.initialDelaySeconds`| Amount of seconds to wait before the first probe | `20` |
74+
| `readinessProbe.periodSeconds` | Amount of seconds between the probes | `10` |
75+
| `readinessProbe.failureThreshold` | Amount of probe failures before the pod is restared | `3` |
76+
| `readinessProbe.successThreshold` | Amount of consecutive probe successes to mark the pod as ready | `1` |
7677

7778
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,
7879

charts/prometheus-process-exporter/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v1
22
appVersion: "0.4.0"
33
description: A Helm chart for prometheus process-exporter
44
name: prometheus-process-exporter
5-
version: 0.3.0
5+
version: 0.4.0
66
home: https://github.com/mumoshu/prometheus-process-exporter
77
sources:
88
- https://github.com/ncabatoff/process-exporter

charts/prometheus-process-exporter/templates/daemonset.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ spec:
1717
labels: {{ include "prometheus-process-exporter.labels" . | indent 8 }}
1818
annotations:
1919
checksum/config: {{ include "prometheus-process-exporter.config" . | toYaml | sha256sum }}
20+
{{- range $key, $value := .Values.podAnnotations }}
21+
{{ $key }}: {{ $value | quote }}
22+
{{- end }}
2023
spec:
2124
{{- if and .Values.rbac.create .Values.serviceAccount.create }}
2225
serviceAccountName: {{ template "prometheus-process-exporter.serviceAccountName" . }}

charts/prometheus-process-exporter/values.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Declare variables to be passed into your templates.
44
image:
55
repository: ncabatoff/process-exporter
6-
tag: 0.4.0
6+
tag: 0.5.0
77
pullPolicy: IfNotPresent
88

99
## Specify entries of `process_names:` in the process-expoter config
@@ -32,6 +32,9 @@ service:
3232
annotations:
3333
prometheus.io/scrape: "true"
3434

35+
# Annotations to add to the pod
36+
podAnnotations: {}
37+
3538
resources: {}
3639
# We usually recommend not to specify default resources and to leave this as a conscious
3740
# choice for the user. This also increases chances charts run on environments with little

0 commit comments

Comments
 (0)