From 89e5171c6574acf19542c93bbc5d0d45ad6a3e05 Mon Sep 17 00:00:00 2001 From: Marques Johansson Date: Wed, 4 Mar 2020 14:38:36 -0500 Subject: [PATCH 1/2] stacks: include apiVersion (0.1.0) in the app.yaml file Signed-off-by: Marques Johansson --- bin/kubectl-crossplane-stack-init | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/kubectl-crossplane-stack-init b/bin/kubectl-crossplane-stack-init index 1317e17..a5832ea 100755 --- a/bin/kubectl-crossplane-stack-init +++ b/bin/kubectl-crossplane-stack-init @@ -64,6 +64,7 @@ function create_manifest { mkdir -p config/stack/manifests touch config/stack/manifests/app.yaml cat > config/stack/manifests/app.yaml < Date: Wed, 4 Mar 2020 15:59:32 -0500 Subject: [PATCH 2/2] stacks: put crd yaml in apigroup directories Borrows from crossplane/stack-gcp#190 Signed-off-by: Marques Johansson --- bin/kubectl-crossplane-stack-init | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/kubectl-crossplane-stack-init b/bin/kubectl-crossplane-stack-init index a5832ea..58d09a2 100755 --- a/bin/kubectl-crossplane-stack-init +++ b/bin/kubectl-crossplane-stack-init @@ -263,8 +263,11 @@ bundle: $(STACK_PACKAGE_REGISTRY) # An alternate and simpler-looking approach would # be to cat all of the files into a single crd.yaml. find $(CRD_DIR) -type f -name '*.yaml' | \ - while read filename ; do cat $$filename > \ - $(STACK_PACKAGE_REGISTRY)/resources/$$( basename $$(echo $$filename | sed s/.yaml$$/.crd.yaml/)) \ + while read filename ; do \ + mkdir -p $(STACK_PACKAGE_REGISTRY)/resources/$$(basename $${filename%_*}); \ + concise=$${filename#*_}; \ + cat $$filename > \ + $(STACK_PACKAGE_REGISTRY)/resources/$$( basename $${filename%_*} )/$$( basename $${concise/.yaml/.crd.yaml} ) \ ; done cp -r $(STACK_PACKAGE_REGISTRY_SOURCE)/* $(STACK_PACKAGE_REGISTRY)