Repository navigation
Resolve sandbox and tenant namespaces from env, not hardcoded names - #3
Merged
Merged
Conversation
The verify skill hardcoded `sdlc-sandboxes` and `pr-test-mr-<iid>`. Both
are cluster-wide names, so on a shared cluster every tenant used the same
ones. The skill writes the tenant's GitLab PAT into the sandbox as Secret
gitlab-pat, so sharing it exposes one tenant's PAT to another tenant's
verify Jobs; and Job idempotency keys on mr-iid, which restarts at 1 per
project, so two tenants with an open !1 find and delete each other's Jobs.
Worse, the Nexus lookup did:
TENANT_NS=$(oc get cm tenant-integration -A -o jsonpath='{.items[0].metadata.namespace}')
There are two tenant-integration ConfigMaps per tenant, so items[0] can
resolve a different tenant and point the verify build at their Nexus.
The bootstrap-tenant chart now injects LIGHTWELL_GUID, TENANT_NAMESPACE,
SDLC_SANDBOX_NAMESPACE, EPHEMERAL_NS_PREFIX, NEXUS_NAMESPACE and
NEXUS_REPOSITORIES into the OpenCode pod, so read those instead of
discovering anything. Chart side: rhpds/lightwell-workshop@3e1f780.
These prompts are baked into the image at build time (container/Dockerfile
COPY .opencode), so this takes effect on the next image build, not on
merge.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
blues-man
added a commit
to rhpds/lightwell-workshop
that referenced
this pull request
Oct 7, 2026
rhpds/lw-sdlc-opencode#3 is merged, but every Actions run on that repo since 2026-10-07 ends in startup_failure with zero jobs allocated, so CI never published a sha-* tag for it. The workflow file is byte-identical to the one behind the last green run and parses fine, so the cause is on the org/policy side, not in the repo. Built main @ 5e19550 by hand for linux/amd64 and pushed it to quay.io/bluesman. It is bit-identical to the sandbox-ns-test image this pinned before -- same tag now just names a commit instead of a branch experiment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The verify skill hardcodes
sdlc-sandboxesandpr-test-mr-<iid>. Both are cluster-wide names, so on a shared cluster every tenant uses the same ones. ArgoCD surfaced it first as contested ownership:Only one tenant reports Healthy; the rest fight over it. But the ownership conflict is the mildest symptom:
oc create secret generic gitlab-pat -n sdlc-sandboxes— every tenant writes its GitLab PAT into the shared namespace, where every other tenant's verify Jobs run.-l mr-iid=<iid>, and MR iids restart at!1per project. Two tenants with an open!1find each other's Jobs — and the skill deletes a failed one before re-applying.oc get cm tenant-integration -A -o jsonpath='{.items[0].metadata.namespace}'. There are two such ConfigMaps per tenant, soitems[0]can resolve a different tenant entirely and point the Maven build at their Nexus.Change
Stop discovering, start reading injected env.
rhpds/lightwell-workshop@3e1f780adds to the OpenCode pod:LIGHTWELL_GUID49t9bTENANT_NAMESPACElightwell-tenant-49t9bSDLC_SANDBOX_NAMESPACEsdlc-sandboxes-49t9bEPHEMERAL_NS_PREFIXpr-test-mr-49t9bNEXUS_NAMESPACElightwell-nexus-49t9bNEXUS_REPOSITORIESredhat-packages-validated-49t9b,redhat-packages-remediated-49t9b.opencode/agents/mr-verifier.mdand.opencode/skills/mr-verify-ephemeral/SKILL.mdnow use$SDLC_SANDBOX_NAMESPACEand${EPHEMERAL_NS_PREFIX}-<iid>.README.mdandspec.mdupdated to the-<guid>forms.Ordering
These prompts are baked in at build time (
container/Dockerfile:COPY .opencode /app/.opencode), so this takes effect on the next image build, not on merge. Build the image before the chart rename reaches a tenant — renaming the namespace while the running image still sayssdlc-sandboxesbreaks MR verification. The reverse order is safe: a new image with$SDLC_SANDBOX_NAMESPACEunset fails loudly rather than silently using a shared namespace.🤖 Generated with Claude Code