From a5dcc76eaecfa7d8de69d5368f8d68301e006acf Mon Sep 17 00:00:00 2001 From: bo0tzz Date: Mon, 25 May 2026 21:57:34 +0200 Subject: [PATCH] feat: preview instances for 5 most recent releases --- .../github-previews/app/resource-set.yaml | 17 ++++++++--------- .../apps/preview/github-previews/app/rsip.yaml | 12 ++++++++++++ .../preview/github-previews/app/webhook.yaml | 4 ++++ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/kubernetes/apps/preview/github-previews/app/resource-set.yaml b/kubernetes/apps/preview/github-previews/app/resource-set.yaml index 01e94f818..17dd9a137 100644 --- a/kubernetes/apps/preview/github-previews/app/resource-set.yaml +++ b/kubernetes/apps/preview/github-previews/app/resource-set.yaml @@ -11,26 +11,25 @@ spec: - apiVersion: fluxcd.controlplane.io/v1 kind: ResourceSetInputProvider name: immich-github-branches - inputs: - - branch: release - # renovate: datasource=github-releases depName=immich-app/immich - tag: "v2.7.5" + - apiVersion: fluxcd.controlplane.io/v1 + kind: ResourceSetInputProvider + name: immich-github-tags resourcesTemplate: | <<- $ctx := dict >> <<- if hasKey inputs "author" >> <<- $name := list "pr" inputs.id | join "-" >> <<- $_ := set $ctx "name" $name >> - <<- else >> + <<- $tag := list "commit" inputs.sha | join "-" >> + <<- $_ := set $ctx "tag" $tag >> + <<- else if hasKey inputs "branch" >> <<- $_ := set $ctx "name" inputs.branch >> - <<- end >> - - <<- if hasKey inputs "sha" >> <<- $tag := list "commit" inputs.sha | join "-" >> <<- $_ := set $ctx "tag" $tag >> <<- else >> + <<- $_ := set $ctx "name" (inputs.tag | slugify) >> <<- $_ := set $ctx "tag" inputs.tag >> <<- end >> - + --- apiVersion: postgresql.cnpg.io/v1 kind: Cluster diff --git a/kubernetes/apps/preview/github-previews/app/rsip.yaml b/kubernetes/apps/preview/github-previews/app/rsip.yaml index f6d860aa1..2f8c71020 100644 --- a/kubernetes/apps/preview/github-previews/app/rsip.yaml +++ b/kubernetes/apps/preview/github-previews/app/rsip.yaml @@ -20,3 +20,15 @@ spec: url: https://github.com/immich-app/immich filter: includeBranch: "^main$" +--- +apiVersion: fluxcd.controlplane.io/v1 +kind: ResourceSetInputProvider +metadata: + name: immich-github-tags + namespace: preview +spec: + type: GitHubTag + url: https://github.com/immich-app/immich + filter: + semver: ">=2.0.0" + limit: 5 diff --git a/kubernetes/apps/preview/github-previews/app/webhook.yaml b/kubernetes/apps/preview/github-previews/app/webhook.yaml index 309347e5f..0b2fc5bf4 100644 --- a/kubernetes/apps/preview/github-previews/app/webhook.yaml +++ b/kubernetes/apps/preview/github-previews/app/webhook.yaml @@ -35,5 +35,9 @@ spec: kind: ResourceSetInputProvider name: immich-github-branches namespace: preview + - apiVersion: fluxcd.controlplane.io/v1 + kind: ResourceSetInputProvider + name: immich-github-tags + namespace: preview # NOTE: The external ingress for this webhook goes to the notification-controller through apps/infrastructure/flux-system/addons/webhooks/github/ingress.yaml