From 01dcf164dc71e943212be6c8495552f6d8d26079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCnemann?= Date: Thu, 28 Aug 2025 10:27:19 +0200 Subject: [PATCH 1/6] add crds resource --- components.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components.yaml b/components.yaml index 0c319ed..1f54581 100644 --- a/components.yaml +++ b/components.yaml @@ -75,6 +75,7 @@ resources: - <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.BP_COMPONENTS))|[]|s,comp|-> s *templates.blueprint] )) - <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.CHART_COMPONENTS))|[]|s,cv|-> ("cvs" = split(":", cv)) ("comp" = cvs[0], "chart_version" = (cvs[1] || defaults.CHART_VERSION)) s *templates.chart] )) - <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.IMG_COMPONENTS))|[]|s,cv|-> ("cvs" = split(":", cv)) ("comp" = cvs[0], "img_version" = (cvs[1] || defaults.IMG_VERSION)) s *templates.image] )) +- <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.CRDS_COMPONENTS))|[]|s,cv|-> ("cvs" = split(":", cv)) ("comp" = cvs[0], "crds_version" = (cvs[1] || defaults.CRDS_VERSION)) s *templates.image] )) # ########################################################################## @@ -88,6 +89,7 @@ defaults: BP_COMPONENTS: (( funcs.notEmpty(values.BP_PATH || "") ? ( funcs.notEmpty(values.BP_COMPONENTS || "") ? values.BP_COMPONENTS :values.COMPONENTS ) :"" )) CHART_COMPONENTS: (( funcs.notEmpty(values.CHART_COMPONENTS || "") ? values.CHART_COMPONENTS :values.COMPONENTS )) IMG_COMPONENTS: (( funcs.notEmpty(values.IMG_COMPONENTS || "") ? values.IMG_COMPONENTS :values.COMPONENTS )) + CRDS_COMPONENTS: (( funcs.notEmpty(values.CRDS_COMPONENTS || "") ? values.CRDS_COMPONENTS :values.COMPONENTS )) funcs: <<<: (( &temporary )) @@ -120,6 +122,14 @@ templates: access: imageReference: (( values.IMG_REGISTRY "/" comp ":" img_version )) type: ociArtifact + crds: + <<<: (( &template )) + name: (( comp "-crds" )) + type: fileSystem + version: (( crds_version )) + input: + type: dir + path: (( values.CRDS_PATH )) From dc67f74d5ae639763f599aa58b159c08b2b0cf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCnemann?= Date: Thu, 28 Aug 2025 10:32:30 +0200 Subject: [PATCH 2/6] update --- tasks_build_ocm.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasks_build_ocm.yaml b/tasks_build_ocm.yaml index 376d6af..8ff54de 100644 --- a/tasks_build_ocm.yaml +++ b/tasks_build_ocm.yaml @@ -55,7 +55,9 @@ tasks: IMG_VERSION="{{.IMG_VERSION | default ""}}" \ BP_COMPONENTS="{{.BP_COMPONENTS | default ""}}" \ CHART_COMPONENTS="{{.CHART_COMPONENTS | default ""}}" \ - IMG_COMPONENTS="{{.IMG_COMPONENTS | default ""}}" + IMG_COMPONENTS="{{.IMG_COMPONENTS | default ""}}" \ + CRDS_COMPONENTS="{{.CRDS_COMPONENTS | default ""}}" \ + CRDS_PATH="{{.CRDS_PATH | default ""}}" - cmd: echo "Use '$(realpath --relative-base="{{.USER_WORKING_DIR}}" "{{.OCM}}") get cv $(realpath --relative-base="{{.USER_WORKING_DIR}}" "{{.compdir}}") -o yaml' to view the generated component descriptor." silent: true From 1c83ec0229eb9a2f0353bc55df68aff0c1c029fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCnemann?= Date: Thu, 28 Aug 2025 10:33:54 +0200 Subject: [PATCH 3/6] add crds version --- tasks_build_ocm.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks_build_ocm.yaml b/tasks_build_ocm.yaml index 8ff54de..b1fc744 100644 --- a/tasks_build_ocm.yaml +++ b/tasks_build_ocm.yaml @@ -57,6 +57,7 @@ tasks: CHART_COMPONENTS="{{.CHART_COMPONENTS | default ""}}" \ IMG_COMPONENTS="{{.IMG_COMPONENTS | default ""}}" \ CRDS_COMPONENTS="{{.CRDS_COMPONENTS | default ""}}" \ + CRDS_VERSION="{{.CRDS_VERSION | default ""}}" \ CRDS_PATH="{{.CRDS_PATH | default ""}}" - cmd: echo "Use '$(realpath --relative-base="{{.USER_WORKING_DIR}}" "{{.OCM}}") get cv $(realpath --relative-base="{{.USER_WORKING_DIR}}" "{{.compdir}}") -o yaml' to view the generated component descriptor." silent: true From 45405b02a83318dcb1979b2b48a0036d8f0acded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCnemann?= Date: Thu, 28 Aug 2025 10:35:35 +0200 Subject: [PATCH 4/6] add missing default --- components.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/components.yaml b/components.yaml index 1f54581..b8d708c 100644 --- a/components.yaml +++ b/components.yaml @@ -90,6 +90,7 @@ defaults: CHART_COMPONENTS: (( funcs.notEmpty(values.CHART_COMPONENTS || "") ? values.CHART_COMPONENTS :values.COMPONENTS )) IMG_COMPONENTS: (( funcs.notEmpty(values.IMG_COMPONENTS || "") ? values.IMG_COMPONENTS :values.COMPONENTS )) CRDS_COMPONENTS: (( funcs.notEmpty(values.CRDS_COMPONENTS || "") ? values.CRDS_COMPONENTS :values.COMPONENTS )) + CRDS_VERSION: (( funcs.notEmpty(values.CRDS_VERSION || "") ? values.CRDS_VERSION :values.VERSION )) funcs: <<<: (( &temporary )) From 536926a3823296d0cde6037c87f08c2db6cf47d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCnemann?= Date: Thu, 28 Aug 2025 10:38:02 +0200 Subject: [PATCH 5/6] fix template name --- components.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components.yaml b/components.yaml index b8d708c..47d564e 100644 --- a/components.yaml +++ b/components.yaml @@ -75,7 +75,7 @@ resources: - <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.BP_COMPONENTS))|[]|s,comp|-> s *templates.blueprint] )) - <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.CHART_COMPONENTS))|[]|s,cv|-> ("cvs" = split(":", cv)) ("comp" = cvs[0], "chart_version" = (cvs[1] || defaults.CHART_VERSION)) s *templates.chart] )) - <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.IMG_COMPONENTS))|[]|s,cv|-> ("cvs" = split(":", cv)) ("comp" = cvs[0], "img_version" = (cvs[1] || defaults.IMG_VERSION)) s *templates.image] )) -- <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.CRDS_COMPONENTS))|[]|s,cv|-> ("cvs" = split(":", cv)) ("comp" = cvs[0], "crds_version" = (cvs[1] || defaults.CRDS_VERSION)) s *templates.image] )) +- <<<: (( sum[funcs.splitIgnoreEmpty(",", funcs.ignoreDisabled(defaults.CRDS_COMPONENTS))|[]|s,cv|-> ("cvs" = split(":", cv)) ("comp" = cvs[0], "crds_version" = (cvs[1] || defaults.CRDS_VERSION)) s *templates.crds] )) # ########################################################################## From 1739fafd69e2d720649a55b49fd729feb15888b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Sch=C3=BCnemann?= Date: Thu, 28 Aug 2025 10:41:33 +0200 Subject: [PATCH 6/6] disable CRDS_COMPONENTS by default --- tasks_build_ocm.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks_build_ocm.yaml b/tasks_build_ocm.yaml index b1fc744..721e354 100644 --- a/tasks_build_ocm.yaml +++ b/tasks_build_ocm.yaml @@ -56,7 +56,7 @@ tasks: BP_COMPONENTS="{{.BP_COMPONENTS | default ""}}" \ CHART_COMPONENTS="{{.CHART_COMPONENTS | default ""}}" \ IMG_COMPONENTS="{{.IMG_COMPONENTS | default ""}}" \ - CRDS_COMPONENTS="{{.CRDS_COMPONENTS | default ""}}" \ + CRDS_COMPONENTS="{{.CRDS_COMPONENTS | default "[]"}}" \ CRDS_VERSION="{{.CRDS_VERSION | default ""}}" \ CRDS_PATH="{{.CRDS_PATH | default ""}}" - cmd: echo "Use '$(realpath --relative-base="{{.USER_WORKING_DIR}}" "{{.OCM}}") get cv $(realpath --relative-base="{{.USER_WORKING_DIR}}" "{{.compdir}}") -o yaml' to view the generated component descriptor."