diff --git a/components.yaml b/components.yaml index 0c319ed..47d564e 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.crds] )) # ########################################################################## @@ -88,6 +89,8 @@ 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 )) + CRDS_VERSION: (( funcs.notEmpty(values.CRDS_VERSION || "") ? values.CRDS_VERSION :values.VERSION )) funcs: <<<: (( &temporary )) @@ -120,6 +123,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 )) diff --git a/tasks_build_ocm.yaml b/tasks_build_ocm.yaml index 376d6af..721e354 100644 --- a/tasks_build_ocm.yaml +++ b/tasks_build_ocm.yaml @@ -55,7 +55,10 @@ 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_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