1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-21 11:48:53 +00:00

pkg/apis/monitoring/v1,pkg/prometheus: add support for VolumeMounts in Prometheus CRD

This commit is contained in:
paulfantom 2019-11-19 16:42:04 +01:00
parent 7903f71f48
commit 993c460d33
No known key found for this signature in database
GPG key ID: 12AE0185401674E7
2 changed files with 5 additions and 0 deletions
pkg
apis/monitoring/v1
prometheus

View file

@ -189,6 +189,10 @@ type PrometheusSpec struct {
// Volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will
// be appended to other volumes that are generated as a result of StorageSpec objects.
Volumes []v1.Volume `json:"volumes,omitempty"`
// VolumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition.
// VolumeMounts specified will be appended to other VolumeMounts in the prometheus container,
// that are generated as a result of StorageSpec objects.
VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
// A selector to select which PrometheusRules to mount for loading alerting
// rules from. Until (excluding) Prometheus Operator v0.24.0 Prometheus
// Operator will migrate any legacy rule ConfigMaps to PrometheusRule custom

View file

@ -563,6 +563,7 @@ func makeStatefulSetSpec(p monitoringv1.Prometheus, c *Config, ruleConfigMapName
},
}
promVolumeMounts = append(promVolumeMounts, p.Spec.VolumeMounts...)
for _, name := range ruleConfigMapNames {
promVolumeMounts = append(promVolumeMounts, v1.VolumeMount{
Name: name,