Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ ai-serving-deploy-existing-openshift: ## Deploy AI serving on existing OpenShift
--namespace $(AI_NAMESPACE) --create-namespace \
-f $(DEPLOY_VALUES_DIR)/values-platform-config.yaml \
--set namespace=$(AI_NAMESPACE) \
--set pca-guardrails.namespace=$(AI_NAMESPACE) \
--set hfToken.raw=$(HF_TOKEN) \
$(MCP_FLAGS)
helm upgrade --install $(AI_NAMESPACE)-ai-serving $(CHARTS_DIR)/pca-ai-serving \
Expand Down Expand Up @@ -90,13 +91,16 @@ devspace-deploy-existing-openshift: ## Deploy a devspace (DEV_NAMESPACE=, AI_NAM
oc annotate namespace $(DEV_NAMESPACE) \
che.eclipse.org/username=$(DEV_USER) --overwrite; \
fi
$(eval SKIP_OPENCODE_BUILD := $(if $(filter-out continue,$(TYPE)),\
$(shell oc get buildconfig devspaces-opencode -n opencode-build --no-headers --ignore-not-found | grep -q . && echo true),))
helm upgrade --install $(DEV_NAMESPACE)-devspaces $(CHARTS_DIR)/pca-devspaces \
--namespace $(DEV_NAMESPACE) --create-namespace \
$(if $(filter continue,$(TYPE)),-f $(DEPLOY_VALUES_DIR)/values-devspaces-continue.yaml,-f $(DEPLOY_VALUES_DIR)/values-devspaces.yaml) \
--set aiServingNamespace=$(AI_NAMESPACE) \
--set devspaces[0].user=$(DEV_USER) \
$(if $(filter true,$(MCP_ENABLED)),--set mcp.enabled=true,) \
$(HELM_ARGS)
$(HELM_ARGS) \
$(if $(filter true,$(SKIP_OPENCODE_BUILD)),--set opencodeBuild.enabled=false,)

devspace-undeploy-existing-openshift: ## Remove a devspace (DEV_NAMESPACE=)
@if [ -z "$(DEV_NAMESPACE)" ]; then echo "ERROR: DEV_NAMESPACE is required. Pass DEV_NAMESPACE=<name>"; exit 1; fi
Expand Down
5 changes: 5 additions & 0 deletions charts/pca-devspaces/templates/opencode-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ metadata:
name: opencode-build
annotations:
argocd.argoproj.io/sync-wave: "1"
helm.sh/resource-policy: keep
---
apiVersion: image.openshift.io/v1
kind: ImageStream
Expand All @@ -22,6 +23,7 @@ metadata:
namespace: opencode-build
annotations:
argocd.argoproj.io/sync-wave: "1"
helm.sh/resource-policy: keep
---
apiVersion: build.openshift.io/v1
kind: BuildConfig
Expand All @@ -30,6 +32,7 @@ metadata:
namespace: opencode-build
annotations:
argocd.argoproj.io/sync-wave: "2"
helm.sh/resource-policy: keep
spec:
output:
to:
Expand Down Expand Up @@ -70,6 +73,7 @@ metadata:
namespace: opencode-build
annotations:
argocd.argoproj.io/sync-wave: "2"
helm.sh/resource-policy: keep
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand All @@ -86,6 +90,7 @@ metadata:
namespace: opencode-build
annotations:
argocd.argoproj.io/sync-wave: "2"
helm.sh/resource-policy: keep
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down
5 changes: 5 additions & 0 deletions deploy_existing_openshift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ make devspace-deploy-existing-openshift DEV_NAMESPACE=hadar-devspaces DEV_USER=h
HELM_ARGS='--set devspacesGlobalConfig.enabled=false'
```

> **OpenCode build:** `opencode-build` is cluster-singleton infrastructure owned by the first Helm release. The Makefile auto-detects whether it already exists and suppresses `opencodeBuild` for subsequent runs. If deploying manually with `helm upgrade --install`, pass `--set opencodeBuild.enabled=false` from the second developer onward.
>
> **Do not uninstall** the release that owns `opencode-build` while other OpenCode workspaces exist — doing so deletes the BuildConfig and ImageStream (the Namespace is kept), breaking image pulls for all running workspaces. Recovery: delete the empty namespace (`oc delete namespace opencode-build`), then re-run any opencode devspace deploy without `--set opencodeBuild.enabled=false` to recreate the full build infrastructure.

## Parameters

| Variable | Default | Used by | Notes |
Expand All @@ -64,6 +68,7 @@ make devspace-deploy-existing-openshift DEV_NAMESPACE=hadar-devspaces DEV_USER=h
| Flag | When |
|------|------|
| `--set devspacesGlobalConfig.enabled=false` | 2nd+ developer (avoid Helm ownership of global ConfigMaps in `openshift-devspaces`) |
| `--set opencodeBuild.enabled=false` | 2nd+ opencode developer — avoids Helm ownership conflict on the shared `opencode-build` namespace (Makefile detects this automatically) |
| `--set pca-observability.langfuse.enabled=true` | Opt in Langfuse (+ OTel) with AI serving |
| `--set guardrails.enabled=true --set guardrails.endpoint=http://guardrails-proxy.<AI_NS>.svc.cluster.local:8080` | Route IDE chat through guardrails on a devspace |
| `--set aiGateway.escapeHatchToLlmd=true` | Skip RHCL; IDEs call llm-d Gateway directly |
Expand Down
2 changes: 1 addition & 1 deletion deploy_existing_openshift/values-platform-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ devspaces:
# Guardrails sub-chart config. Set guardrails.enabled: true in the parent to enable.
# To add secret patterns, append regex to pca-guardrails.guardrails.detectors.secretsRegex.patterns.
pca-guardrails:
namespace: hacohen-ai-coder
namespace: ai-serving
guardrails:
enforcement: block
llmService:
Expand Down
Loading