Skip to content

Commit

Permalink
Make kube_state_metrics_version renovatable
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan committed Jul 26, 2024
1 parent 940d86f commit a4c8f47
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 2 additions & 0 deletions class/defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ parameters:
jsonnetfile_parameters:
cmo_version: ${openshift4_monitoring:manifests_version}
etcd_version: ${openshift4_monitoring:manifests_version}
# renovate repo=https://github.com/kubernetes/kube-state-metrics
kube_state_metrics_version: v2.13.0
defaultConfig:
nodeSelector:
node-role.kubernetes.io/infra: ''
Expand Down
17 changes: 9 additions & 8 deletions jsonnetfile.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
version: std.extVar('cmo_version'),
name: 'cluster-monitoring-operator',
},
{
source: {
git: {
remote: 'https://github.com/kubernetes/kube-state-metrics',
subdir: 'jsonnet',
if std.extVar('kube_state_metrics_version') != null && std.extVar('kube_state_metrics_version') != '' then
{
source: {
git: {
remote: 'https://github.com/kubernetes/kube-state-metrics',
subdir: 'jsonnet',
},
},
version: std.extVar('kube_state_metrics_version'),
name: 'kube-state-metrics',
},
version: 'v2.13.0',
name: 'kube-state-metrics',
},
if std.extVar('etcd_version') != '' then
{
source: {
Expand Down
10 changes: 10 additions & 0 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,15 @@
"^quay.io/prometheus/node-exporter$"
]
}
],
"customManagers": [
{
"customType": "regex",
"fileMatch": "^class/defaults.yml$",
"matchStrings": [
"# renovate repo=(?<depName>[^\\s}]+).*\n.+version: (?<currentValue>[^\\s}]+)"
],
"datasourceTemplate": "git-tags"
}
]
}

0 comments on commit a4c8f47

Please sign in to comment.