From 07c44f8444e98cbda17d85390c656aa62a514665 Mon Sep 17 00:00:00 2001 From: Andrzej Pankowski Date: Fri, 11 Aug 2023 11:07:09 +0200 Subject: [PATCH] Unifying release assets names (#209) --- .gitignore | 6 +++--- Makefile | 4 ++-- README.md | 6 +++--- ...a1_serverless.yaml => default_serverless_cr.yaml} | 0 ...rless_k3d.yaml => default_serverless_cr_k3d.yaml} | 0 ....yaml => default_serverless_cr_k3d_explicit.yaml} | 0 config/ui-extensions/serverless/general | 2 +- docs/contributor/manual-installation-on-k3d.md | 4 ++-- hack/ci/Makefile | 6 +++--- hack/common/Makefile | 12 ++++++------ scripts/release.sh | 10 ++++++---- 11 files changed, 26 insertions(+), 24 deletions(-) rename config/samples/{operator_v1alpha1_serverless.yaml => default_serverless_cr.yaml} (100%) rename config/samples/{operator_v1alpha1_serverless_k3d.yaml => default_serverless_cr_k3d.yaml} (100%) rename config/samples/{operator_v1alpha1_serverless_k3d_explicit.yaml => default_serverless_cr_k3d_explicit.yaml} (100%) diff --git a/.gitignore b/.gitignore index cf56466f0..d20d3baeb 100644 --- a/.gitignore +++ b/.gitignore @@ -33,8 +33,8 @@ module-chart-test mod charts default.yaml -template.yaml -template-k3d.yaml +moduletemplate.yaml +moduletemplate-k3d.yaml docs/.DS_Store .DS_Store __debug_bin @@ -43,4 +43,4 @@ vendor serverless-operator.yaml manifests/serverless/rendered.yaml serverless.yaml -template-latest.yaml +moduletemplate-latest.yaml diff --git a/Makefile b/Makefile index 0f90bcc7e..d1951bea0 100644 --- a/Makefile +++ b/Makefile @@ -128,10 +128,10 @@ module-image: docker-build docker-push ## Build the Module Image and push it to .PHONY: module-build module-build: kyma kustomize ## Build the Module and push it to a registry defined in MODULE_REGISTRY. cd config/operator && $(KUSTOMIZE) edit set image controller=${IMG} - @$(KYMA) alpha create module --default-cr=config/samples/operator_v1alpha1_serverless.yaml \ + @$(KYMA) alpha create module --default-cr=config/samples/default_serverless_cr.yaml \ --channel=${MODULE_CHANNEL} --name kyma.project.io/module/$(MODULE_NAME) \ --version $(MODULE_VERSION) --path . $(MODULE_CREATION_FLAGS) \ - --output=template.yaml + --output=moduletemplate.yaml ##@ Build Dependencies diff --git a/README.md b/README.md index 61171d601..5fee9a5c5 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ kubectl apply -f https://github.com/kyma-project/serverless-manager/releases/lat To get Serverless installed, apply the sample Serverless CR: ```bash -kubectl apply -f config/samples/operator_v1alpha1_serverless.yaml +kubectl apply -f https://github.com/kyma-project/serverless-manager/releases/latest/download/default_serverless_cr.yaml ``` ## Development @@ -87,13 +87,13 @@ kubectl apply -f config/samples/operator_v1alpha1_serverless.yaml - Create a Serverless instance. ```bash - kubectl apply -f config/samples/operator_v1alpha1_serverless.yaml + kubectl apply -f config/samples/default_serverless_cr.yaml ``` - Delete a Serverless instance. ```bash - kubectl delete -f config/samples/operator_v1alpha1_serverless.yaml + kubectl delete -f config/samples/default_serverless_cr.yaml ``` - Use external registry. diff --git a/config/samples/operator_v1alpha1_serverless.yaml b/config/samples/default_serverless_cr.yaml similarity index 100% rename from config/samples/operator_v1alpha1_serverless.yaml rename to config/samples/default_serverless_cr.yaml diff --git a/config/samples/operator_v1alpha1_serverless_k3d.yaml b/config/samples/default_serverless_cr_k3d.yaml similarity index 100% rename from config/samples/operator_v1alpha1_serverless_k3d.yaml rename to config/samples/default_serverless_cr_k3d.yaml diff --git a/config/samples/operator_v1alpha1_serverless_k3d_explicit.yaml b/config/samples/default_serverless_cr_k3d_explicit.yaml similarity index 100% rename from config/samples/operator_v1alpha1_serverless_k3d_explicit.yaml rename to config/samples/default_serverless_cr_k3d_explicit.yaml diff --git a/config/ui-extensions/serverless/general b/config/ui-extensions/serverless/general index aa6c323ef..faf226582 100644 --- a/config/ui-extensions/serverless/general +++ b/config/ui-extensions/serverless/general @@ -11,5 +11,5 @@ features: disableCreate: true disableDelete: true description: >- - {{[Serverless CR](https://github.com/kyma-project/serverless-manager/blob/main/config/samples/operator_v1alpha1_serverless.yaml)}} + {{[Serverless CR](https://github.com/kyma-project/serverless-manager/blob/main/config/samples/default_serverless_cr.yaml)}} specifies serverless module. diff --git a/docs/contributor/manual-installation-on-k3d.md b/docs/contributor/manual-installation-on-k3d.md index 6aa982f9f..b6fd7e3bf 100644 --- a/docs/contributor/manual-installation-on-k3d.md +++ b/docs/contributor/manual-installation-on-k3d.md @@ -40,7 +40,7 @@ > **NOTE:** The following sub-steps are temporary workarounds. - Edit `template.yaml` under the `config/moduletemplates` folder and: + Edit `moduletemplate.yaml` under the `config/moduletemplates` folder and: - change `target` to `control-plane` @@ -69,7 +69,7 @@ Use the `--template` flag to deploy the Serverless module manifest from the beginning, or apply it using kubectl later. ```bash - kyma alpha deploy --templates=./config/moduletemplates/template.yaml + kyma alpha deploy --templates=./config/moduletemplates/moduletemplate.yaml ``` Kyma installation is ready, but the module is not yet activated. diff --git a/hack/ci/Makefile b/hack/ci/Makefile index 13690a745..7eff55985 100644 --- a/hack/ci/Makefile +++ b/hack/ci/Makefile @@ -25,7 +25,7 @@ module-build: ## Build the Module, push it to a registry and print it based on t MODULE_VERSION=${MODULE_VERSION}-${MODULE_SHA} @echo "\n~~~~~~~~~~~~BEGINING OF MODULE TEMPLATE~~~~~~~~~~~~~~" - @cat ${PROJECT_ROOT}/template.yaml + @cat ${PROJECT_ROOT}/moduletemplate.yaml @echo "\n~~~~~~~~~~~~~~~END OF MODULE TEMPLATE~~~~~~~~~~~~~~~~" ##@ Tests @@ -68,8 +68,8 @@ remove-serverless: ## Remove Serverless CR .PHONY: install-latest-serverless install-latest-serverless: @make -C ${PROJECT_COMMON} kyma create-k3d - curl -LJ -s https://github.com/kyma-project/serverless-manager/releases/latest/download/moduletemplate.yaml > ${PROJECT_ROOT}/template-latest.yaml - @cat ${PROJECT_ROOT}/template-latest.yaml | sed -e 's/enableInternal: true/enableInternal: false/g' > ${PROJECT_ROOT}/template-k3d.yaml + curl -LJ -s https://github.com/kyma-project/serverless-manager/releases/latest/download/moduletemplate.yaml > ${PROJECT_ROOT}/moduletemplate-latest.yaml + @cat ${PROJECT_ROOT}/moduletemplate-latest.yaml | sed -e 's/enableInternal: true/enableInternal: false/g' > ${PROJECT_ROOT}/moduletemplate-k3d.yaml @make -C ${PROJECT_COMMON} install-kyma-with-lm patch-mod-mgr-role install-module-template enable-module verify-kyma .PHONY: reinstall-serverless diff --git a/hack/common/Makefile b/hack/common/Makefile index d386d19e7..11c9bdbc4 100644 --- a/hack/common/Makefile +++ b/hack/common/Makefile @@ -13,7 +13,7 @@ OPERATOR_IMAGE_NAME ?= serverless-operator-dev-local OPERATOR_IMAGE_TAG ?= $(MODULE_VERSION) -TEMPLATE_PATH ?= ${PROJECT_ROOT}/template.yaml +TEMPLATE_PATH ?= ${PROJECT_ROOT}/moduletemplate.yaml KYMA ?= ${PROJECT_ROOT}/bin/kyma-unstable @@ -91,21 +91,21 @@ install-kyma-with-lm: .PHONY: install-module-template install-module-template: ## Apply k3d-ready moduletemplate. - kubectl apply -f ${PROJECT_ROOT}/template-k3d.yaml + kubectl apply -f ${PROJECT_ROOT}/moduletemplate-k3d.yaml .PHONY: fix-template -fix-template: ## Create template-k3d.yaml based on template.yaml with right URLs. - @cat ${PROJECT_ROOT}/template.yaml \ +fix-template: ## Create moduletemplate-k3d.yaml based on moduletemplate.yaml with right URLs. + @cat ${PROJECT_ROOT}/moduletemplate.yaml \ | sed -e 's/remote/control-plane/g' \ -e 's/${REGISTRY_PORT}/5000/g' \ -e 's/localhost/k3d-${REGISTRY_NAME}.localhost/g' \ - > ${PROJECT_ROOT}/template-k3d.yaml + > ${PROJECT_ROOT}/moduletemplate-k3d.yaml .PHONY: apply-serverless apply-serverless: ## Apply the k3d serverless CR. kubectl apply -n kyma-system \ - -f ${PROJECT_ROOT}/config/samples/operator_v1alpha1_serverless.yaml + -f ${PROJECT_ROOT}/config/samples/default_serverless_cr.yaml ### Internal Dependencies diff --git a/scripts/release.sh b/scripts/release.sh index efebe5d2d..5b2e89c87 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -38,8 +38,8 @@ cat serverless-operator.yaml MODULE_VERSION=${PULL_BASE_REF} make module-build -echo "Generated template.yaml:" -cat template.yaml +echo "Generated moduletemplate.yaml:" +cat moduletemplate.yaml echo "Updating github release with assets" @@ -65,7 +65,9 @@ fi UPLOAD_URL="https://uploads.github.com/repos/kyma-project/serverless-manager/releases/${RELEASE_ID}/assets" uploadFile "serverless-operator.yaml" "${UPLOAD_URL}?name=serverless-operator.yaml" -uploadFile "template.yaml" "${UPLOAD_URL}?name=template.yaml" -uploadFile "config/samples/operator_v1alpha1_serverless.yaml" "${UPLOAD_URL}?name=operator_v1alpha1_serverless.yaml" +uploadFile "moduletemplate.yaml" "${UPLOAD_URL}?name=moduletemplate.yaml" +uploadFile "config/samples/default_serverless_cr.yaml" "${UPLOAD_URL}?name=default_serverless_cr.yaml" +uploadFile "config/samples/default_serverless_cr_k3d.yaml" "${UPLOAD_URL}?name=default_serverless_cr_k3d.yaml" +