From b09bb2a4975942f88bcb10498fe5083f636da028 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 18:04:31 +0100 Subject: [PATCH 01/16] remove k3s and use trixie --- .devcontainer/Dockerfile | 13 ++----------- .devcontainer/onCreate.sh | 8 -------- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 7a1c5b0..39b730b 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,8 +1,8 @@ # ghcr.io/eda-labs/eda-devcontainer -FROM public.ecr.aws/docker/library/debian:bookworm-slim +FROM public.ecr.aws/docker/library/debian:trixie-slim ARG EDA_VERSION=25.12.1 -ARG EDA_PLAYGROUND_REPO=kaelemc/playground +ARG EDA_PLAYGROUND_REPO=nokia-eda/playground ARG EDA_PLAYGROUND_DIR=/home/vscode/.playground ENV EDA_VERSION=${EDA_VERSION//./-} @@ -21,7 +21,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install --no-instal iproute2 \ procps \ vim \ - fontconfig \ xz-utils \ && rm -rf /var/lib/apt/lists/* @@ -34,8 +33,6 @@ RUN useradd -m -s /bin/zsh vscode && \ COPY --chmod=755 scripts/ /usr/local/bin/. COPY codespaces-4vcpu-kpt-setters.yaml /eda-codespaces/codespaces-4vcpu-kpt-setters.yaml -RUN curl -fsSL --retry 3 https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | TAG=v5.8.3 bash - # Add EDA Playground tools to PATH (zsh) RUN echo 'export PATH="$PATH:$EDA_PLAYGROUND_DIR/tools"' >> /etc/zsh/zshrc @@ -55,12 +52,6 @@ RUN SRL=$(curl -s "https://raw.githubusercontent.com/nokia-eda/playground/refs/h RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" RUN curl -sS https://starship.rs/install.sh | sudo sh -s -- -y -# Install Nerd Font for terminal icons (starship, etc.) -RUN mkdir -p /home/vscode/.local/share/fonts && \ - curl -fsSL https://github.com/ryanoasis/nerd-fonts/releases/latest/download/JetBrainsMono.tar.xz | \ - tar -xJf - -C /home/vscode/.local/share/fonts && \ - fc-cache -fv - # copy shell files COPY --chown=vscode:vscode shell/ /home/vscode/ COPY --chown=vscode:vscode shell/starship.toml /home/vscode/.config/starship.toml diff --git a/.devcontainer/onCreate.sh b/.devcontainer/onCreate.sh index de91b6d..4b72589 100755 --- a/.devcontainer/onCreate.sh +++ b/.devcontainer/onCreate.sh @@ -7,11 +7,3 @@ free -m sudo sysctl -w fs.inotify.max_user_watches=1048576 sudo sysctl -w fs.inotify.max_user_instances=512 -ensure-docker-is-ready - -k3d cluster create eda-demo \ - --image rancher/k3s:v1.34.1-k3s1 \ - --k3s-arg "--disable=traefik@server:*" \ - --k3s-arg "--disable=servicelb@server:*" \ - --volume "$HOME/.images.txt:/opt/images.txt@server:*" \ - --no-lb From 4bf030736714f1646bff6eb4cfb6050496bd8b3c Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 18:13:49 +0100 Subject: [PATCH 02/16] try kind --- .devcontainer/devcontainer.json | 2 +- .devcontainer/postCreate.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index be36f06..35e2163 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "Nokia EDA in GitHub Codespaces", - "image": "ghcr.io/eda-labs/codespaces/base:main", + "image": "ghcr.io/eda-labs/codespaces/base:kindly", "features": { "ghcr.io/devcontainers/features/docker-in-docker:2": { "version": "latest", diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index 1182e8a..85c961b 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -5,8 +5,12 @@ cd $EDA_PLAYGROUND_DIR ensure-docker-is-ready +# start the kind cluster +make kind +# preload images into kind cluster from the EDA core list TOKEN=$($EDA_PLAYGROUND_DIR/tools/yq -o=json '.assets.registries[].auth' $HOME/.bundle.yaml | jq -r '(reduce range(.extraEncodeCount + 1) as $_ (.username; @base64d)) + ":" + (reduce range(.extraEncodeCount + 1) as $_ (.password; @base64d))') -docker exec k3d-eda-demo-server-0 sh -c "cat /opt/images.txt | xargs -P $(nproc) -I {} crictl pull --creds $TOKEN {}" +docker cp /home/vscode/images.txt eda-demo-control-plane:/opt/images.txt +docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc) -I {} crictl pull --creds $TOKEN {}" make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda NO_KIND=yes NO_LB=yes KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file From 61be48eb7a159bdd9c64896967d5a254092b0f56 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 18:15:20 +0100 Subject: [PATCH 03/16] clone main --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 39b730b..20ba57c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -38,7 +38,7 @@ RUN echo 'export PATH="$PATH:$EDA_PLAYGROUND_DIR/tools"' >> /etc/zsh/zshrc USER vscode -RUN git clone --depth 1 --branch v0.0.1 "https://github.com/$EDA_PLAYGROUND_REPO" $EDA_PLAYGROUND_DIR && cd $EDA_PLAYGROUND_DIR && \ +RUN git clone --depth 1 --branch main "https://github.com/$EDA_PLAYGROUND_REPO" $EDA_PLAYGROUND_DIR && cd $EDA_PLAYGROUND_DIR && \ make download-tools RUN curl -o $HOME/.bundle.yaml "https://raw.githubusercontent.com/nokia-eda/edaadm/refs/heads/main/bundles/eda-bundle-core-$EDA_VERSION.yaml" && \ From b019444c507139ec6755a53e1146881b0348a1b0 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 18:23:14 +0100 Subject: [PATCH 04/16] maybe lets go back to bookworm --- .devcontainer/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 20ba57c..cdea507 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # ghcr.io/eda-labs/eda-devcontainer -FROM public.ecr.aws/docker/library/debian:trixie-slim +FROM public.ecr.aws/docker/library/debian:bookworm-slim ARG EDA_VERSION=25.12.1 ARG EDA_PLAYGROUND_REPO=nokia-eda/playground From 6f6ea42ce97f9ae80f6f6ad4407254335ada2be4 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 18:28:15 +0100 Subject: [PATCH 05/16] hidden images --- .devcontainer/postCreate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index 85c961b..9cbc9f3 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -10,7 +10,7 @@ make kind # preload images into kind cluster from the EDA core list TOKEN=$($EDA_PLAYGROUND_DIR/tools/yq -o=json '.assets.registries[].auth' $HOME/.bundle.yaml | jq -r '(reduce range(.extraEncodeCount + 1) as $_ (.username; @base64d)) + ":" + (reduce range(.extraEncodeCount + 1) as $_ (.password; @base64d))') -docker cp /home/vscode/images.txt eda-demo-control-plane:/opt/images.txt +docker cp /home/vscode/.images.txt eda-demo-control-plane:/opt/images.txt docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc) -I {} crictl pull --creds $TOKEN {}" make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda NO_KIND=yes NO_LB=yes KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file From 4eab4ee22393a538dd47f912604b135ecbb4b1ac Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 20:43:28 +0100 Subject: [PATCH 06/16] use LB with kind --- .devcontainer/postCreate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index 9cbc9f3..a1b7649 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -13,4 +13,4 @@ TOKEN=$($EDA_PLAYGROUND_DIR/tools/yq -o=json '.assets.registries[].auth' $HOME/. docker cp /home/vscode/.images.txt eda-demo-control-plane:/opt/images.txt docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc) -I {} crictl pull --creds $TOKEN {}" -make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda NO_KIND=yes NO_LB=yes KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file +make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file From 2b54b04655ddefc11172660a33948edfd4ad0d67 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 21:09:28 +0100 Subject: [PATCH 07/16] use token from playground --- .devcontainer/postCreate.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index a1b7649..e223f21 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -8,8 +8,13 @@ ensure-docker-is-ready # start the kind cluster make kind +# get token +encoded=$(grep 'GH_PKG_TOKEN ?=' "Makefile" | sed 's/.*?= *//') +prefix=$(printf '%s' 'Z2hwCg==' | base64 -d) +suffix=$(printf '%s' "$encoded" | base64 -d | cut -c 4-) +TOKEN="${prefix}${suffix}" + # preload images into kind cluster from the EDA core list -TOKEN=$($EDA_PLAYGROUND_DIR/tools/yq -o=json '.assets.registries[].auth' $HOME/.bundle.yaml | jq -r '(reduce range(.extraEncodeCount + 1) as $_ (.username; @base64d)) + ":" + (reduce range(.extraEncodeCount + 1) as $_ (.password; @base64d))') docker cp /home/vscode/.images.txt eda-demo-control-plane:/opt/images.txt docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc) -I {} crictl pull --creds $TOKEN {}" From 55a3726d304ae5af06a0699e1690dcac054c9af3 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 21:20:56 +0100 Subject: [PATCH 08/16] strip newline --- .devcontainer/postCreate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index e223f21..ae49231 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -11,7 +11,7 @@ make kind # get token encoded=$(grep 'GH_PKG_TOKEN ?=' "Makefile" | sed 's/.*?= *//') prefix=$(printf '%s' 'Z2hwCg==' | base64 -d) -suffix=$(printf '%s' "$encoded" | base64 -d | cut -c 4-) +suffix=$(printf '%s' "$encoded" | base64 -d | cut -c 4- | tr -d '\n') TOKEN="${prefix}${suffix}" # preload images into kind cluster from the EDA core list From bc2318de92ad9b813ebe7e415f379f64388ffa37 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 21:33:54 +0100 Subject: [PATCH 09/16] added username --- .devcontainer/postCreate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index ae49231..4f64174 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -16,6 +16,6 @@ TOKEN="${prefix}${suffix}" # preload images into kind cluster from the EDA core list docker cp /home/vscode/.images.txt eda-demo-control-plane:/opt/images.txt -docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc) -I {} crictl pull --creds $TOKEN {}" +docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc) -I {} crictl pull --creds nokia-eda-bot:$TOKEN {}" make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file From 3ece3c854cd67a4525170a9ec06d4b7343b199d5 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 23:51:55 +0100 Subject: [PATCH 10/16] time to eda --- .devcontainer/postAttach.sh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.devcontainer/postAttach.sh b/.devcontainer/postAttach.sh index 55284f9..81dfca6 100755 --- a/.devcontainer/postAttach.sh +++ b/.devcontainer/postAttach.sh @@ -1,16 +1,17 @@ #!/bin/bash echo " - .:.... - .:=**+--:. _____ ____ _ ___ ____ _ _ ____ - :=*******##**+-:.. | ____| _ \ / \ |_ _/ ___| | | | | _ \ - .=+******###*++=-::. | _| | | | |/ _ \ | |\___ \ | | | | |_) | - -+++******######***=... | |___| |_| / ___ \ | | ___) | | |_| | __/ - -++++******#######+----. |_____|____/_/ \_\ |___|____/ \___/|_| - .-++++++******#########*-:::. - .++++++++******########=:=:. - ..-=---=++++******#########+ .. - .. -++++=-:::-=+####::*= URL: https://${CODESPACE_NAME}-${EDA_PORT}.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} - =++: +##* . - .:. .-: + ╔═════════════════════════════════════════════════════════════════════════════════════╗ + ║ ║ + ║ ████████╗██╗███╗ ███╗███████╗ ████████╗ ██████╗ ███████╗██████╗ █████╗ ║ + ║ ╚══██╔══╝██║████╗ ████║██╔════╝ ╚══██╔══╝██╔═══██╗ ██╔════╝██╔══██╗██╔══██╗ ║ + ║ ██║ ██║██╔████╔██║█████╗ ██║ ██║ ██║ █████╗ ██║ ██║███████║ ║ + ║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║ ██║ ██║ ██╔══╝ ██║ ██║██╔══██║ ║ + ║ ██║ ██║██║ ╚═╝ ██║███████╗ ██║ ╚██████╔╝ ███████╗██████╔╝██║ ██║ ║ + ║ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝ ║ + ║ ║ + ╚═════════════════════════════════════════════════════════════════════════════════════╝ + + ⚡ URL: https://${CODESPACE_NAME}-${EDA_PORT}.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} + " \ No newline at end of file From 40db7bfd263ddb85d95cdf7a6c6eec4b05bb5f21 Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 23:58:48 +0100 Subject: [PATCH 11/16] run eda --- .devcontainer/postAttach.sh | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.devcontainer/postAttach.sh b/.devcontainer/postAttach.sh index 81dfca6..d848397 100755 --- a/.devcontainer/postAttach.sh +++ b/.devcontainer/postAttach.sh @@ -1,17 +1,23 @@ #!/bin/bash echo " - ╔═════════════════════════════════════════════════════════════════════════════════════╗ - ║ ║ - ║ ████████╗██╗███╗ ███╗███████╗ ████████╗ ██████╗ ███████╗██████╗ █████╗ ║ - ║ ╚══██╔══╝██║████╗ ████║██╔════╝ ╚══██╔══╝██╔═══██╗ ██╔════╝██╔══██╗██╔══██╗ ║ - ║ ██║ ██║██╔████╔██║█████╗ ██║ ██║ ██║ █████╗ ██║ ██║███████║ ║ - ║ ██║ ██║██║╚██╔╝██║██╔══╝ ██║ ██║ ██║ ██╔══╝ ██║ ██║██╔══██║ ║ - ║ ██║ ██║██║ ╚═╝ ██║███████╗ ██║ ╚██████╔╝ ███████╗██████╔╝██║ ██║ ║ - ║ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═════╝ ╚══════╝╚═════╝ ╚═╝ ╚═╝ ║ - ║ ║ - ╚═════════════════════════════════════════════════════════════════════════════════════╝ + ╔═══════════════════════════════════════╗ + ║ ║ + ║ ██████╗ ██╗ ██╗███╗ ██╗ ║ + ║ ██╔══██╗██║ ██║████╗ ██║ ║ + ║ ██████╔╝██║ ██║██╔██╗ ██║ ║ + ║ ██╔══██╗██║ ██║██║╚██╗██║ ║ + ║ ██║ ██║╚██████╔╝██║ ╚████║ ║ + ║ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ║ + ║ ███████╗██████╗ █████╗ ║ + ║ ██╔════╝██╔══██╗██╔══██╗ ║ + ║ █████╗ ██║ ██║███████║ ║ + ║ ██╔══╝ ██║ ██║██╔══██║ ║ + ║ ███████╗██████╔╝██║ ██║ ║ + ║ ╚══════╝╚═════╝ ╚═╝ ╚═╝ ║ + ║ ║ + ╚═══════════════════════════════════════╝ - ⚡ URL: https://${CODESPACE_NAME}-${EDA_PORT}.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} + ⚡ URL: https://${CODESPACE_NAME}-${EDA_PORT}.${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN} " \ No newline at end of file From 39f6ede5197734e2e070257d867cad191d7a5d5b Mon Sep 17 00:00:00 2001 From: hellt Date: Mon, 12 Jan 2026 23:58:59 +0100 Subject: [PATCH 12/16] patch kc --- .devcontainer/overrides.mk | 9 +++++++++ .devcontainer/postCreate.sh | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.devcontainer/overrides.mk b/.devcontainer/overrides.mk index e3d01cf..8fa51b1 100644 --- a/.devcontainer/overrides.mk +++ b/.devcontainer/overrides.mk @@ -31,3 +31,12 @@ define INSTALL_KPT_PACKAGE echo -e "--> INSTALL: [\033[0;32m$2\033[0m] - Applied and reconciled package" ;\ } endef + +.PHONY: patch-codespaces-engineconfig +patch-codespaces-engineconfig: | $(YQ) $(KPT_PKG) ## Patch the EngineConfig manifest to add codespaces custom settings + @{ \ + echo "--> INFO: Patching EngineConfig manifest for codespaces" ;\ + ENGINE_CONFIG_FILE="$(KPT_CORE)/engine-config/engineconfig.yaml" ;\ + if [[ ! -f "$$ENGINE_CONFIG_FILE" ]]; then (echo "[ERROR] EngineConfig manifest not found at $$ENGINE_CONFIG_FILE" && exit 1); fi ;\ + $(YQ) eval '.spec.customSettings = load("$(CODESPACES_ENGINECONFIG_CUSTOM_SETTINGS_PATCH)").customSettings' -i "$$ENGINE_CONFIG_FILE" ;\ + } \ No newline at end of file diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index 4f64174..b9fcc67 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -18,4 +18,7 @@ TOKEN="${prefix}${suffix}" docker cp /home/vscode/.images.txt eda-demo-control-plane:/opt/images.txt docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc) -I {} crictl pull --creds nokia-eda-bot:$TOKEN {}" -make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file +make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE + +# apply keycloak patch for codespaces redirects +make -f Makefile -f $TRY_EDA_OVERRIDES_FILE patch-codespaces-engineconfig \ No newline at end of file From c3c13bb3683605141cd87dd7c5c5078acc877019 Mon Sep 17 00:00:00 2001 From: hellt Date: Tue, 13 Jan 2026 00:37:42 +0100 Subject: [PATCH 13/16] added the right target --- .devcontainer/overrides.mk | 22 +++++++++++++++++++++- .devcontainer/postCreate.sh | 2 +- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.devcontainer/overrides.mk b/.devcontainer/overrides.mk index 8fa51b1..0ad43f1 100644 --- a/.devcontainer/overrides.mk +++ b/.devcontainer/overrides.mk @@ -39,4 +39,24 @@ patch-codespaces-engineconfig: | $(YQ) $(KPT_PKG) ## Patch the EngineConfig mani ENGINE_CONFIG_FILE="$(KPT_CORE)/engine-config/engineconfig.yaml" ;\ if [[ ! -f "$$ENGINE_CONFIG_FILE" ]]; then (echo "[ERROR] EngineConfig manifest not found at $$ENGINE_CONFIG_FILE" && exit 1); fi ;\ $(YQ) eval '.spec.customSettings = load("$(CODESPACES_ENGINECONFIG_CUSTOM_SETTINGS_PATCH)").customSettings' -i "$$ENGINE_CONFIG_FILE" ;\ - } \ No newline at end of file + } + +.PHONY: configure-codespaces-keycloak +configure-codespaces-keycloak: | $(KUBECTL) ## Configure Keycloak frontendUrl for GitHub Codespaces + @if [ -n "$(CODESPACE_NAME)" ] && [ -n "$(GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN)" ]; then \ + CODESPACE_URL="https://$(CODESPACE_NAME)-9443.$(GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN)" ;\ + KC_URL="https://eda-keycloak:9443/core/httpproxy/v1/keycloak" ;\ + echo "--> INFO: Configuring Keycloak frontendUrl for Codespaces..." ;\ + $(KUBECTL) wait --for=condition=ready pod -l eda.nokia.com/app=keycloak -n $(EDA_CORE_NAMESPACE) --timeout=300s ;\ + TOKEN=$$($(KUBECTL) exec -n $(EDA_CORE_NAMESPACE) deploy/eda-toolbox -- curl -sk -X POST \ + "$${KC_URL}/realms/master/protocol/openid-connect/token" \ + -d "username=admin" -d "password=admin" -d "grant_type=password" -d "client_id=admin-cli" | jq -r '.access_token') ;\ + $(KUBECTL) exec -n $(EDA_CORE_NAMESPACE) deploy/eda-toolbox -- curl -sk -X PUT \ + "$${KC_URL}/admin/realms/eda" \ + -H "Authorization: Bearer $${TOKEN}" \ + -H "Content-Type: application/json" \ + -d "{\"attributes\": {\"frontendUrl\": \"$${CODESPACE_URL}/core/httpproxy/v1/keycloak\"}}" ;\ + echo "--> INFO: Keycloak frontendUrl set to: $${CODESPACE_URL}/core/httpproxy/v1/keycloak" ;\ + else \ + echo "--> INFO: Not running in Codespaces, skipping Keycloak frontendUrl configuration" ;\ + fi \ No newline at end of file diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index b9fcc67..1fcbbd6 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -21,4 +21,4 @@ docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE # apply keycloak patch for codespaces redirects -make -f Makefile -f $TRY_EDA_OVERRIDES_FILE patch-codespaces-engineconfig \ No newline at end of file +make -f Makefile -f $TRY_EDA_OVERRIDES_FILE configure-codespaces-keycloak KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file From 3b6b28c359864a0e1ca647a4db5718de6b817857 Mon Sep 17 00:00:00 2001 From: hellt Date: Tue, 13 Jan 2026 10:42:27 +0100 Subject: [PATCH 14/16] try an override of deps in make for kc patching --- .devcontainer/overrides.mk | 3 +++ .devcontainer/postCreate.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/overrides.mk b/.devcontainer/overrides.mk index 0ad43f1..55b26b4 100644 --- a/.devcontainer/overrides.mk +++ b/.devcontainer/overrides.mk @@ -41,6 +41,9 @@ patch-codespaces-engineconfig: | $(YQ) $(KPT_PKG) ## Patch the EngineConfig mani $(YQ) eval '.spec.customSettings = load("$(CODESPACES_ENGINECONFIG_CUSTOM_SETTINGS_PATCH)").customSettings' -i "$$ENGINE_CONFIG_FILE" ;\ } +.PHONY: ls-ways-to-reach-api-server +ls-ways-to-reach-api-server: | $(KUBECTL) configure-codespaces-keycloak + .PHONY: configure-codespaces-keycloak configure-codespaces-keycloak: | $(KUBECTL) ## Configure Keycloak frontendUrl for GitHub Codespaces @if [ -n "$(CODESPACE_NAME)" ] && [ -n "$(GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN)" ]; then \ diff --git a/.devcontainer/postCreate.sh b/.devcontainer/postCreate.sh index 1fcbbd6..9ec044a 100755 --- a/.devcontainer/postCreate.sh +++ b/.devcontainer/postCreate.sh @@ -21,4 +21,4 @@ docker exec eda-demo-control-plane sh -c "cat /opt/images.txt | xargs -P $(nproc make -f Makefile -f $TRY_EDA_OVERRIDES_FILE try-eda KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE # apply keycloak patch for codespaces redirects -make -f Makefile -f $TRY_EDA_OVERRIDES_FILE configure-codespaces-keycloak KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file +# make -f Makefile -f $TRY_EDA_OVERRIDES_FILE configure-codespaces-keycloak KPT_SETTERS_FILE=$TRY_EDA_KPT_SETTERS_FILE \ No newline at end of file From 78a83fd207cc078a01e92265ef460d75a8af846f Mon Sep 17 00:00:00 2001 From: hellt Date: Tue, 13 Jan 2026 12:02:09 +0100 Subject: [PATCH 15/16] give k apply some time --- .devcontainer/overrides.mk | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.devcontainer/overrides.mk b/.devcontainer/overrides.mk index 55b26b4..cffa049 100644 --- a/.devcontainer/overrides.mk +++ b/.devcontainer/overrides.mk @@ -62,4 +62,16 @@ configure-codespaces-keycloak: | $(KUBECTL) ## Configure Keycloak frontendUrl fo echo "--> INFO: Keycloak frontendUrl set to: $${CODESPACE_URL}/core/httpproxy/v1/keycloak" ;\ else \ echo "--> INFO: Not running in Codespaces, skipping Keycloak frontendUrl configuration" ;\ - fi \ No newline at end of file + fi + + +.PHONY: metallb-operator +metallb-operator: | $(BASE) $(BUILD) $(KUBECTL) ; $(info --> LB: Loading the load balancer, metallb in the cluster) + @{ \ + $(KUBECTL) apply -f $(CFG)/metallb-native.yaml | $(INDENT_OUT) ;\ + sleep 5 ;\ + $(KUBECTL) wait --namespace metallb-system \ + --for=condition=ready pod \ + --selector=app=metallb \ + --timeout=120s | $(INDENT_OUT);\ + } \ No newline at end of file From db30032fd6d89f2a9d977b4cdcbd3978c0c476be Mon Sep 17 00:00:00 2001 From: hellt Date: Tue, 13 Jan 2026 12:29:15 +0100 Subject: [PATCH 16/16] wait longer --- .devcontainer/overrides.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/overrides.mk b/.devcontainer/overrides.mk index cffa049..44eb1c4 100644 --- a/.devcontainer/overrides.mk +++ b/.devcontainer/overrides.mk @@ -69,7 +69,7 @@ configure-codespaces-keycloak: | $(KUBECTL) ## Configure Keycloak frontendUrl fo metallb-operator: | $(BASE) $(BUILD) $(KUBECTL) ; $(info --> LB: Loading the load balancer, metallb in the cluster) @{ \ $(KUBECTL) apply -f $(CFG)/metallb-native.yaml | $(INDENT_OUT) ;\ - sleep 5 ;\ + sleep 15 ;\ $(KUBECTL) wait --namespace metallb-system \ --for=condition=ready pod \ --selector=app=metallb \