From 3ffad0fb3c7e58f3639b02a6630bb68edb18d171 Mon Sep 17 00:00:00 2001 From: dkwon17 Date: Fri, 23 Jan 2026 17:01:54 +0000 Subject: [PATCH 1/2] Update devfile with ephemeral graphroot directory Signed-off-by: dkwon17 --- .devfile.yaml | 37 +++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/.devfile.yaml b/.devfile.yaml index a0cda58d7..f51517e9c 100644 --- a/.devfile.yaml +++ b/.devfile.yaml @@ -1,4 +1,4 @@ -schemaVersion: 2.2.0 +schemaVersion: 2.3.0 metadata: name: devworkspace-operator components: @@ -9,17 +9,24 @@ components: memoryLimit: 16Gi cpuLimit: '4' cpuRequest: '0.5' + volumeMounts: + - name: graphroot + path: /home/user/.local/share/containers/storage + - name: graphroot + volume: + ephemeral: true commands: - id: build-and-push-controller exec: label: "1. Build and push DWO controller image" component: tools commandLine: | - read -p "ENTER a container registry org to push the devworkspace-controller image (e.g. quay.io/janedoe): " DWO_IMG_REPO && - read -p "ENTER the tag for the image (e.g. dev): " DWO_IMG_TAG && - export DWO_IMG=${DWO_IMG_REPO}/devworkspace-controller:${DWO_IMG_TAG} && - export DOCKER=podman && - make docker + read -p "ENTER a container registry org to push the devworkspace-controller image (e.g. quay.io/janedoe): " DWO_IMG_REPO + read -p "ENTER the tag for the image (e.g. dev): " DWO_IMG_TAG + export DWO_IMG=${DWO_IMG_REPO}/devworkspace-controller:${DWO_IMG_TAG} + export DOCKER=podman + make docker-build-amd64 + make docker-push-amd64 group: kind: build - id: make-olm-bundle-index-catalogsource @@ -27,13 +34,15 @@ commands: label: "2. Build and push OLM bundle, index image and create a CatalogueSource" component: tools commandLine: | - [[ "$(oc whoami)" =~ ^kube:admin$ ]] || (echo "You need to login as kubeadmin" && false) && - read -p "ENTER a container registry org to push the devworkspace images (e.g. quay.io/janedoe): " DWO_IMG_REPO && - read -p "ENTER a tag for the image (e.g. dev): " DWO_IMG_TAG && - export DWO_BUNDLE_IMG=${DWO_IMG_REPO}/devworkspace-operator-bundle:${DWO_IMG_TAG} && - export DWO_INDEX_IMG=${DWO_IMG_REPO}/devworkspace-operator-index:${DWO_IMG_TAG} && - export DEFAULT_DWO_IMG=${DWO_IMG_REPO}/devworkspace-controller:${DWO_IMG_TAG} && - export DOCKER=podman && - make generate_olm_bundle_yaml build_bundle_and_index register_catalogsource + read -p "ENTER a container registry org to push the devworkspace images (e.g. quay.io/janedoe): " DWO_IMG_REPO + read -p "ENTER a tag for the image (e.g. dev): " DWO_IMG_TAG + export DWO_BUNDLE_IMG=${DWO_IMG_REPO}/devworkspace-operator-bundle:${DWO_IMG_TAG} + export DWO_INDEX_IMG=${DWO_IMG_REPO}/devworkspace-operator-index:${DWO_IMG_TAG} + export DEFAULT_DWO_IMG=${DWO_IMG_REPO}/devworkspace-controller:${DWO_IMG_TAG}-amd64 + export DOCKER=podman + make generate_olm_bundle_yaml build_bundle_and_index + read -p "Run register_catalogsource? (y/n) " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ ! "$(oc whoami)" =~ ^kube:admin$ ]]; then echo "You need to login as kubeadmin" && exit 1; fi && make register_catalogsource; fi group: kind: build From dc825f87b99f07bc218b0936570e0fb197e06415 Mon Sep 17 00:00:00 2001 From: dkwon17 Date: Fri, 23 Jan 2026 20:17:50 +0000 Subject: [PATCH 2/2] Add view_catalogsource target Signed-off-by: dkwon17 --- .devfile.yaml | 2 +- build/make/olm.mk | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.devfile.yaml b/.devfile.yaml index f51517e9c..86fd3752e 100644 --- a/.devfile.yaml +++ b/.devfile.yaml @@ -43,6 +43,6 @@ commands: make generate_olm_bundle_yaml build_bundle_and_index read -p "Run register_catalogsource? (y/n) " -n 1 -r echo - if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ ! "$(oc whoami)" =~ ^kube:admin$ ]]; then echo "You need to login as kubeadmin" && exit 1; fi && make register_catalogsource; fi + if [[ $REPLY =~ ^[Yy]$ ]]; then if [[ ! "$(oc whoami)" =~ ^kube:admin$ ]]; then echo "You need to login as kubeadmin" && exit 1; fi && make register_catalogsource; else make view_catalogsource; fi group: kind: build diff --git a/build/make/olm.mk b/build/make/olm.mk index 8ac27497e..94069dfe1 100644 --- a/build/make/olm.mk +++ b/build/make/olm.mk @@ -54,6 +54,14 @@ register_catalogsource: _check_skopeo_installed sed -e "s|quay.io/devfile/devworkspace-operator-index:next|$(DWO_INDEX_IMG)|g" ./catalog-source.yaml \ | oc apply -f - +### view_catalogsource: prints the catalog source to standard output +view_catalogsource: + @echo "To apply the CatalogSource, run:" + @echo "" + @echo "oc apply -f - <