Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCPBUGS-24630: additionalArgs: list items must have named fields #2189

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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions assets/prometheus-k8s/prometheus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ spec:
key: config.yaml
name: alert-relabel-configs
optional: true
additionalArgs:
- name: scrape.timestamp-tolerance
value: 15ms
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down Expand Up @@ -153,9 +156,7 @@ spec:
volumeMounts:
- mountPath: /etc/tls/grpc
name: secret-grpc-tls
- additionalArgs:
- --scrape.timestamp-tolerance=15ms
name: prometheus
- name: prometheus
enableFeatures: []
externalLabels: {}
externalURL: https://prometheus-k8s.openshift-monitoring.svc:9091
Expand Down
21 changes: 12 additions & 9 deletions jsonnet/components/prometheus.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,18 @@ function(params)
listenLocal: true,
priorityClassName: 'system-cluster-critical',
additionalAlertRelabelConfigs: cfg.additionalRelabelConfigs,
additionalArgs: [
// This aligns any scrape timestamps <= 15ms to the a multiple of
// the scrape interval. This optmizes tsdb compression.
// 15ms was chosen for being a conservative value given our default
// scrape interval of 30s. Even for half the default value we onlt
// move scrape interval timestamps by <= 1% of their absolute
// length.
{
name: 'scrape.timestamp-tolerance',
value: '15ms',
},
],
containers: [
{
name: 'prometheus-proxy',
Expand Down Expand Up @@ -542,15 +554,6 @@ function(params)
},
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the object?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm this was added in 42c8622. I assumed that served a purpose...?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right this is needed 👍

name: 'prometheus',
additionalArgs: [
// This aligns any scrape timestamps <= 15ms to the a multiple of
// the scrape interval. This optmizes tsdb compression.
// 15ms was chosen for being a conservative value given our default
// scrape interval of 30s. Even for half the default value we onlt
// move scrape interval timestamps by <= 1% of their absolute
// length.
'--scrape.timestamp-tolerance=15ms',
],
},
],
},
Expand Down