Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Commit

Permalink
refactor: migrate to single updatefile for Grafana, Kube State Metrics,
Browse files Browse the repository at this point in the history
Agent and Operator images
  • Loading branch information
argoyle committed Aug 6, 2024
1 parent f272aad commit d829998
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 136 deletions.
77 changes: 0 additions & 77 deletions updatecli/updatecli.d/agent.yaml

This file was deleted.

60 changes: 57 additions & 3 deletions updatecli/updatecli.d/grafana.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,81 @@
sources:
lastRelease:
lastGrafanaHelmRelease:
kind: helmchart
spec:
url: 'https://grafana.github.io/helm-charts'
name: 'grafana-agent-operator'
lastKSMHelmRelease:
kind: helmchart
spec:
url: 'https://prometheus-community.github.io/helm-charts'
name: 'kube-state-metrics'
lastAgentRelease:
kind: githubrelease
spec:
owner: 'grafana'
repository: 'agent'
token: '{{ requiredEnv "UPDATECLI_GITHUB_TOKEN" }}'
versionfilter:
kind: semver

targets:
chart:
grafana_chart:
name: bump chart version
kind: yaml
scmid: github
sourceid: lastGrafanaHelmRelease
spec:
file: 'grafana/kustomization.yaml'
key: '$.helmCharts[0].version'
transformers:
- addprefix: "'"
- addsuffix: "'"
ksm_chart:
name: bump chart version
kind: yaml
scmid: github
sourceid: lastKSMHelmRelease
spec:
file: 'ksm/kustomization.yaml'
key: '$.helmCharts[0].version'
transformers:
- addprefix: "'"
- addsuffix: "'"
agent_image:
name: Bump Agent image version
kind: hcl
scmid: github
spec:
file: 'locals.tf'
path: 'locals.agent_version'
transformers:
- trimprefix: "v"
operator_image:
name: Bump Operator image version
kind: yaml
scmid: github
spec:
file: 'grafana/operator-values.yaml'
key: '$.image.tag'
module_version:
name: Bump Operator module version
kind: hcl
scmid: github
spec:
file: 'locals.tf'
path: 'locals.version'
transformers:
- trimprefix: "v"
kubectl:
name: run kubectl when chart changed
kind: shell
scmid: github
dependson:
- chart
- grafana_chart
- ksm_chart
- agent_image
- operator_image
- module_version
dependsonchange: true
disablesourceinput: true
spec:
Expand Down
56 changes: 0 additions & 56 deletions updatecli/updatecli.d/ksm.yaml

This file was deleted.

0 comments on commit d829998

Please sign in to comment.