Skip to content

feat(operator): declarative-management marker (server + console) - #17

Closed
fcraviolatti wants to merge 1 commit into
feat/operator-event-stream-auditfrom
feat/operator-managed-marker
Closed

feat(operator): declarative-management marker (server + console)#17
fcraviolatti wants to merge 1 commit into
feat/operator-event-stream-auditfrom
feat/operator-managed-marker

Conversation

@fcraviolatti

Copy link
Copy Markdown
Contributor

Records which resources are owned by the Kubernetes operator so the console and API can warn that out-of-band edits will be reverted at the next reconcile.

Stacked on feat/operator-event-stream-audit (the marker code sits next to the audit/event-stream hooks in the same handlers, so it can't cleanly rebase onto main until that lands). Re-target to main once the base merges.

Server

  • Migration 000179: nullable managed_by / managed_ref on the 8 operator-reconciled tables (oidc_clients, roles, groups, org_auth_policies, webhooks, identity_providers, org_password_policy, org_rate_limits).
  • Shared ApplyManagedMarker + header parser (X-Clavex-Managed-By / -Ref / -Release). Create/update handlers stamp the marker only when the operator sends the header; an ordinary UI/API update never disturbs an existing marker. GET/List expose both fields.
  • Disown: X-Clavex-Managed-Release header, plus dedicated DELETE .../password-policy/managed-marker and .../rate-limits/managed-marker endpoints that clear the marker while preserving the live settings.

Console

  • Shared ManagedBadge (warn-only — fields stay editable) on clients, roles, groups, webhooks, identity providers and auth policies, and per-section on the org password-policy and rate-limit settings.

Pairs with clavex-sdk-go v0.3.0 and the clavex-operator marker PR.

Migration 000179 adds nullable managed_by/managed_ref to the 8 tables the
Kubernetes operator reconciles (oidc_clients, roles, groups, org_auth_policies,
webhooks, identity_providers, org_password_policy, org_rate_limits). A shared
ApplyManagedMarker + header parser (X-Clavex-Managed-By / -Ref / -Release) let
create/update handlers stamp the marker only when the operator sends the header;
an ordinary UI/API update never disturbs an existing marker. GET/List expose the
fields. Disown is explicit via X-Clavex-Managed-Release and dedicated
DELETE .../managed-marker endpoints for the org password-policy / rate-limit
sections (clear the marker, keep the values).

Console: shared ManagedBadge (warn-only, fields stay editable) on the clients,
roles, groups, webhooks, identity-provider and auth-policy views, and per-section
on the org password-policy and rate-limit settings.
@fcraviolatti
fcraviolatti deleted the branch feat/operator-event-stream-audit July 20, 2026 07:12
@fcraviolatti
fcraviolatti deleted the feat/operator-managed-marker branch July 20, 2026 07:14
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