Skip to content

Commit 9c0fc2b

Browse files
committed
fix(demo): ensure HTML content is loaded into ConfigMap
- Change order: deploy manifests first, then update ConfigMap - Use 'oc replace' instead of 'oc apply' for ConfigMap updates - Auto-restart deployment after ConfigMap update to load new content - Fixes blank page issue where placeholder comment was shown Signed-off-by: Yossi Ovadia <[email protected]>
1 parent d95c3a5 commit 9c0fc2b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

deploy/openshift/demo/deploy-flow-viz.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,20 @@ if [ ! -f "$HTML_FILE" ]; then
3434
exit 1
3535
fi
3636

37-
# Create or update ConfigMap with the HTML content
38-
echo -e "${CYAN}📄 Creating ConfigMap with HTML content...${NC}"
37+
# Deploy the nginx service FIRST (creates empty configmap)
38+
echo -e "${CYAN}🚀 Deploying nginx service...${NC}"
39+
oc apply -f "${SCRIPT_DIR}/flow-viz-deployment.yaml" -n "$NAMESPACE"
40+
41+
# Create or update ConfigMap with the actual HTML content
42+
echo -e "${CYAN}📄 Updating ConfigMap with HTML content...${NC}"
3943
oc create configmap flow-visualization-html \
4044
--from-file=index.html="$HTML_FILE" \
4145
-n "$NAMESPACE" \
42-
--dry-run=client -o yaml | oc apply -f -
46+
--dry-run=client -o yaml | oc replace -f -
4347

44-
# Deploy the nginx service
45-
echo -e "${CYAN}🚀 Deploying nginx service...${NC}"
46-
oc apply -f "${SCRIPT_DIR}/flow-viz-deployment.yaml" -n "$NAMESPACE"
48+
# Restart deployment to pick up new HTML content
49+
echo -e "${CYAN}🔄 Restarting deployment to load new content...${NC}"
50+
oc rollout restart deployment/flow-visualization -n "$NAMESPACE"
4751

4852
# Wait for deployment to be ready
4953
echo -e "${CYAN}⏳ Waiting for deployment to be ready...${NC}"

0 commit comments

Comments
 (0)