diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 8062b47..080255d 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -10,7 +10,8 @@ on: - reopened - synchronize paths: - - ".github/workflows/on-pr.yaml" + - 'renovate.json' + - ".github/workflows/**" - ".gitops/**" - "apis/**" - "examples/**" diff --git a/README.md b/README.md index c2191b9..3a1f3fd 100644 --- a/README.md +++ b/README.md @@ -111,7 +111,7 @@ spec: | `ha.topologySpreadByZone` | bool | `true` | Add `topologySpreadConstraint` by `topology.kubernetes.io/zone` | | **Controller** | | | | | `controller.name` | string | `snapshot-controller` | Helm release name | -| `controller.chartVersion` | string | `5.0.3` | piraeus-charts chart version (tracks upstream `v8.5.0`) | +| `controller.chartVersion` | string | stack default | piraeus-charts chart version | | `controller.values` | object | — | Helm values merged with stack defaults | | `controller.overrideAllValues` | object | — | Helm values that replace all defaults | @@ -127,8 +127,8 @@ That's it. Smallest stack in the repo. | Kind | Package | Version | |---|---|---| -| Function | `crossplane-contrib/function-auto-ready` | `>=v0.6.2` | -| Provider | `crossplane-contrib/provider-helm` | `>=v1` | +| Function | `crossplane-contrib/function-auto-ready` | `^v0` | +| Provider | `crossplane-contrib/provider-helm` | `^v1` | ## Development diff --git a/apis/volumesnapshotstacks/definition.yaml b/apis/volumesnapshotstacks/definition.yaml index e15544a..3873829 100644 --- a/apis/volumesnapshotstacks/definition.yaml +++ b/apis/volumesnapshotstacks/definition.yaml @@ -92,7 +92,7 @@ spec: description: Helm release name. Defaults to snapshot-controller. type: string chartVersion: - description: piraeus-charts/snapshot-controller chart version. Defaults to 5.0.3 (tracks upstream v8.5.0). + description: piraeus-charts/snapshot-controller chart version. When omitted, the stack uses its managed default. type: string values: description: Helm values merged with the stack's chart defaults. diff --git a/functions/render/000-state-init.yaml.gotmpl b/functions/render/000-state-init.yaml.gotmpl index 366e284..666914b 100644 --- a/functions/render/000-state-init.yaml.gotmpl +++ b/functions/render/000-state-init.yaml.gotmpl @@ -53,9 +53,11 @@ # Controller # ============================================================================== {{- $controller := $spec.controller | default dict }} +# renovate: datasource=helm depName=snapshot-controller registryUrl=https://piraeus.io/helm-charts +{{- $controllerChartVersion := $controller.chartVersion | default "5.0.3" }} {{- $controllerCfg := dict "name" ($controller.name | default "snapshot-controller") - "chartVersion" ($controller.chartVersion | default "5.0.3") + "chartVersion" $controllerChartVersion "values" ($controller.values | default dict) "overrideAllValues" ($controller.overrideAllValues | default dict) }} diff --git a/renovate.json b/renovate.json index f32df84..2dac6e0 100644 --- a/renovate.json +++ b/renovate.json @@ -12,10 +12,20 @@ }, "packageRules": [ { - "description": "Automerge minor and patch updates that pass all checks", - "matchUpdateTypes": ["minor", "patch"], + "description": "Automerge minor and patch updates after all checks pass", + "matchUpdateTypes": [ + "minor", + "patch" + ], "automerge": true }, + { + "description": "Require manual review for major updates", + "matchUpdateTypes": [ + "major" + ], + "automerge": false + }, { "description": "Disable automatic updates for all hops-ops Docker images", "matchDatasources": [ @@ -26,6 +36,14 @@ "/^hops-ops//" ] }, + { + "description": "Group AWS provider-family packages", + "matchPackageNames": [ + "/provider-family-aws/", + "/provider-aws-.*/" + ], + "groupName": "aws-providers" + }, { "description": "Use feat(deps): commit prefix for hops-ops Crossplane packages (github-releases datasource)", "matchManagers": [ @@ -48,5 +66,70 @@ "semanticCommitType": "feat", "semanticCommitScope": "deps" } + ], + "ignorePaths": [ + "**/node_modules/**", + "**/bower_components/**", + "**/vendor/**", + "**/__tests__/**", + "**/test/**", + "**/__fixtures__/**", + "**/fixtures/**" + ], + "automergeType": "pr", + "platformAutomerge": false, + "ignoreTests": false, + "customManagers": [ + { + "customType": "regex", + "description": "hops-ops Crossplane configurations (tracked via GitHub Releases)", + "matchStringsStrategy": "recursive", + "managerFilePatterns": [ + "apis/**/configuration.yaml", + "upbound.yaml" + ], + "matchStrings": [ + "\\s*(configuration|function|package|provider):\\s*ghcr\\.io/hops-ops/(?.*?)\\s*version:\\s*(\"|')\\^v?[0-9]+(\"|')\\s*", + "(?\\^v?[0-9]+)" + ], + "datasourceTemplate": "github-releases", + "versioningTemplate": "npm", + "packageNameTemplate": "hops-ops/{{depName}}", + "autoReplaceStringTemplate": "^v{{{newMajor}}}" + }, + { + "customType": "regex", + "description": "Crossplane packages from xpkg registries (tracked via Docker tags)", + "matchStringsStrategy": "recursive", + "managerFilePatterns": [ + "apis/**/configuration.yaml", + "upbound.yaml" + ], + "matchStrings": [ + "\\s*(configuration|function|package|provider):\\s*(?xpkg\\.[^/]+)\\/(?[^/]+)\\/(?[^/\\s]+)\\s*version:\\s*(\"|')\\^v?[0-9]+(\"|')\\s*", + "(?\\^v?[0-9]+)" + ], + "datasourceTemplate": "docker", + "versioningTemplate": "npm", + "registryUrlTemplate": "https://{{registryUrl}}", + "depNameTemplate": "{{orgName}}/{{repoName}}", + "packageNameTemplate": "{{orgName}}/{{repoName}}", + "autoReplaceStringTemplate": "^v{{{newMajor}}}" + }, + { + "customType": "regex", + "description": "Annotated runtime dependencies in schemas, templates, examples, and tests", + "managerFilePatterns": [ + "apis/**/*.yaml", + "examples/**/*.yaml", + "functions/**/*.yaml.gotmpl", + "tests/**/*.k" + ], + "matchStrings": [ + "# renovate: datasource=(?\\S+) depName=(?\\S+)(?: registryUrl=(?\\S+))?\\s+[^\\n]*?(?:default\\s+|:=\\s*|[\"']?(?:version|chartVersion|tag|default)[\"']?\\s*(?:[=:]\\s*|\\s+))[\"']?(?v?[0-9][^\\s\"'}]*)", + "# renovate: datasource=(?\\S+) depName=(?\\S+)(?: registryUrl=(?\\S+))?\\s+[^\\n]*?(?:default\\s*:\\s*|[\"']?image[\"']?\\s*[=:]\\s*)[\"']?[A-Za-z0-9._/-]+:(?v?[A-Za-z0-9][^\\s\"'}]*)", + "# renovate: datasource=(?\\S+) depName=(?\\S+)(?: registryUrl=(?\\S+))?\\s+[^\\n]*?package\\s*=\\s*\"xpkg\\.[^/]+/[^\"]+:(?[^\"]+)\"" + ] + } ] } diff --git a/tests/test-render/main.k b/tests/test-render/main.k index 7a19410..fe79941 100644 --- a/tests/test-render/main.k +++ b/tests/test-render/main.k @@ -33,6 +33,7 @@ _items = [ chart = { name = "snapshot-controller" repository = "https://piraeus.io/helm-charts" + # renovate: datasource=helm depName=snapshot-controller registryUrl=https://piraeus.io/helm-charts version = "5.0.3" } namespace = "kube-system" diff --git a/upbound.yaml b/upbound.yaml index 2461271..bb69d86 100644 --- a/upbound.yaml +++ b/upbound.yaml @@ -7,11 +7,11 @@ spec: - apiVersion: pkg.crossplane.io/v1 kind: Function package: xpkg.crossplane.io/crossplane-contrib/function-auto-ready - version: '>=v0.6.2' + version: '^v0' - apiVersion: pkg.crossplane.io/v1 kind: Provider package: xpkg.crossplane.io/crossplane-contrib/provider-helm - version: '>=v1' + version: '^v1' description: Installs the Kubernetes CSI snapshot-controller (cluster-wide orchestrator for VolumeSnapshot resources) via the piraeus-charts chart. Required prerequisite for any stack that composes a VolumeSnapshotClass — EKS Auto Mode ships the snapshot