Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion assets/prometheus-k8s/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ spec:
externalURL: https://prometheus-k8s.openshift-monitoring.svc:9091
image: ""
listenLocal: true
maximumStartupDurationSeconds: 3600
nodeSelector:
kubernetes.io/os: linux
podMetadata:
Expand Down
4 changes: 0 additions & 4 deletions jsonnet/components/prometheus.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,6 @@ function(params)
value: '15ms',
},
],
// Increase the startup probe timeout to 1h from 15m to avoid restart
// failures when the WAL replay takes a long time.
// See https://issues.redhat.com/browse/OCPBUGS-4168 for details.
maximumStartupDurationSeconds: 3600,
// Explicitly set the shards value to 1 to support VPA use cases.
shards: 1,
containers: [
Expand Down
9 changes: 6 additions & 3 deletions pkg/manifests/manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -1519,6 +1519,12 @@ func (f *Factory) PrometheusK8s(grpcTLS *v1.Secret, telemetrySecret *v1.Secret)
for i, container := range p.Spec.Containers {
switch container.Name {
case "prometheus":
// Increase the startup probe timeout to 1h from 15m to avoid restart failures when the WAL replay
// takes a long time. See https://issues.redhat.com/browse/OCPBUGS-4168 for details.
p.Spec.Containers[i].StartupProbe = &v1.Probe{
PeriodSeconds: 15,
FailureThreshold: 240,
}
// Inject the proxy env vars into the Prometheus container
// Mainly intended for all configs that support proxyConfig.proxyFromEnvironment
f.injectProxyVariables(&p.Spec.Containers[i])
Expand Down Expand Up @@ -1856,9 +1862,6 @@ func (f *Factory) PrometheusUserWorkload(grpcTLS *v1.Secret) (*monv1.Prometheus,
case "prometheus":
// Increase the startup probe timeout to 1h from 15m to avoid restart failures when the WAL replay
// takes a long time. See https://issues.redhat.com/browse/OCPBUGS-4168 for details.
// TODO (JoaoBraveCoding): Once prometheus-operator adds CRD support to configure startupProbe directly
// we should use that instead of using strategic merge patch
// See https://github.com/prometheus-operator/prometheus-operator/issues/4730
p.Spec.Containers[i].StartupProbe = &v1.Probe{
PeriodSeconds: 15,
FailureThreshold: 240,
Expand Down