Move CRDs installation logic to piraeus-operator-crds chart

Update piraeus-operator Makefile to move CRDs template into
piraeus-operator-crds chart on update, and add installCRDs toggle.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
This commit is contained in:
Andrei Kvapil 2026-02-11 22:54:16 +01:00
parent 5f27152d18
commit 4e804e0f86
No known key found for this signature in database
GPG key ID: 931CF7FEACEAF765
3 changed files with 4 additions and 1 deletions

View file

@ -1,3 +1,4 @@
{{ if .Values.installCRDs }}
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
@ -2169,3 +2170,4 @@ spec:
storage: true
subresources:
status: {}
{{ end }}

View file

@ -1 +1 @@
{}
installCRDs: true

View file

@ -8,3 +8,4 @@ update:
tag=$$(git ls-remote --tags --sort="v:refname" https://github.com/piraeusdatastore/piraeus-operator | awk -F'[/^]' 'END{print $$3}') && \
curl -sSL https://github.com/piraeusdatastore/piraeus-operator/archive/refs/tags/$${tag}.tar.gz | \
tar xzvf - --strip 1 piraeus-operator-$${tag#*v}/charts
mv charts/piraeus/templates/crds.yaml ../piraeus-operator-crds/templates/crds.yaml