Repository navigation
Conversation
Parse --build org/repo=ref flags from /run-e2e comments to build dependency images from custom branches, PRs, or commits. Examples: /run-e2e --build kagenti/kagenti-extensions=fix/my-branch /run-e2e --build kagenti/kagenti-extensions=pr/234 /run-e2e --build kagenti/kagenti-extensions=a5607f9 /run-e2e --build kagenti/kagenti-extensions=pr/234 --build kagenti/kagenti-operator=feat/new-crd Security: only repos in the allow list are accepted (kagenti/kagenti-extensions, kagenti/kagenti-operator). Backwards compatible with --extensions-ref. Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
…orward ## What broke PR rossoctl#933 merged the custom `kagenti-authbridge` SCC for OpenShift agent namespaces. This SCC is needed because the kagenti-webhook injects an AuthBridge sidecar stack into agent pods (proxy-init, envoy, spiffe-helper, client-registration) that requires specific UIDs and NET_ADMIN/NET_RAW capabilities. Shortly after, kagenti-extensions#242 and rossoctl#250 merged, which: 1. Replaced privileged mode with NET_ADMIN/NET_RAW capabilities in the webhook (good) 2. Started pushing :latest image tags on every merge to main (good) 3. But the :latest proxy-init image now requires POD_IP env var that the OLD webhook chart (v0.4.0-alpha.5) doesn't inject (broke CI) This created a version mismatch: the packaged webhook chart (v0.4.0-alpha.5) creates init containers WITHOUT the POD_IP env var, but pulls proxy-init:latest which now requires it. Result: proxy-init CrashLoopBackOff on every CI run. ## Why these fixes must be combined The fixes span SCC configuration, image builds, and deploy scripts because the root cause is a version mismatch between the packaged chart dependency and unreleased upstream fixes. Until kagenti-extensions releases a new chart version (>= v0.4.0-alpha.9), CI must build the webhook from source. ## Fixes **SCC (OpenShift):** - Custom `kagenti-authbridge` SCC: allows NET_ADMIN/NET_RAW + RunAsAny UID - Relaxed requiredDropCapabilities from ALL to MKNOD (sidecars don't specify drop:ALL, causing pod rejection) - Explicit ClusterRole (OpenShift doesn't auto-create for custom SCCs) **Dependency builds from source:** - Generic `30-build-dep-image.sh`: builds any dep from branch, tag, pr/<number>, or commit SHA - Registry `31-build-deps-from-refs.sh`: maps repos to build configs with allow list (kagenti-extensions, kagenti-operator) - Hardcoded default: builds kagenti-extensions@main on both Kind and HyperShift until the chart dependency is bumped - /run-e2e --build org/repo=ref for ad-hoc overrides (after merge) **Port-forward (Kind):** - Use kubectl wait for deployment readiness instead of kubectl exec (exec targets injected sidecar container, not the agent) ## After kagenti-extensions releases new chart Remove the hardcoded KAGENTI_DEP_BUILDS defaults from: - .github/scripts/hypershift/ci/70-deploy-kagenti.sh - .github/scripts/local-setup/kind-full-test.sh And bump Chart.yaml: kagenti-webhook-chart >= v0.4.0-alpha.9 Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
…elm upgrade Two fixes from review feedback: 1. Kind CI: The workflow runs individual scripts, not kind-full-test.sh, so the dep build step was never executed. Add it to both e2e-kind-pr.yaml and e2e-kind.yaml between CRD wait and agent deploy. 2. HyperShift: helm upgrade --reuse-values can drop resources (SCCs, RoleBindings) when values are re-merged. Replace helm upgrade with kubectl set image to patch the deployment directly, avoiding any changes to helm release state. Also move the hardcoded KAGENTI_DEP_BUILDS default into 31-build-deps-from-refs.sh so it works both when called from deploy scripts and from workflow steps. Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The webhook binary references proxy-init:latest from GHCR. Rebuilding only the webhook doesn't fix proxy-init CrashLoopBackOff because the init container still pulls the incompatible :latest image from GHCR. Build proxy-init from the same extensions ref, tag as both :local and :latest, and load into Kind so it uses the local image. Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
…orward SCC fixes: - Custom kagenti-authbridge SCC (NET_ADMIN/NET_RAW, RunAsAny, MKNOD drop) - Explicit ClusterRole for custom SCC Dependency builds from source: - Generic 30-build-dep-image.sh (branch, tag, pr/<N>, commit SHA) - Builds both webhook AND proxy-init from extensions@main - DEP_SKIP_PATCH for init container images (no deployment to patch) - Hardcoded default until webhook chart is bumped past v0.4.0-alpha.8 - /run-e2e --build org/repo=ref for ad-hoc overrides (after merge) - Added dep build step to Kind CI workflows (e2e-kind-pr, e2e-kind) Port-forward: - kubectl wait for deployment readiness (not kubectl exec into sidecar) Deploy script: - kubectl set image instead of helm upgrade --reuse-values - Logs all overrides to CI output and GitHub step summary Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The bash-based comment parser used ${{ github.event.comment.body }}
in shell context, which is vulnerable to command injection (same issue
fixed by rossoctl#1012 for --extensions-ref).
Rewrite the entire parser using actions/github-script (JavaScript)
where comment body is accessed via context.payload.comment.body safely.
Add strict regex validation for repo names and ref patterns.
Signed-off-by: Ladislav Smola <[email protected]>
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Ladislav Smola <[email protected]>
build.yaml: Move github.ref_name into env var to prevent shell injection via crafted git tags (e.g., v$(malicious-command)). cleanup-stale-hypershift-clusters.yaml: Move github.event.inputs.* into env vars to prevent injection via workflow_dispatch inputs. Both follow the pattern from rossoctl#1012: never interpolate user-controlled GitHub context values directly into shell run: blocks. Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
The webhook ConfigMap pins proxy-init to v0.4.0-alpha.8 (from charts/kagenti/values.yaml), not :latest. Our local build was only tagged as :local and :latest, so Kind pulled v0.4.0-alpha.8 from GHCR (the broken version). Now scan values.yaml for all version tags referencing the image and tag the local build with each one. This ensures the locally-built image is used regardless of which tag the webhook ConfigMap requests. Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
On OpenShift, built images go to the internal registry but the webhook ConfigMap still references GHCR images (v0.4.0-alpha.8). Patch the ConfigMap after building to point to internal registry images, then restart the webhook to pick up the new config. Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Shipwright Build v1beta1 uses strict decoding and rejects unknown fields. serviceAccount is a BuildRun field, not a Build field. The BuildRun already sets serviceAccount: pipeline correctly. Fixes: strict decoding error on HyperShift E2E Signed-off-by: Ladislav Smola <[email protected]> Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Tests if extensions PR rossoctl#242 (remove privileged init container) introduced the SCC rejection. Pins to commit before that merge. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Ladislav Smola <[email protected]>
Contributor
Author
|
/run-e2e |
E2E HyperShift Tests FailedCommit: To re-run tests after fixing issues, comment |
Contributor
Author
|
Shadow test complete — pinned ref not fetchable. Debugging live. |
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.
Shadow PR to isolate SCC failure. Pins extensions to
1a644f30(before PR #242 "remove privileged init").Hypothesis: If this passes, extensions PR #242 broke the sidecar injection.
Companion to #1024. Delete after testing.