Moving grafana resources to external file.

This commit is contained in:
Joseph Hanson 2023-12-12 14:36:20 -06:00
parent ece569535b
commit 849d21dd19
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
3 changed files with 22 additions and 10 deletions

View file

@ -1,5 +1,14 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"customDatasources": {
"grafana-dashboards": {
"defaultRegistryUrlTemplate": "https://grafana.com/api/dashboards/{{packageName}}",
"format": "json",
"transformTemplates": [
"{\"releases\":[{\"version\": $string(revision)}]}"
]
}
},
"customManagers": [ "customManagers": [
{ {
"customType": "regex", "customType": "regex",
@ -8,10 +17,21 @@
"(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$" "(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$"
], ],
"matchStrings": [ "matchStrings": [
"depName=\"(?<depName>.*)\"\\n\\s+gnetId:\\s+(?<packageName>.*?)\\n\\s+revision:\\s+(?<currentValue>.*)" "depName=\"(?<depName>\\S+)\"\\n.*?gnetId: (?<packageName>\\d+)\\n.*?revision: (?<currentValue>\\d+)"
], ],
"datasourceTemplate": "custom.grafana-dashboards", "datasourceTemplate": "custom.grafana-dashboards",
"versioningTemplate": "regex:^(?<major>\\d+)$" "versioningTemplate": "regex:^(?<major>\\d+)$"
} }
],
"packageRules": [
{
"addLabels": ["renovate/grafana-dashboard"],
"commitMessageExtra": "to revision {{newVersion}}",
"commitMessageTopic": "dashboard {{depName}}",
"matchDatasources": ["grafana-dashboards", "custom.grafana-dashboards"],
"matchUpdateTypes": ["major"],
"semanticCommitScope": "grafana-dashboards",
"semanticCommitType": "chore"
}
] ]
} }

View file

@ -18,6 +18,7 @@ sops --decrypt kubernetes/bootstrap/flux/git-deploy-key.sops.yaml | kubectl appl
sops --decrypt kubernetes/bootstrap/hcloud.sops.yaml | kubectl apply -f - sops --decrypt kubernetes/bootstrap/hcloud.sops.yaml | kubectl apply -f -
sops --decrypt kubernetes/flux/vars/cluster-secrets.sops.yaml | kubectl apply -f - sops --decrypt kubernetes/flux/vars/cluster-secrets.sops.yaml | kubectl apply -f -
kubectl apply -f kubernetes/flux/vars/cluster-settings.yaml kubectl apply -f kubernetes/flux/vars/cluster-settings.yaml
kubectl apply -k kubernetes/apps/monitoring/kube-prometheus-stack/crds/
``` ```
### Kick off Flux applying this repository ### Kick off Flux applying this repository

View file

@ -22,15 +22,6 @@
"kubernetes/.+\\.ya?ml$" "kubernetes/.+\\.ya?ml$"
] ]
}, },
"customDatasources": {
"grafana-dashboards": {
"defaultRegistryUrlTemplate": "https://grafana.com/api/dashboards/{{packageName}}",
"format": "json",
"transformTemplates": [
"{\"releases\":[{\"version\": $string(revision)}]}"
]
}
},
"regexManagers": [ "regexManagers": [
{ {
"description": [ "description": [