mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 03:38:43 +00:00
prometheus: use single config reloader
Previously the configmap-reload container only supported watching single volume directories.
This commit is contained in:
parent
4466de7fef
commit
c483e833b4
1 changed files with 6 additions and 14 deletions
|
@ -235,6 +235,7 @@ func makeStatefulSetSpec(p v1alpha1.Prometheus) v1beta1.StatefulSetSpec {
|
|||
Args: []string{
|
||||
fmt.Sprintf("-webhook-url=%s", localReloadURL),
|
||||
"-volume-dir=/etc/prometheus/config",
|
||||
"-volume-dir=/etc/prometheus/rules/",
|
||||
},
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
{
|
||||
|
@ -242,6 +243,11 @@ func makeStatefulSetSpec(p v1alpha1.Prometheus) v1beta1.StatefulSetSpec {
|
|||
ReadOnly: true,
|
||||
MountPath: "/etc/prometheus/config",
|
||||
},
|
||||
{
|
||||
Name: "rules",
|
||||
ReadOnly: true,
|
||||
MountPath: "/etc/prometheus/rules",
|
||||
},
|
||||
},
|
||||
Resources: v1.ResourceRequirements{
|
||||
Limits: v1.ResourceList{
|
||||
|
@ -249,20 +255,6 @@ func makeStatefulSetSpec(p v1alpha1.Prometheus) v1beta1.StatefulSetSpec {
|
|||
v1.ResourceMemory: resource.MustParse("10Mi"),
|
||||
},
|
||||
},
|
||||
}, {
|
||||
Name: "rules-reloader",
|
||||
Image: "jimmidyson/configmap-reload",
|
||||
Args: []string{
|
||||
fmt.Sprintf("-webhook-url=%s", localReloadURL),
|
||||
"-volume-dir=/etc/prometheus/rules/",
|
||||
},
|
||||
VolumeMounts: []v1.VolumeMount{
|
||||
{
|
||||
Name: "rules",
|
||||
ReadOnly: true,
|
||||
MountPath: "/etc/prometheus/rules",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
TerminationGracePeriodSeconds: &terminationGracePeriod,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue