Skip to content

🔒 Namespaced mode (WATCH_NAMESPACES) + planeodev image build - #1

Merged
marcellodesales merged 3 commits into
planeo/mainfrom
feat/namespaced-mode
Nov 17, 2026
Merged

marcellodesales merged 3 commits into
planeo/mainfrom
feat/namespaced-mode

Conversation

@marcellodesales

Copy link
Copy Markdown

What

The first Planeo patch on the fork (design 0001 §3.7 / 0002 — https://github.com/ohanalabs-ai/intelligent-engagement-os/pull/1):

  • WATCH_NAMESPACES="ns-a,ns-b" restricts the controller-runtime cache to those namespaces (cluster-scoped PaperclipClusterDefaults stays cluster-wide). The operator then runs with RoleBindings per watched namespace plus a read-only cluster role, instead of upstream's cluster-wide ClusterRoleBinding.
  • In that mode the operator refuses the two features that need cluster-scoped RBAC (multi-namespace cloud sandbox, Kubernetes execution mode) with a clear error instead of escalating, and the finalizer skips the cluster-scoped cleanup (it never created anything cluster-scoped).
  • Unset = upstream behaviour, byte for byte.
  • The planeodev Vionix CI caller → ghcr.io/planeodev/paperclip-operator:<branch>-<sha7>; PLANEO.md documents the fork. Upstream's Release / Release Please / OperatorHub / Docs workflows are disabled in this fork (never publish under paperclipinc).

Why

Upstream v0.19.1's ClusterRole (Secrets in every namespace, pods/exec, namespace create/delete, ClusterRole/ClusterRoleBinding writes) bound cluster-wide is cluster-admin-equivalent on planeo-prod, which runs Vault, authentik and every tenant.

Evidence

  • go build ./..., go vet, go test ./cmd/... (parser test) pass locally.
  • kind proof (operator with RoleBindings only, an Instance reconciled, no Forbidden): to be posted as a comment before merge.

Follow-ups

  • Upstream PR to stubbi/paperclip-operator (design 0001 §3.7: re-open the fork choice if not merged 90 days after P2).
  • planeodev/planeo-infra add-on addons/product/paperclip-operator pins the image built from this PR's merge commit.

…scoped RBAC in that mode

The chart binds a ClusterRole with Secrets everywhere, pods/exec, namespace
create/delete and ClusterRole/ClusterRoleBinding writes cluster-wide. On a shared
platform cluster that is cluster-admin-equivalent. With WATCH_NAMESPACES set the
manager caches only those namespaces (cluster-scoped kinds stay cluster-wide), so
it runs on RoleBindings per namespace; features that need cluster RBAC
(multi-namespace sandbox, Kubernetes execution mode) fail loudly instead of
escalating, and the finalizer skips the cluster-scoped cleanup.

Also: the planeodev Vionix CI caller (ghcr.io/planeodev/paperclip-operator) and PLANEO.md.

Co-Authored-By: Claude <noreply@anthropic.com>
@marcellodesales marcellodesales self-assigned this Nov 17, 2026
…nputs), PRs from any branch

dockerhub-registry-token is no longer an input of the shared pipeline, so the
call failed at startup with no jobs.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Docker image metadata — ghcr.io/planeodev/paperclip-operator:planeo-main-59d1a1e

Property Value
Ref planeo/main
Image ghcr.io/planeodev/paperclip-operator
Digest sha256:c8cef2167f37f4e288e1af6035efb8f1c4d42e0b1b46937974ae797757c923a5
Subject ghcr.io/planeodev/paperclip-operator@sha256:c8cef2167f37f4e288e1af6035efb8f1c4d42e0b1b46937974ae797757c923a5
Provenance ✅ verified (github)
Workflow run View verification run

Tags

ghcr.io/planeodev/paperclip-operator:planeo-main-59d1a1e

SLSA verification (merge/ref build)

  • Status: ✅ Verified (github)
  • Attested by: github
  • Declared SLSA posture: Build Level 2

Note

The SLSA Build level is declared by the workflow caller based on
the pipeline architecture. gh attestation verify / cosign verify
check the attestation, subject and signer identity; they do not
calculate or certify a SLSA Build level.

  • Ref: planeo/main
  • Image: ghcr.io/planeodev/paperclip-operator
  • Digest: sha256:c8cef2167f37f4e288e1af6035efb8f1c4d42e0b1b46937974ae797757c923a5
  • Subject: ghcr.io/planeodev/paperclip-operator@sha256:c8cef2167f37f4e288e1af6035efb8f1c4d42e0b1b46937974ae797757c923a5
  • Signer workflow: ohanalabs-ai/github-platform/.github/workflows/docker-multiarch-cicd.yaml

Verify with GitHub CLI

gh attestation verify oci://ghcr.io/planeodev/paperclip-operator@sha256:c8cef2167f37f4e288e1af6035efb8f1c4d42e0b1b46937974ae797757c923a5 --repo planeodev/paperclip-operator --signer-workflow ohanalabs-ai/github-platform/.github/workflows/docker-multiarch-cicd.yaml

Authentication may be required. Run gh auth login or set GH_TOKEN before verification.

Verification details
$ gh attestation verify oci://ghcr.io/planeodev/paperclip-operator@sha256:c8cef2167f37f4e288e1af6035efb8f1c4d42e0b1b46937974ae797757c923a5 --repo planeodev/paperclip-operator --signer-workflow ohanalabs-ai/github-platform/.github/workflows/docker-multiarch-cicd.yaml
exit=0

@marcellodesales

Copy link
Copy Markdown
Author

kind proof (2026-11-17), image built from this branch (docker build), installed with the planeo-infra overlay https://github.com/planeodev/planeo-infra/pull/684 (chart ClusterRoleBinding deleted, RoleBinding in paperclip-planeo only, WATCH_NAMESPACES=paperclip-planeo):

  • log: namespaced mode: watching only these namespaces; cluster-scoped RBAC is refused {"namespaces": ["paperclip-planeo"]}
  • Instance in paperclip-planeo → Running (restricted PSA, seLinuxRelabel: false), /api/health → ok
  • Instance in a non-watched namespace → no status (ignored)
  • operator log: 0 Forbidden
  • can-i as the SA: get secrets -n kube-system no, list secrets -A no, create clusterrolebindings no, create namespaces no, create pods/exec -n kube-system no; create statefulsets/secrets -n paperclip-planeo yes
    Not exercised: the refusal paths (multi-namespace sandbox / Kubernetes execution mode) — not used by Planeo.

…po has no Python)

Co-Authored-By: Claude <noreply@anthropic.com>
@marcellodesales
marcellodesales merged commit 59d1a1e into planeo/main Nov 17, 2026
8 checks passed
@marcellodesales
marcellodesales deleted the feat/namespaced-mode branch November 17, 2026 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant