update prettier config && format renovate

This commit is contained in:
Joseph Hanson 2024-09-05 16:21:42 -05:00
parent f1085d5f39
commit e6021cba90
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
5 changed files with 118 additions and 167 deletions

4
.prettierrc Normal file
View file

@ -0,0 +1,4 @@
{
"quoteProps": "preserve",
"trailingComma": "none"
}

View file

@ -1,22 +1,22 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"packageRules": [ "packageRules": [
{ {
"description": "Auto merge container digests", "description": "Auto merge container digests",
"matchDatasources": ["docker"], "matchDatasources": ["docker"],
"automerge": true, "automerge": true,
"automergeType": "branch", "automergeType": "branch",
"matchUpdateTypes": ["digest"], "matchUpdateTypes": ["digest"],
"matchPackagePrefixes": ["ghcr.io/onedr0p", "ghcr.io/bjw-s"], "matchPackagePrefixes": ["ghcr.io/onedr0p", "ghcr.io/bjw-s"],
"ignoreTests": true "ignoreTests": true
}, },
{ {
"description": "Auto merge KPS minors and patches", "description": "Auto merge KPS minors and patches",
"matchDatasources": ["helm"], "matchDatasources": ["helm"],
"automerge": true, "automerge": true,
"matchUpdateTypes": ["minor", "patch"], "matchUpdateTypes": ["minor", "patch"],
"matchDepNames": ["kube-prometheus-stack"], "matchDepNames": ["kube-prometheus-stack"],
"ignoreTests": false "ignoreTests": false
} }
] ]
} }

View file

@ -1,37 +1,49 @@
{ {
"$schema": "https://docs.renovatebot.com/renovate-schema.json", "$schema": "https://docs.renovatebot.com/renovate-schema.json",
"customDatasources": { "customDatasources": {
"grafana-dashboards": { "grafana-dashboards": {
"defaultRegistryUrlTemplate": "https://grafana.com/api/dashboards/{{packageName}}", "defaultRegistryUrlTemplate": "https://grafana.com/api/dashboards/{{packageName}}",
"format": "json", "format": "json",
"transformTemplates": [ "transformTemplates": [
"{\"releases\":[{\"version\": $string(revision)}]}" "{\"releases\":[{\"version\": $string(revision)}]}"
] ]
} }
},
"customManagers": [
{
"customType": "regex",
"description": "Process Grafana dashboards",
"fileMatch": ["(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$"],
"matchStrings": [
"depName=\"(?<depName>\\S+)\"\\n.*?gnetId: (?<packageName>\\d+)\\n.*?revision: (?<currentValue>\\d+)"
],
"datasourceTemplate": "custom.grafana-dashboards",
"versioningTemplate": "regex:^(?<major>\\d+)$"
}, },
"customManagers": [ {
{ "customType": "regex",
"customType": "regex", "description": ["Process custom dependencies"],
"description": "Process Grafana dashboards", "fileMatch": ["(^|/)kubernetes/.+\\.ya?ml(?:\\.j2)?$"],
"fileMatch": [ "matchStrings": [
"(^|/)kubernetes/.+\\.ya?ml(\\.j2)?$" // # renovate: datasource=helm depName=cilium repository=https://helm.cilium.io
], // version: 1.15.1
"matchStrings": [ "datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( repository=(?<registryUrl>\\S+))?\\n.+: (&\\S+\\s)?(?<currentValue>\\S+)",
"depName=\"(?<depName>\\S+)\"\\n.*?gnetId: (?<packageName>\\d+)\\n.*?revision: (?<currentValue>\\d+)" // # renovate: datasource=github-releases depName=rancher/system-upgrade-controller
], // https://github.com/rancher/system-upgrade-controller/releases/download/v0.13.2/crd.yaml
"datasourceTemplate": "custom.grafana-dashboards", "datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)\\n.+/(?<currentValue>(v|\\d)[^/]+)"
"versioningTemplate": "regex:^(?<major>\\d+)$" ],
} "datasourceTemplate": "{{#if datasource}}{{{datasource}}}{{else}}github-releases{{/if}}"
], }
"packageRules": [ ],
{ "packageRules": [
"addLabels": ["renovate/grafana-dashboard"], {
"commitMessageExtra": "to revision {{newVersion}}", "addLabels": ["renovate/grafana-dashboard"],
"commitMessageTopic": "dashboard {{depName}}", "commitMessageExtra": "to revision {{newVersion}}",
"matchDatasources": ["grafana-dashboards", "custom.grafana-dashboards"], "commitMessageTopic": "dashboard {{depName}}",
"matchUpdateTypes": ["major"], "matchDatasources": ["grafana-dashboards", "custom.grafana-dashboards"],
"semanticCommitScope": "grafana-dashboards", "matchUpdateTypes": ["major"],
"semanticCommitType": "chore" "semanticCommitScope": "grafana-dashboards",
} "semanticCommitType": "chore"
] }
} ]
}

View file

@ -42,5 +42,9 @@
"files.trimTrailingWhitespace": true, "files.trimTrailingWhitespace": true,
"ansible.python.interpreterPath": "/usr/bin/python3", "ansible.python.interpreterPath": "/usr/bin/python3",
"sops.defaults.ageKeyFile": "age.key", "sops.defaults.ageKeyFile": "age.key",
"ansible.validation.lint.path": "~/projects/valinor/.venv/bin/ansible-lint" "ansible.validation.lint.path": "~/projects/valinor/.venv/bin/ansible-lint",
"prettier.quoteProps": "preserve",
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
} }

View file

@ -8,57 +8,39 @@
], ],
"ignorePaths": [".archive/**"], "ignorePaths": [".archive/**"],
"flux": { "flux": {
"fileMatch": [ "fileMatch": ["kubernetes/.+\\.ya?ml$"]
"kubernetes/.+\\.ya?ml$"
]
}, },
"helm-values": { "helm-values": {
"fileMatch": [ "fileMatch": ["kubernetes/.+\\.ya?ml$"]
"kubernetes/.+\\.ya?ml$"
]
}, },
"kubernetes": { "kubernetes": {
"fileMatch": [ "fileMatch": ["kubernetes/.+\\.ya?ml$"]
"kubernetes/.+\\.ya?ml$"
]
}, },
"regexManagers": [ "regexManagers": [
{ {
"description": [ "description": [
"Process CRD dependencies - Chart and Github Release are the same version" "Process CRD dependencies - Chart and Github Release are the same version"
], ],
"fileMatch": [ "fileMatch": ["kubernetes/.+\\.ya?ml$"],
"kubernetes/.+\\.ya?ml$"
],
"matchStrings": [ "matchStrings": [
"# renovate: registryUrl=(?<registryUrl>\\S+) chart=(?<depName>\\S+)\n.*?(?<currentValue>[^-\\s]*)\n", "# renovate: registryUrl=(?<registryUrl>\\S+) chart=(?<depName>\\S+)\n.*?(?<currentValue>[^-\\s]*)\n"
], ],
"datasourceTemplate": "helm" "datasourceTemplate": "helm"
}, },
{ {
"description": [ "description": ["Generic Docker image Regex manager"],
"Generic Docker image Regex manager" "fileMatch": ["infrastructure/.+\\.ya?ml$", "infrastructure/.+\\.tf$"],
],
"fileMatch": [
"infrastructure/.+\\.ya?ml$",
"infrastructure/.+\\.tf$"
],
"matchStrings": [ "matchStrings": [
"# renovate: docker-image( versioning=(?<versioning>.*=?))?\n .*[:|=] \"?(?<depName>.*?):(?<currentValue>[^\"\n]*=?)\"?", "# renovate: docker-image( versioning=(?<versioning>.*=?))?\n .*[:|=] \"?(?<depName>.*?):(?<currentValue>[^\"\n]*=?)\"?"
], ],
"datasourceTemplate": "docker", "datasourceTemplate": "docker",
"versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}"
}, },
{ {
"description": [ "description": ["Raw GitHub URL Regex manager"],
"Raw GitHub URL Regex manager" "fileMatch": ["infrastructure/.+\\.ya?ml$", "kubernetes/.+\\.ya?ml$"],
],
"fileMatch": [
"infrastructure/.+\\.ya?ml$",
"kubernetes/.+\\.ya?ml$"
],
"matchStrings": [ "matchStrings": [
"https:\\/\\/raw.githubusercontent.com\\/(?<depName>[\\w\\d\\-_]+\\/[\\w\\d\\-_]+)\\/(?<currentValue>[\\w\\d\\.\\-_]+)\\/.*", "https:\\/\\/raw.githubusercontent.com\\/(?<depName>[\\w\\d\\-_]+\\/[\\w\\d\\-_]+)\\/(?<currentValue>[\\w\\d\\.\\-_]+)\\/.*"
], ],
"datasourceTemplate": "github-releases", "datasourceTemplate": "github-releases",
"versioningTemplate": "semver" "versioningTemplate": "semver"
@ -67,87 +49,60 @@
"packageRules": [ "packageRules": [
{ {
"description": "Use custom versioning for Vector", "description": "Use custom versioning for Vector",
"matchDatasources": [ "matchDatasources": ["docker"],
"docker" "matchPackageNames": ["docker.io/timberio/vector"],
],
"matchPackageNames": [
"docker.io/timberio/vector"
],
"versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<compatibility>.*)$" "versioning": "regex:^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)-(?<compatibility>.*)$"
}, },
{ {
"description": "Use custom versioning for Minio", "description": "Use custom versioning for Minio",
"matchDatasources": [ "matchDatasources": ["docker"],
"docker"
],
"versioning": "regex:^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T.*Z(-(?<compatibility>.*))?$", "versioning": "regex:^RELEASE\\.(?<major>\\d+)-(?<minor>\\d+)-(?<patch>\\d+)T.*Z(-(?<compatibility>.*))?$",
"matchPackageNames": [ "matchPackageNames": ["quay.io/minio/minio"]
"quay.io/minio/minio"
]
}, },
{ {
"description": "Flux Group", "description": "Flux Group",
"groupName": "Flux", "groupName": "Flux",
"matchPackagePatterns": [ "matchPackagePatterns": ["^flux", "^ghcr.io/fluxcd/"],
"^flux", "matchDatasources": ["docker", "github-tags"],
"^ghcr.io/fluxcd/"
],
"matchDatasources": [
"docker",
"github-tags"
],
"versioning": "semver", "versioning": "semver",
"group": { "group": {
"commitMessageTopic": "{{{groupName}}} group", "commitMessageTopic": "{{{groupName}}} group"
}, },
"separateMinorPatch": true, "separateMinorPatch": true
}, },
{ {
"description": "Mastodon images", "description": "Mastodon images",
"groupName": "Mastodon", "groupName": "Mastodon",
"matchPackagePatterns": [ "matchPackagePatterns": ["mastodon", "^ghcr.io/mastodon/"],
"mastodon", "matchDatasources": ["docker", "github-tags"],
"^ghcr.io/mastodon/"
],
"matchDatasources": [
"docker",
"github-tags"
],
"versioning": "semver", "versioning": "semver",
"group": { "group": {
"commitMessageTopic": "{{{groupName}}} group", "commitMessageTopic": "{{{groupName}}} group"
}, },
"separateMinorPatch": true, "separateMinorPatch": true
}, },
{ {
"description": "1Password Connect images", "description": "1Password Connect images",
"groupName": "1password-connect", "groupName": "1password-connect",
"matchPackageNames": [ "matchPackageNames": [
"docker.io/1password/connect-sync", "docker.io/1password/connect-sync",
"docker.io/1password/connect-api", "docker.io/1password/connect-api"
],
"matchDatasources": [
"docker"
], ],
"matchDatasources": ["docker"],
"group": { "group": {
"commitMessageTopic": "{{{groupName}}} group" "commitMessageTopic": "{{{groupName}}} group"
}, },
"separateMinorPatch": true, "separateMinorPatch": true
}, },
{ {
"description": "Rook-Ceph image and chart", "description": "Rook-Ceph image and chart",
"groupName": "Rook Ceph", "groupName": "Rook Ceph",
"matchPackagePatterns": [ "matchPackagePatterns": ["rook.ceph"],
"rook.ceph" "matchDatasources": ["docker", "helm"],
],
"matchDatasources": [
"docker",
"helm"
],
"group": { "group": {
"commitMessageTopic": "{{{groupName}}} group" "commitMessageTopic": "{{{groupName}}} group"
}, },
"separateMinorPatch": true, "separateMinorPatch": true
}, },
{ {
"description": "Cilium image and chart", "description": "Cilium image and chart",
@ -155,16 +110,13 @@
"matchPackageNames": [ "matchPackageNames": [
"quay.io/cilium/cilium", "quay.io/cilium/cilium",
"quay.io/cilium/operator-generic", "quay.io/cilium/operator-generic",
"cilium", "cilium"
],
"matchDatasources": [
"helm",
"docker"
], ],
"matchDatasources": ["helm", "docker"],
"group": { "group": {
"commitMessageTopic": "{{{groupName}}} group" "commitMessageTopic": "{{{groupName}}} group"
}, },
"separateMinorPatch": true, "separateMinorPatch": true
}, },
{ {
"description": "External Snapshotter charts", "description": "External Snapshotter charts",
@ -173,9 +125,7 @@
"snapshot-controller", "snapshot-controller",
"snapshot-validation-webhook" "snapshot-validation-webhook"
], ],
"matchDatasources": [ "matchDatasources": ["helm"],
"helm"
],
"group": { "group": {
"commitMessageTopic": "{{{groupName}}} group" "commitMessageTopic": "{{{groupName}}} group"
}, },
@ -184,42 +134,23 @@
{ {
"description": "Thanos image and chart - versions do not match", "description": "Thanos image and chart - versions do not match",
"groupName": "Thanos", "groupName": "Thanos",
"matchPackagePatterns": [ "matchPackagePatterns": ["quay.io/thanos/thanos", "thanos"],
"quay.io/thanos/thanos", "matchDatasources": ["docker", "github-releases", "helm"],
"thanos" "matchUpdateTypes": ["minor", "patch"],
],
"matchDatasources": [
"docker",
"github-releases",
"helm"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"group": { "group": {
"commitMessageTopic": "{{{groupName}}} group" "commitMessageTopic": "{{{groupName}}} group"
}, }
}, },
{ {
"description": "Vector image and chart - versions do not match", "description": "Vector image and chart - versions do not match",
"groupName": "Vector", "groupName": "Vector",
"matchPackagePatterns": [ "matchPackagePatterns": ["vector"],
"vector" "matchDatasources": ["docker", "github-releases", "helm"],
], "matchUpdateTypes": ["minor", "patch"],
"matchDatasources": [
"docker",
"github-releases",
"helm"
],
"matchUpdateTypes": [
"minor",
"patch"
],
"group": { "group": {
"commitMessageTopic": "{{{groupName}}} group" "commitMessageTopic": "{{{groupName}}} group"
}, }
}, }
// Version strategies // Version strategies
] ]
} }