[stable/prometheus-blackbox-exporter] Able to mount extra secrets int… (#19119)

* [stable/prometheus-blackbox-exporter] Able to mount extra secrets into the Pod, for example certificates.
Signed-off-by: Hung Do <hdo@infodation.nl>

* [stable/prometheus-blackbox-exporter] Able to mount extra configmaps

Signed-off-by: Hung Do <hdo@infodation.nl>

* [stable/prometheus-blackbox-exporter] Bump up minor version and configmap and secret variables are on par with each other

Signed-off-by: Hung Do <hdo@infodation.nl>

* [stable/prometheus-blackbox-exporter] Improved configmap/secrets examples in the values.yaml

Signed-off-by: Hung Do <hdo@infodation.nl>
This commit is contained in:
Terentio
2019-12-16 05:29:36 -08:00
committed by Kubernetes Prow Robot
parent 515d67c999
commit 3c674daaf7
4 changed files with 45 additions and 2 deletions
@@ -1,7 +1,7 @@
apiVersion: v1
description: Prometheus Blackbox Exporter
name: prometheus-blackbox-exporter
version: 1.5.1
version: 1.6.0
appVersion: 0.15.1
home: https://github.com/prometheus/blackbox_exporter
sources:
@@ -46,6 +46,8 @@ The following table lists the configurable parameters of the Blackbox-Exporter c
| `config` | Prometheus blackbox configuration | {} |
| `secretConfig` | Whether to treat blackbox configuration as secret | `false` |
| `extraArgs` | Optional flags for blackbox | `[]` |
| `extraConfigmapMounts` | Additional configmap mounts | `[]` |
| `extraSecretMounts` | Additional secret mounts | `[]` |
| `image.repository` | container image repository | `prom/blackbox-exporter` |
| `image.tag` | container image tag | `v0.15.1` |
| `image.pullPolicy` | container image pull policy | `IfNotPresent` |
@@ -85,6 +85,18 @@ spec:
volumeMounts:
- mountPath: /config
name: config
{{- range .Values.extraConfigmapMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath | default "" }}
readOnly: {{ .readOnly }}
{{- end }}
{{- range .Values.extraSecretMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath }}
readOnly: {{ .readOnly }}
{{- end }}
volumes:
- name: config
{{- if .Values.secretConfig }}
@@ -94,3 +106,15 @@ spec:
configMap:
name: {{ template "prometheus-blackbox-exporter.fullname" . }}
{{- end }}
{{- range .Values.extraConfigmapMounts }}
- name: {{ .name }}
configMap:
name: {{ .configMap }}
defaultMode: {{ .defaultMode }}
{{- end }}
{{- range .Values.extraSecretMounts }}
- name: {{ .name }}
secret:
secretName: {{ .secretName }}
defaultMode: {{ .defaultMode }}
{{- end }}
@@ -12,7 +12,7 @@ strategy:
image:
repository: prom/blackbox-exporter
tag: v0.15.1
tag: v0.16.0
pullPolicy: IfNotPresent
## Optionally specify an array of imagePullSecrets.
@@ -42,6 +42,23 @@ config:
no_follow_redirects: false
preferred_ip_protocol: "ip4"
extraConfigmapMounts: []
# - name: certs-configmap
# mountPath: /etc/secrets/ssl/
# subPath: certificates.crt # (optional)
# configMap: certs-configmap
# readOnly: true
# defaultMode: 420
## Additional secret mounts
# Defines additional mounts with secrets. Secrets must be manually created in the namespace.
extraSecretMounts: []
# - name: secret-files
# mountPath: /etc/secrets
# secretName: blackbox-secret-files
# readOnly: true
# defaultMode: 420
resources: {}
# limits:
# memory: 300Mi