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:
parent
7903f71f48
commit
993c460d33
2 changed files with 5 additions and 0 deletions
pkg
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue