Skip to content

Commit

Permalink
Merge pull request #126 from janpastrnak/feature/test-connection-node…
Browse files Browse the repository at this point in the history
…-affinity-tolerations

feat(helm): add nodeSelector, affinity, and tolerations to test-connection …
  • Loading branch information
czerwonk authored Dec 27, 2024
2 parents 1a2094e + 68ac6ee commit 20900dc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ NAME: ping-exporter
| serviceAccount.annotations | object | `{}` | Annotations applied to created service account |
| serviceAccount.name | string | `""` | Overrides the application's service account name which defaults to `"ping-exporter.fullname"` |
| tolerations | list | `[]` | [Tolerations] |
| testConnection.enabled | bool | `true` | Enable the test connection pod for the ping_exporter


## Changes from previous versions
Expand Down
15 changes: 15 additions & 0 deletions dist/charts/ping-exporter/templates/tests/test-connection.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@

{{- if .Values.testConnection.enabled -}}
apiVersion: v1
kind: Pod
metadata:
Expand All @@ -13,3 +15,16 @@ spec:
command: ['wget']
args: ['{{ include "ping_exporter.fullname" . }}:{{ .Values.service.port }}']
restartPolicy: Never
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
3 changes: 3 additions & 0 deletions dist/charts/ping-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ serviceMonitor:
# Create basic Prometheus alerting rules
prometheusRules:
enabled: false

testConnection:
enabled: true

0 comments on commit 20900dc

Please sign in to comment.