-
Notifications
You must be signed in to change notification settings - Fork 0
ci(bayn): add post-deploy production gate #13392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gregkonush
wants to merge
14
commits into
main
Choose a base branch
from
codex/bayn-post-deploy-verify-p1-20260729
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
599b0e1
ci(bayn): add post-deploy production gate
gregkonush 630a18e
fix(bayn): tolerate Argo sync resource shape
gregkonush e6b4fee
fix(bayn): bound post-deploy verifier operations
gregkonush c7fa4ae
fix(bayn): harden selective sync verification
gregkonush 3242835
fix(bayn): accept exact selective syncs
gregkonush 6522cc9
fix(bayn): probe destructive subresources
gregkonush ed03797
fix(bayn): require reconciliation evidence
gregkonush e6c74fa
fix(bayn): enforce reconciliation freshness
gregkonush 175a371
fix(bayn): deny proxy mutation authority
gregkonush be718bd
fix(bayn): reject stale health evidence
gregkonush 7d6482d
fix(bayn): audit named production permissions
gregkonush 6831df1
fix(bayn): reject named secret disclosure
gregkonush cffa4e5
fix(bayn): harden secret and descendant proof
gregkonush fb4ad94
fix(bayn): scope wildcard secret rules
gregkonush File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| name: bayn-post-deploy-verify | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| paths: | ||
| - 'argocd/applications/bayn/deployment.yaml' | ||
| - 'argocd/applications/bayn/kustomization.yaml' | ||
|
|
||
| concurrency: | ||
| group: bayn-post-deploy-verify-main | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| verify: | ||
| runs-on: arc-amd64 | ||
| timeout-minutes: 20 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout exact promoted main revision | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| ref: ${{ github.sha }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Bun | ||
| uses: oven-sh/setup-bun@v2 | ||
| with: | ||
| bun-version: 1.3.14 | ||
|
|
||
| - name: Set up kubectl | ||
| uses: azure/setup-kubectl@v5 | ||
| with: | ||
| version: v1.35.0 | ||
|
|
||
| - name: Configure in-cluster kubeconfig | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| if kubectl config current-context >/dev/null 2>&1; then | ||
| exit 0 | ||
| fi | ||
| test -n "${KUBERNETES_SERVICE_HOST:-}" | ||
| test -n "${KUBERNETES_SERVICE_PORT:-}" | ||
| test -r /var/run/secrets/kubernetes.io/serviceaccount/token | ||
| test -r /var/run/secrets/kubernetes.io/serviceaccount/ca.crt | ||
|
|
||
| kubeconfig="${RUNNER_TEMP}/kubeconfig" | ||
| echo "KUBECONFIG=${kubeconfig}" >> "${GITHUB_ENV}" | ||
| kubectl config set-cluster in-cluster \ | ||
| --server="https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}" \ | ||
| --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt \ | ||
| --embed-certs=true \ | ||
| --kubeconfig="${kubeconfig}" | ||
| kubectl config set-credentials gha-runner \ | ||
| --token="$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)" \ | ||
| --kubeconfig="${kubeconfig}" | ||
| kubectl config set-context in-cluster \ | ||
| --cluster=in-cluster \ | ||
| --user=gha-runner \ | ||
| --namespace=bayn \ | ||
| --kubeconfig="${kubeconfig}" | ||
| kubectl config use-context in-cluster --kubeconfig="${kubeconfig}" | ||
|
|
||
| - name: Verify exact Bayn production promotion | ||
| shell: bash | ||
| env: | ||
| EXPECTED_ARGO_REVISION: ${{ github.sha }} | ||
| run: | | ||
| set -euo pipefail | ||
| bun scripts/bayn-post-deploy-verify.ts \ | ||
| --expected-revision "${EXPECTED_ARGO_REVISION}" \ | ||
| --deadline-seconds 900 \ | ||
| --interval-seconds 10 | ||
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
arc-amd64scale set runs asarc-amd64-gha-rs-no-permission, but the bindings inspected inargocd/applications/agents-ci/runner-rbac-cluster.yamlgrant that identity reads for Argo applications and deployments only; they do not grant the podlistorservices/proxygetpermissions required byvalidateReadOnlyPermissions. Consequently every triggered deployment gate exits withRBAC_DENIEDbefore taking a snapshot, so add the Bayn-scoped read bindings or select an appropriately authorized runner identity.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed as a real deployment blocker. The selected
arc-amd64-gha-rs-no-permissionidentity has read-only Argo/Deployment access but lacks Bayn Pod reads andservices/proxy; the existingarc-arm64-gha-rs-kube-modeidentity can read Pods/proxy but also has Argo mutation authority, so it does not satisfy the required minimum read-only contract. No existing runner identity satisfies all requirements. Adding the missing Bayn-scoped Role/RoleBinding or changing runner permissions is explicitly outside this task’s ownership (do not touch manifests ... branch/environment permissions). The verifier therefore correctly remains fail-closed withRBAC_DENIED; I am not marking this thread resolved or merging a gate that cannot run.