Skip to content

Commit

Permalink
additionalArgs: list items must have named fields
Browse files Browse the repository at this point in the history
And this is a field in `.spec`, _not_ `.spec.containers[]`.

Signed-off-by: Jan Fajerski <jfajersk@redhat.com>
  • Loading branch information
jan--f committed Dec 8, 2023
1 parent 29347c8 commit 4a07505
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
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)
},
{
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

0 comments on commit 4a07505

Please sign in to comment.