diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 266c872..e16cbc9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,22 +6,56 @@ on: push: branches: [main] +env: + # renovate: datasource=github-releases depName=helm/helm + HELM_VERSION: v4.3.0 + # renovate: datasource=github-releases depName=helm-unittest/helm-unittest + HELM_UNITTEST_VERSION: v1.2.1 + # renovate: datasource=github-releases depName=yannh/kubeconform + KUBECONFORM_VERSION: v0.8.0 + jobs: lint-and-test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Helm - uses: azure/setup-helm@v4 + uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + with: + version: ${{ env.HELM_VERSION }} - name: Install helm-unittest plugin - # TODO: Remove --verify=false once helm-unittest publishes signed releases - # Tracking: https://github.com/helm-unittest/helm-unittest/issues/362 - run: helm plugin install --verify=false https://github.com/helm-unittest/helm-unittest + # Helm 4 can only verify tarball installs, and only against the maintainer's GPG key. + run: helm plugin install --verify=false https://github.com/helm-unittest/helm-unittest --version "${HELM_UNITTEST_VERSION}" - name: Lint run: helm lint . - name: Run unit tests run: helm unittest . + + validate-manifests: + runs-on: ubuntu-latest + strategy: + matrix: + # Oldest supported (README prerequisite) and newest available schemas. + kubernetes-version: ["1.26.15", "1.37.1"] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Set up Helm + uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + with: + version: ${{ env.HELM_VERSION }} + + - name: Set up just + uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4 + + - name: Install kubeconform + run: | + curl -sSfL "https://github.com/yannh/kubeconform/releases/download/${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz" \ + | sudo tar -xz -C /usr/local/bin kubeconform + + - name: Validate rendered manifests + run: just test manifests ${{ matrix.kubernetes-version }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 50344db..e798a5d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -9,19 +9,35 @@ permissions: packages: write contents: read +env: + # renovate: datasource=github-releases depName=helm/helm + HELM_VERSION: v4.3.0 + # renovate: datasource=github-releases depName=helm-unittest/helm-unittest + HELM_UNITTEST_VERSION: v1.2.1 + CHART_REPO: oci://ghcr.io/temikus/helm-charts + jobs: validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Check tag matches chart version + run: | + CHART_VERSION=$(awk '/^version:/ {print $2}' Chart.yaml) + if [ "${GITHUB_REF_NAME}" != "v${CHART_VERSION}" ]; then + echo "::error::Tag ${GITHUB_REF_NAME} does not match Chart.yaml version ${CHART_VERSION}" + exit 1 + fi - name: Set up Helm - uses: azure/setup-helm@v4 + uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + with: + version: ${{ env.HELM_VERSION }} - name: Install helm-unittest plugin - # TODO: Remove --verify=false once helm-unittest publishes signed releases - # Tracking: https://github.com/helm-unittest/helm-unittest/issues/362 - run: helm plugin install --verify=false https://github.com/helm-unittest/helm-unittest + # Helm 4 can only verify tarball installs, and only against the maintainer's GPG key. + run: helm plugin install --verify=false https://github.com/helm-unittest/helm-unittest --version "${HELM_UNITTEST_VERSION}" - name: Lint run: helm lint . @@ -33,16 +49,26 @@ jobs: needs: validate runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Helm - uses: azure/setup-helm@v4 + uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + with: + version: ${{ env.HELM_VERSION }} - name: Login to GHCR run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin + - name: Refuse to overwrite a published version + # GHCR accepts a push to an existing tag and replaces the artifact. + run: | + if helm show chart "${CHART_REPO}/workload" --version "${GITHUB_REF_NAME#v}" >/dev/null 2>&1; then + echo "::error::workload ${GITHUB_REF_NAME#v} is already published" + exit 1 + fi + - name: Package chart run: helm package . - name: Push chart - run: helm push workload-*.tgz oci://ghcr.io/temikus/helm-charts + run: helm push workload-*.tgz "${CHART_REPO}" diff --git a/.helmignore b/.helmignore index b9dcdb7..ddd2b1d 100644 --- a/.helmignore +++ b/.helmignore @@ -33,3 +33,6 @@ CONTRIBUTING.md CHANGELOG.md .github/ docs/ +ci/ +.mise.toml +renovate.json diff --git a/.mise.toml b/.mise.toml new file mode 100644 index 0000000..21abe16 --- /dev/null +++ b/.mise.toml @@ -0,0 +1,3 @@ +[tools] +trufflehog = "latest" +kubeconform = "0.8.0" diff --git a/CLAUDE.md b/CLAUDE.md index c08e708..f49c2bb 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -7,8 +7,9 @@ General-purpose Kubernetes workload Helm chart with addon sidecars (VPN, Postgre Run from this directory (`charts/workload`): - `just lint` — helm lint -- `just test` — helm unittest -- `just test -u` — update snapshots +- `just test` — helm unittest + kubeconform on `ci/*-values.yaml` +- `just test unit -u` — update snapshots +- `just test manifests [k8s-version]` — kubeconform only - `helm unittest -f tests/.yaml .` — run single test file ## Architecture @@ -101,3 +102,4 @@ When modifying an addon: - `values.yaml` — default values - `values.schema.json` — JSON schema validation - `tests/addons__test.yaml` — unit tests +- `ci/addons-values.yaml` — kubeconform render coverage (`just test manifests`); CRD kinds need a schema in `ci/schemas/` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 053a5b7..a56e409 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,8 +5,9 @@ Thank you for your interest in contributing! This document provides guidelines f ## Development Setup 1. Install prerequisites: - - [Helm](https://helm.sh/) 3.x - - [helm-unittest](https://github.com/helm-unittest/helm-unittest) plugin: `helm plugin install https://github.com/helm-unittest/helm-unittest` + - [Helm](https://helm.sh/) 4 + - [helm-unittest](https://github.com/helm-unittest/helm-unittest) plugin: `helm plugin install --verify=false https://github.com/helm-unittest/helm-unittest` + - [kubeconform](https://github.com/yannh/kubeconform), for `just test manifests` (or `mise install`) - [just](https://github.com/casey/just) (optional, for task automation) 2. Clone the repository: @@ -37,6 +38,7 @@ Every change should include corresponding tests: - Use `failedTemplate` assertions to test validation guards - Run `helm unittest .` to execute all tests - Run `helm unittest . -u` to update snapshots after intentional changes +- Cover new values in `ci/*-values.yaml`; `just test manifests` validates those renders with kubeconform. A new CRD kind also needs its JSON schema in `ci/schemas/` ### Schema Validation @@ -46,7 +48,7 @@ If you add or modify values, update `values.schema.json` accordingly. The schema 1. Fork the repository and create a feature branch 2. Make your changes with tests -3. Ensure all tests pass: `helm unittest .` +3. Ensure all tests pass: `just test` 4. Ensure linting passes: `helm lint .` 5. Submit a pull request with a clear description of the changes diff --git a/README.md b/README.md index 3522737..508f11d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ A general-purpose Kubernetes workload Helm chart with batteries included. Deploy ## Prerequisites - Kubernetes 1.26+ -- Helm 3.x +- Helm 4 ## Installation @@ -279,16 +279,18 @@ extraServices: ### Prerequisites -- [Helm](https://helm.sh/) 3.x +- [Helm](https://helm.sh/) 4 - [helm-unittest](https://github.com/helm-unittest/helm-unittest) plugin +- [kubeconform](https://github.com/yannh/kubeconform) (or `mise install`) - [just](https://github.com/casey/just) (optional, for task automation) ### Commands ```bash just lint # Lint the chart -just test # Run unit tests -just test -u # Update test snapshots +just test # Run unit tests and manifest validation +just test unit -u # Update test snapshots +just test manifests 1.26.15 # Validate ci/*-values.yaml renders against a Kubernetes version just build # Package the chart ``` diff --git a/ci/addons-values.yaml b/ci/addons-values.yaml new file mode 100644 index 0000000..4de4cad --- /dev/null +++ b/ci/addons-values.yaml @@ -0,0 +1,48 @@ +image: + repository: nginx + tag: "1.27" +ports: + - name: http + port: 8080 + service: + enabled: true +addons: + init: + enabled: true + command: ["sh", "-c", "echo init"] + vpn: + enabled: true + provider: + name: mullvad + type: wireguard + wireguard: + privateKey: not-a-key + addresses: + - 10.0.0.2/32 + postgres: + enabled: true + auth: + password: not-a-password + cloudflareTunnel: + enabled: true + fqdn: app.example.com + targetPort: 8080 + pathFilter: + enabled: true + paths: + - /webhook + tunnel: + create: true + cloudflare: + accountId: "0123456789" + domain: example.com + email: ops@example.com + credentials: + apiToken: not-a-token + networkPolicy: + enabled: true + infisical: + enabled: true + hostAPI: https://app.infisical.com/api + projectSlug: example + envSlug: prod diff --git a/ci/default-values.yaml b/ci/default-values.yaml new file mode 100644 index 0000000..6d35a04 --- /dev/null +++ b/ci/default-values.yaml @@ -0,0 +1,44 @@ +image: + repository: nginx + tag: "1.27" +ports: + - name: http + port: 80 + service: + enabled: true +ingress: + enabled: true + className: nginx + hosts: + - host: example.local + paths: + - path: / + pathType: Prefix + tls: + - secretName: example-tls + hosts: + - example.local +autoscaling: + enabled: true +env: + LOG_LEVEL: info +secretEnv: + API_TOKEN: not-a-secret +health: + livenessProbe: + httpGet: + path: / + port: http + readinessProbe: + httpGet: + path: / + port: http +networkPolicy: + enabled: true +extraServices: + - name: metrics + type: ClusterIP + ports: + - name: metrics + port: 9090 + targetPort: http diff --git a/ci/schemas/clustertunnel_v1alpha2.json b/ci/schemas/clustertunnel_v1alpha2.json new file mode 100644 index 0000000..6ea89ed --- /dev/null +++ b/ci/schemas/clustertunnel_v1alpha2.json @@ -0,0 +1,161 @@ +{ + "description": "ClusterTunnel is the Schema for the clustertunnels API", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "type": "object" + }, + "spec": { + "description": "TunnelSpec defines the desired state of Tunnel", + "properties": { + "cloudflare": { + "description": "Cloudflare Credentials", + "properties": { + "CLOUDFLARE_API_KEY": { + "default": "CLOUDFLARE_API_KEY", + "description": "Key in the secret to use for Cloudflare API Key, defaults to CLOUDFLARE_API_KEY. Needs Email also to be provided.\nFor Delete operations for new tunnels only, or as an alternate to API Token", + "type": "string" + }, + "CLOUDFLARE_API_TOKEN": { + "default": "CLOUDFLARE_API_TOKEN", + "description": "Key in the secret to use for Cloudflare API token, defaults to CLOUDFLARE_API_TOKEN", + "type": "string" + }, + "CLOUDFLARE_TUNNEL_CREDENTIAL_FILE": { + "default": "CLOUDFLARE_TUNNEL_CREDENTIAL_FILE", + "description": "Key in the secret to use as credentials.json for an existing tunnel, defaults to CLOUDFLARE_TUNNEL_CREDENTIAL_FILE", + "type": "string" + }, + "CLOUDFLARE_TUNNEL_CREDENTIAL_SECRET": { + "default": "CLOUDFLARE_TUNNEL_CREDENTIAL_SECRET", + "description": "Key in the secret to use as tunnel secret for an existing tunnel, defaults to CLOUDFLARE_TUNNEL_CREDENTIAL_SECRET", + "type": "string" + }, + "accountId": { + "description": "Account ID in Cloudflare. AccountId and AccountName cannot be both empty. If both are provided, Account ID is used if valid, else falls back to Account Name.", + "type": "string" + }, + "accountName": { + "description": "Account Name in Cloudflare. AccountName and AccountId cannot be both empty. If both are provided, Account ID is used if valid, else falls back to Account Name.", + "type": "string" + }, + "domain": { + "description": "Cloudflare Domain to which this tunnel belongs to", + "type": "string" + }, + "email": { + "description": "Email to use along with API Key for Delete operations for new tunnels only, or as an alternate to API Token", + "type": "string" + }, + "secret": { + "description": "Secret containing Cloudflare API key/token", + "type": "string" + } + }, + "required": [ + "domain", + "secret" + ], + "type": "object", + "additionalProperties": false + }, + "deployPatch": { + "default": "{}", + "description": "Deployment patch for the cloudflared deployment.\nFollows https://kubernetes.io/docs/reference/kubectl/generated/kubectl_patch/", + "type": "string" + }, + "existingTunnel": { + "description": "Existing tunnel object.\nExistingTunnel and NewTunnel cannot be both empty and are mutually exclusive.", + "properties": { + "id": { + "description": "Existing Tunnel ID to run on. Tunnel ID and Tunnel Name cannot be both empty. If both are provided, ID is used if valid, else falls back to Name.", + "type": "string" + }, + "name": { + "description": "Existing Tunnel name to run on. Tunnel Name and Tunnel ID cannot be both empty. If both are provided, ID is used if valid, else falls back to Name.", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "fallbackTarget": { + "default": "http_status:404", + "description": "FallbackTarget speficies the target for requests that do not match an ingress. Defaults to http_status:404", + "type": "string" + }, + "newTunnel": { + "description": "New tunnel object.\nNewTunnel and ExistingTunnel cannot be both empty and are mutually exclusive.", + "properties": { + "name": { + "description": "Tunnel name to create on Cloudflare.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "noTlsVerify": { + "default": false, + "description": "NoTlsVerify disables origin TLS certificate checks when the endpoint is HTTPS.", + "type": "boolean" + }, + "originCaPool": { + "description": "OriginCaPool speficies the secret with tls.crt (and other certs as needed to be referred in the service annotation) of the Root CA to be trusted when sending traffic to HTTPS endpoints", + "type": "string" + }, + "protocol": { + "default": "auto", + "description": "Protocol specifies the protocol to use for the tunnel. Defaults to auto. Options are \"auto\", \"quic\" and \"http2\"", + "enum": [ + "auto", + "quic", + "http2" + ], + "type": "string" + } + }, + "required": [ + "cloudflare" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "TunnelStatus defines the observed state of Tunnel", + "properties": { + "accountId": { + "type": "string" + }, + "tunnelId": { + "type": "string" + }, + "tunnelName": { + "type": "string" + }, + "zoneId": { + "type": "string" + } + }, + "required": [ + "accountId", + "tunnelId", + "tunnelName", + "zoneId" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/ci/schemas/infisicalsecret_v1alpha1.json b/ci/schemas/infisicalsecret_v1alpha1.json new file mode 100644 index 0000000..6ad7813 --- /dev/null +++ b/ci/schemas/infisicalsecret_v1alpha1.json @@ -0,0 +1,808 @@ +{ + "description": "InfisicalSecret is the Schema for the infisicalsecrets API", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "type": "object" + }, + "spec": { + "description": "InfisicalSecretSpec defines the desired state of InfisicalSecret", + "properties": { + "authentication": { + "properties": { + "awsIamAuth": { + "properties": { + "identityId": { + "type": "string" + }, + "secretsScope": { + "properties": { + "envSlug": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "projectSlug": { + "type": "string" + }, + "recursive": { + "type": "boolean" + }, + "secretName": { + "type": "string" + }, + "secretsPath": { + "type": "string" + } + }, + "required": [ + "envSlug", + "secretsPath" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "identityId", + "secretsScope" + ], + "type": "object", + "additionalProperties": false + }, + "azureAuth": { + "properties": { + "azureManagedIdentityClientId": { + "type": "string" + }, + "identityId": { + "type": "string" + }, + "resource": { + "type": "string" + }, + "secretsScope": { + "properties": { + "envSlug": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "projectSlug": { + "type": "string" + }, + "recursive": { + "type": "boolean" + }, + "secretName": { + "type": "string" + }, + "secretsPath": { + "type": "string" + } + }, + "required": [ + "envSlug", + "secretsPath" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "identityId", + "secretsScope" + ], + "type": "object", + "additionalProperties": false + }, + "gcpIamAuth": { + "properties": { + "identityId": { + "type": "string" + }, + "secretsScope": { + "properties": { + "envSlug": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "projectSlug": { + "type": "string" + }, + "recursive": { + "type": "boolean" + }, + "secretName": { + "type": "string" + }, + "secretsPath": { + "type": "string" + } + }, + "required": [ + "envSlug", + "secretsPath" + ], + "type": "object", + "additionalProperties": false + }, + "serviceAccountKeyFilePath": { + "type": "string" + } + }, + "required": [ + "identityId", + "secretsScope", + "serviceAccountKeyFilePath" + ], + "type": "object", + "additionalProperties": false + }, + "gcpIdTokenAuth": { + "properties": { + "identityId": { + "type": "string" + }, + "secretsScope": { + "properties": { + "envSlug": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "projectSlug": { + "type": "string" + }, + "recursive": { + "type": "boolean" + }, + "secretName": { + "type": "string" + }, + "secretsPath": { + "type": "string" + } + }, + "required": [ + "envSlug", + "secretsPath" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "identityId", + "secretsScope" + ], + "type": "object", + "additionalProperties": false + }, + "kubernetesAuth": { + "properties": { + "autoCreateServiceAccountToken": { + "description": "Optionally automatically create a service account token for the configured service account.\nIf this is set to `true`, the operator will automatically create a service account token for the configured service account.", + "type": "boolean" + }, + "identityId": { + "type": "string" + }, + "secretsScope": { + "properties": { + "envSlug": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "projectSlug": { + "type": "string" + }, + "recursive": { + "type": "boolean" + }, + "secretName": { + "type": "string" + }, + "secretsPath": { + "type": "string" + } + }, + "required": [ + "envSlug", + "secretsPath" + ], + "type": "object", + "additionalProperties": false + }, + "serviceAccountRef": { + "properties": { + "name": { + "type": "string" + }, + "namespace": { + "type": "string" + } + }, + "required": [ + "name", + "namespace" + ], + "type": "object", + "additionalProperties": false + }, + "serviceAccountTokenAudiences": { + "description": "The audiences to use for the service account token. This is only relevant if `autoCreateServiceAccountToken` is true.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "identityId", + "secretsScope", + "serviceAccountRef" + ], + "type": "object", + "additionalProperties": false + }, + "ldapAuth": { + "properties": { + "credentialsRef": { + "properties": { + "secretName": { + "description": "The name of the Kubernetes Secret", + "type": "string" + }, + "secretNamespace": { + "description": "The name space where the Kubernetes Secret is located", + "type": "string" + } + }, + "required": [ + "secretName", + "secretNamespace" + ], + "type": "object", + "additionalProperties": false + }, + "identityId": { + "type": "string" + }, + "secretsScope": { + "properties": { + "envSlug": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "projectSlug": { + "type": "string" + }, + "recursive": { + "type": "boolean" + }, + "secretName": { + "type": "string" + }, + "secretsPath": { + "type": "string" + } + }, + "required": [ + "envSlug", + "secretsPath" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "credentialsRef", + "identityId", + "secretsScope" + ], + "type": "object", + "additionalProperties": false + }, + "serviceAccount": { + "properties": { + "environmentName": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "serviceAccountSecretReference": { + "properties": { + "secretName": { + "description": "The name of the Kubernetes Secret", + "type": "string" + }, + "secretNamespace": { + "description": "The name space where the Kubernetes Secret is located", + "type": "string" + } + }, + "required": [ + "secretName", + "secretNamespace" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "environmentName", + "projectId", + "serviceAccountSecretReference" + ], + "type": "object", + "additionalProperties": false + }, + "serviceToken": { + "properties": { + "secretsScope": { + "properties": { + "envSlug": { + "type": "string" + }, + "recursive": { + "type": "boolean" + }, + "secretsPath": { + "type": "string" + } + }, + "required": [ + "envSlug", + "secretsPath" + ], + "type": "object", + "additionalProperties": false + }, + "serviceTokenSecretReference": { + "properties": { + "secretName": { + "description": "The name of the Kubernetes Secret", + "type": "string" + }, + "secretNamespace": { + "description": "The name space where the Kubernetes Secret is located", + "type": "string" + } + }, + "required": [ + "secretName", + "secretNamespace" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "secretsScope", + "serviceTokenSecretReference" + ], + "type": "object", + "additionalProperties": false + }, + "universalAuth": { + "properties": { + "credentialsRef": { + "properties": { + "secretName": { + "description": "The name of the Kubernetes Secret", + "type": "string" + }, + "secretNamespace": { + "description": "The name space where the Kubernetes Secret is located", + "type": "string" + } + }, + "required": [ + "secretName", + "secretNamespace" + ], + "type": "object", + "additionalProperties": false + }, + "secretsScope": { + "properties": { + "envSlug": { + "type": "string" + }, + "projectId": { + "type": "string" + }, + "projectSlug": { + "type": "string" + }, + "recursive": { + "type": "boolean" + }, + "secretName": { + "type": "string" + }, + "secretsPath": { + "type": "string" + } + }, + "required": [ + "envSlug", + "secretsPath" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "credentialsRef", + "secretsScope" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "hostAPI": { + "description": "Infisical host to pull secrets from", + "type": "string" + }, + "instantUpdates": { + "type": "boolean" + }, + "managedKubeConfigMapReferences": { + "items": { + "properties": { + "configMapName": { + "description": "The name of the Kubernetes ConfigMap", + "type": "string" + }, + "configMapNamespace": { + "description": "The namespace where the Kubernetes ConfigMap is located", + "type": "string" + }, + "creationPolicy": { + "default": "Orphan", + "description": "The Kubernetes ConfigMap creation policy.\nEnum with values: 'Owner', 'Orphan'.\nOwner creates the config map and sets .metadata.ownerReferences of the InfisicalSecret CRD that created it.\nOrphan will not set the config map owner. This will result in the config map being orphaned and not deleted when the resource is deleted.", + "type": "string" + }, + "template": { + "description": "The template to transform the secret data", + "properties": { + "data": { + "additionalProperties": { + "type": "string" + }, + "description": "The template key values", + "type": "object" + }, + "includeAllSecrets": { + "description": "This injects all retrieved secrets into the top level of your template.\nSecrets defined in the template will take precedence over the injected ones.", + "type": "boolean" + }, + "metadata": { + "description": "Custom metadata (labels/annotations) for the managed secret.\nWhen specified, these values are used instead of copying metadata from the InfisicalSecret CR.", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Custom annotations to apply to the managed secret", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels to apply to the managed secret", + "type": "object" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "configMapName", + "configMapNamespace" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "managedKubeSecretReferences": { + "items": { + "properties": { + "creationPolicy": { + "default": "Orphan", + "description": "The Kubernetes Secret creation policy.\nEnum with values: 'Owner', 'Orphan'.\nOwner creates the secret and sets .metadata.ownerReferences of the InfisicalSecret CRD that created it.\nOrphan will not set the secret owner. This will result in the secret being orphaned and not deleted when the resource is deleted.", + "type": "string" + }, + "secretName": { + "description": "The name of the Kubernetes Secret", + "type": "string" + }, + "secretNamespace": { + "description": "The name space where the Kubernetes Secret is located", + "type": "string" + }, + "secretType": { + "default": "Opaque", + "description": "The Kubernetes Secret type (experimental feature). More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types", + "type": "string" + }, + "template": { + "description": "The template to transform the secret data", + "properties": { + "data": { + "additionalProperties": { + "type": "string" + }, + "description": "The template key values", + "type": "object" + }, + "includeAllSecrets": { + "description": "This injects all retrieved secrets into the top level of your template.\nSecrets defined in the template will take precedence over the injected ones.", + "type": "boolean" + }, + "metadata": { + "description": "Custom metadata (labels/annotations) for the managed secret.\nWhen specified, these values are used instead of copying metadata from the InfisicalSecret CR.", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Custom annotations to apply to the managed secret", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels to apply to the managed secret", + "type": "object" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "secretName", + "secretNamespace" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "managedSecretReference": { + "properties": { + "creationPolicy": { + "default": "Orphan", + "description": "The Kubernetes Secret creation policy.\nEnum with values: 'Owner', 'Orphan'.\nOwner creates the secret and sets .metadata.ownerReferences of the InfisicalSecret CRD that created it.\nOrphan will not set the secret owner. This will result in the secret being orphaned and not deleted when the resource is deleted.", + "type": "string" + }, + "secretName": { + "description": "The name of the Kubernetes Secret", + "type": "string" + }, + "secretNamespace": { + "description": "The name space where the Kubernetes Secret is located", + "type": "string" + }, + "secretType": { + "default": "Opaque", + "description": "The Kubernetes Secret type (experimental feature). More info: https://kubernetes.io/docs/concepts/configuration/secret/#secret-types", + "type": "string" + }, + "template": { + "description": "The template to transform the secret data", + "properties": { + "data": { + "additionalProperties": { + "type": "string" + }, + "description": "The template key values", + "type": "object" + }, + "includeAllSecrets": { + "description": "This injects all retrieved secrets into the top level of your template.\nSecrets defined in the template will take precedence over the injected ones.", + "type": "boolean" + }, + "metadata": { + "description": "Custom metadata (labels/annotations) for the managed secret.\nWhen specified, these values are used instead of copying metadata from the InfisicalSecret CR.", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "Custom annotations to apply to the managed secret", + "type": "object" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Custom labels to apply to the managed secret", + "type": "object" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "secretName", + "secretNamespace" + ], + "type": "object", + "additionalProperties": false + }, + "resyncInterval": { + "type": "integer" + }, + "syncConfig": { + "properties": { + "instantUpdates": { + "type": "boolean" + }, + "resyncInterval": { + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "tls": { + "properties": { + "caRef": { + "description": "Reference to secret containing CA cert", + "properties": { + "key": { + "description": "The name of the secret property with the CA certificate value", + "type": "string" + }, + "secretName": { + "description": "The name of the Kubernetes Secret", + "type": "string" + }, + "secretNamespace": { + "description": "The namespace where the Kubernetes Secret is located", + "type": "string" + } + }, + "required": [ + "key", + "secretName", + "secretNamespace" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "tokenSecretReference": { + "properties": { + "secretName": { + "description": "The name of the Kubernetes Secret", + "type": "string" + }, + "secretNamespace": { + "description": "The name space where the Kubernetes Secret is located", + "type": "string" + } + }, + "required": [ + "secretName", + "secretNamespace" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "InfisicalSecretStatus defines the observed state of InfisicalSecret", + "properties": { + "conditions": { + "items": { + "description": "Condition contains details for one aspect of the current state of this API Resource.", + "properties": { + "lastTransitionTime": { + "description": "lastTransitionTime is the last time the condition transitioned from one status to another.\nThis should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + "format": "date-time", + "type": "string" + }, + "message": { + "description": "message is a human readable message indicating details about the transition.\nThis may be an empty string.", + "maxLength": 32768, + "type": "string" + }, + "observedGeneration": { + "description": "observedGeneration represents the .metadata.generation that the condition was set based upon.\nFor instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date\nwith respect to the current state of the instance.", + "format": "int64", + "minimum": 0, + "type": "integer" + }, + "reason": { + "description": "reason contains a programmatic identifier indicating the reason for the condition's last transition.\nProducers of specific condition types may define expected values and meanings for this field,\nand whether the values are considered a guaranteed API.\nThe value should be a CamelCase string.\nThis field may not be empty.", + "maxLength": 1024, + "minLength": 1, + "pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$", + "type": "string" + }, + "status": { + "description": "status of the condition, one of True, False, Unknown.", + "enum": [ + "True", + "False", + "Unknown" + ], + "type": "string" + }, + "type": { + "description": "type of condition in CamelCase or in foo.example.com/CamelCase.", + "maxLength": 316, + "pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$", + "type": "string" + } + }, + "required": [ + "lastTransitionTime", + "message", + "reason", + "status", + "type" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "required": [ + "conditions" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/ci/schemas/tunnel_v1alpha2.json b/ci/schemas/tunnel_v1alpha2.json new file mode 100644 index 0000000..c34d7a4 --- /dev/null +++ b/ci/schemas/tunnel_v1alpha2.json @@ -0,0 +1,161 @@ +{ + "description": "Tunnel is the Schema for the tunnels API", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "type": "object" + }, + "spec": { + "description": "TunnelSpec defines the desired state of Tunnel", + "properties": { + "cloudflare": { + "description": "Cloudflare Credentials", + "properties": { + "CLOUDFLARE_API_KEY": { + "default": "CLOUDFLARE_API_KEY", + "description": "Key in the secret to use for Cloudflare API Key, defaults to CLOUDFLARE_API_KEY. Needs Email also to be provided.\nFor Delete operations for new tunnels only, or as an alternate to API Token", + "type": "string" + }, + "CLOUDFLARE_API_TOKEN": { + "default": "CLOUDFLARE_API_TOKEN", + "description": "Key in the secret to use for Cloudflare API token, defaults to CLOUDFLARE_API_TOKEN", + "type": "string" + }, + "CLOUDFLARE_TUNNEL_CREDENTIAL_FILE": { + "default": "CLOUDFLARE_TUNNEL_CREDENTIAL_FILE", + "description": "Key in the secret to use as credentials.json for an existing tunnel, defaults to CLOUDFLARE_TUNNEL_CREDENTIAL_FILE", + "type": "string" + }, + "CLOUDFLARE_TUNNEL_CREDENTIAL_SECRET": { + "default": "CLOUDFLARE_TUNNEL_CREDENTIAL_SECRET", + "description": "Key in the secret to use as tunnel secret for an existing tunnel, defaults to CLOUDFLARE_TUNNEL_CREDENTIAL_SECRET", + "type": "string" + }, + "accountId": { + "description": "Account ID in Cloudflare. AccountId and AccountName cannot be both empty. If both are provided, Account ID is used if valid, else falls back to Account Name.", + "type": "string" + }, + "accountName": { + "description": "Account Name in Cloudflare. AccountName and AccountId cannot be both empty. If both are provided, Account ID is used if valid, else falls back to Account Name.", + "type": "string" + }, + "domain": { + "description": "Cloudflare Domain to which this tunnel belongs to", + "type": "string" + }, + "email": { + "description": "Email to use along with API Key for Delete operations for new tunnels only, or as an alternate to API Token", + "type": "string" + }, + "secret": { + "description": "Secret containing Cloudflare API key/token", + "type": "string" + } + }, + "required": [ + "domain", + "secret" + ], + "type": "object", + "additionalProperties": false + }, + "deployPatch": { + "default": "{}", + "description": "Deployment patch for the cloudflared deployment.\nFollows https://kubernetes.io/docs/reference/kubectl/generated/kubectl_patch/", + "type": "string" + }, + "existingTunnel": { + "description": "Existing tunnel object.\nExistingTunnel and NewTunnel cannot be both empty and are mutually exclusive.", + "properties": { + "id": { + "description": "Existing Tunnel ID to run on. Tunnel ID and Tunnel Name cannot be both empty. If both are provided, ID is used if valid, else falls back to Name.", + "type": "string" + }, + "name": { + "description": "Existing Tunnel name to run on. Tunnel Name and Tunnel ID cannot be both empty. If both are provided, ID is used if valid, else falls back to Name.", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + }, + "fallbackTarget": { + "default": "http_status:404", + "description": "FallbackTarget speficies the target for requests that do not match an ingress. Defaults to http_status:404", + "type": "string" + }, + "newTunnel": { + "description": "New tunnel object.\nNewTunnel and ExistingTunnel cannot be both empty and are mutually exclusive.", + "properties": { + "name": { + "description": "Tunnel name to create on Cloudflare.", + "type": "string" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "noTlsVerify": { + "default": false, + "description": "NoTlsVerify disables origin TLS certificate checks when the endpoint is HTTPS.", + "type": "boolean" + }, + "originCaPool": { + "description": "OriginCaPool speficies the secret with tls.crt (and other certs as needed to be referred in the service annotation) of the Root CA to be trusted when sending traffic to HTTPS endpoints", + "type": "string" + }, + "protocol": { + "default": "auto", + "description": "Protocol specifies the protocol to use for the tunnel. Defaults to auto. Options are \"auto\", \"quic\" and \"http2\"", + "enum": [ + "auto", + "quic", + "http2" + ], + "type": "string" + } + }, + "required": [ + "cloudflare" + ], + "type": "object", + "additionalProperties": false + }, + "status": { + "description": "TunnelStatus defines the observed state of Tunnel", + "properties": { + "accountId": { + "type": "string" + }, + "tunnelId": { + "type": "string" + }, + "tunnelName": { + "type": "string" + }, + "zoneId": { + "type": "string" + } + }, + "required": [ + "accountId", + "tunnelId", + "tunnelName", + "zoneId" + ], + "type": "object", + "additionalProperties": false + } + }, + "type": "object" +} diff --git a/ci/schemas/tunnelbinding_v1alpha1.json b/ci/schemas/tunnelbinding_v1alpha1.json new file mode 100644 index 0000000..2a6afea --- /dev/null +++ b/ci/schemas/tunnelbinding_v1alpha1.json @@ -0,0 +1,164 @@ +{ + "description": "TunnelBinding is the Schema for the tunnelbindings API", + "properties": { + "apiVersion": { + "description": "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources", + "type": "string" + }, + "kind": { + "description": "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "metadata": { + "type": "object" + }, + "status": { + "description": "TunnelBindingStatus defines the observed state of TunnelBinding", + "properties": { + "hostnames": { + "description": "To show on the kubectl cli", + "type": "string" + }, + "services": { + "items": { + "description": "ServiceInfo stores the Hostname and Target for each service", + "properties": { + "hostname": { + "description": "FQDN of the service", + "type": "string" + }, + "target": { + "description": "Target for cloudflared", + "type": "string" + } + }, + "required": [ + "hostname", + "target" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + } + }, + "required": [ + "hostnames", + "services" + ], + "type": "object", + "additionalProperties": false + }, + "subjects": { + "items": { + "description": "TunnelBindingSubject defines the subject TunnelBinding connects to the Tunnel", + "properties": { + "kind": { + "default": "Service", + "description": "Kind can be Service", + "type": "string" + }, + "name": { + "type": "string" + }, + "spec": { + "properties": { + "caPool": { + "description": "CaPool trusts the CA certificate referenced by the key in the secret specified in tunnel.spec.originCaPool.\ntls.crt is trusted globally and does not need to be specified. Only useful if the protocol is HTTPS.", + "type": "string" + }, + "fqdn": { + "description": "Fqdn specifies the DNS name to access this service from.\nDefaults to the service.metadata.name + tunnel.spec.domain.\nIf specifying this, make sure to use the same domain that the tunnel belongs to.\nThis is not validated and used as provided", + "type": "string" + }, + "http2Origin": { + "default": false, + "description": "Http2Origin makes the service attempt to connect to origin using HTTP2.\nOrigin must be configured as https.", + "type": "boolean" + }, + "noTlsVerify": { + "default": false, + "description": "NoTlsVerify disables TLS verification for this service.\nOnly useful if the protocol is HTTPS.", + "type": "boolean" + }, + "path": { + "description": "Path specifies a regular expression for to match on the request for http/https services\nIf a rule does not specify a path, all paths will be matched.", + "type": "string" + }, + "protocol": { + "description": "Protocol specifies the protocol for the service. Should be one of http, https, tcp, udp, ssh or rdp.\nDefaults to http, with the exceptions of https for 443, smb for 139 and 445, rdp for 3389 and ssh for 22 if the service has a TCP port.\nThe only available option for a UDP port is udp, which is default.", + "type": "string" + }, + "proxyAddress": { + "default": "127.0.0.1", + "description": "ProxyAddress configures the listen address for that proxy", + "pattern": "((^((([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]))$)|(^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$))", + "type": "string" + }, + "proxyPort": { + "default": 0, + "description": "ProxyPort configures the listen port for that proxy", + "maximum": 65535, + "minimum": 0, + "type": "integer" + }, + "proxyType": { + "default": "", + "description": "ProxyType configures the proxy type.", + "enum": [ + "", + "socks" + ], + "type": "string" + }, + "target": { + "description": "Target specified where the tunnel should proxy to.\nDefaults to the form of ://..svc:", + "type": "string" + } + }, + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false + }, + "type": "array" + }, + "tunnelRef": { + "description": "TunnelRef defines the Tunnel TunnelBinding connects to", + "properties": { + "disableDNSUpdates": { + "description": "DisableDNSUpdates disables the DNS updates on Cloudflare, just managing the configs. Assumes the DNS entries are manually added.", + "type": "boolean" + }, + "kind": { + "description": "Kind can be Tunnel or ClusterTunnel", + "enum": [ + "ClusterTunnel", + "Tunnel" + ], + "type": "string" + }, + "name": { + "description": "Name of the tunnel resource", + "type": "string" + } + }, + "required": [ + "kind", + "name" + ], + "type": "object", + "additionalProperties": false + } + }, + "required": [ + "subjects", + "tunnelRef" + ], + "type": "object" +} diff --git a/ci/statefulset-values.yaml b/ci/statefulset-values.yaml new file mode 100644 index 0000000..ced4b66 --- /dev/null +++ b/ci/statefulset-values.yaml @@ -0,0 +1,26 @@ +image: + repository: nginx + tag: "1.27" +useStatefulSet: true +ports: + - name: http + port: 80 + service: + enabled: true +persistence: + enabled: true + type: sts + size: 1Gi + mountPath: /data + extraVolumes: + - name: logs + size: 1Gi + mountPath: /logs +volumes: + host: + - name: tz + hostPath: + path: /etc/localtime + type: File + containerPath: + path: /etc/localtime diff --git a/justfile b/justfile index 7fe09af..dbc1536 100644 --- a/justfile +++ b/justfile @@ -10,9 +10,16 @@ build: clean push *FLAGS: ./scripts/helm_push.sh {{FLAGS}} -# Run unit tests. Pass -u to update snapshots. +# Run all tests, or one suite: just test [unit [-u]|manifests [KUBERNETES_VERSION]] +[positional-arguments] test *ARGS: - helm unittest {{ARGS}} . + #!/usr/bin/env bash + set -euo pipefail + case "${1:-}" in + unit) shift; helm unittest "$@" . ;; + manifests) shift; {{just_executable()}} _validate-manifests "$@" ;; + *) helm unittest "$@" . && {{just_executable()}} _validate-manifests ;; + esac # Update test snapshots update-snapshot: @@ -56,3 +63,17 @@ release BUMP: git push origin "v${NEW_VERSION}" echo "Released v${NEW_VERSION}" + +# Validate manifests rendered from ci/*-values.yaml against Kubernetes schemas. +# CRD schemas are vendored in ci/schemas: cloudflare-operator v0.13.1 (converted +# with kubeconform's openapi2jsonschema.py) and Infisical from datreeio/CRDs-catalog. +_validate-manifests KUBERNETES_VERSION="1.37.1": + #!/usr/bin/env bash + set -euo pipefail + for f in ci/*-values.yaml; do + echo "==> $f" + helm template ci . -f "$f" | kubeconform -strict -summary \ + -kubernetes-version "{{KUBERNETES_VERSION}}" \ + -schema-location default \ + -schema-location 'ci/schemas/{{{{.ResourceKind}}_{{{{.ResourceAPIVersion}}.json' + done diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..9e29a9b --- /dev/null +++ b/renovate.json @@ -0,0 +1,45 @@ +{ + "extends": [ + "config:best-practices", + ":dependencyDashboard", + ":semanticCommits" + ], + "enabledManagers": [ + "custom.regex", + "github-actions", + "mise" + ], + "customManagers": [ + { + "customType": "regex", + "description": "Update Docker image tags in values.yaml", + "managerFilePatterns": [ + "/(^|/)values\\.ya?ml$/" + ], + "matchStrings": [ + "repository:\\s*[\"']?(?[^\\s\"']+)[\"']?[^\\n]*\\n\\s*tag:\\s*[\"']?(?[^\\s\"']+)[\"']?" + ], + "datasourceTemplate": "docker" + }, + { + "customType": "regex", + "description": "Update tool versions pinned in GitHub workflows", + "managerFilePatterns": [ + "/^\\.github/workflows/.+\\.ya?ml$/" + ], + "matchStrings": [ + "# renovate: datasource=(?\\S+) depName=(?\\S+)\\s+\\S+:\\s*(?\\S+)" + ] + } + ], + "packageRules": [ + { + "matchDatasources": [ + "docker" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps", + "pinDigests": false + } + ] +}