Skip to content

feature: Add AuthBridge sidecar injection opt-out controls to kagenti UI #836

Description

@cwiklik

Feature Description

Background

The kagenti-webhook now uses an opt-out injection model: any workload labelled
kagenti.io/type=agent or kagenti.io/type=tool automatically receives the full
AuthBridge sidecar set (envoy-proxy, spiffe-helper, kagenti-client-registration,
proxy-init) unless explicitly opted out.

Opt-out is controlled via Kubernetes labels on the workload pod template. The UI
needs to expose these controls so developers don't need to hand-edit deployment YAML.

Injection Decision Model

Stage 1 — whole-workload (any "no" blocks all injection):

Control Kubernetes label Default
Whole-workload opt-out kagenti.io/inject: "disabled" on pod template inject

Stage 2 — per-sidecar (independent, only reached if Stage 1 passes):

Sidecar Kubernetes label Default
Envoy proxy + iptables init kagenti.io/envoy-proxy-inject: "false" inject
SPIFFE helper kagenti.io/spiffe-helper-inject: "false" inject
Keycloak client registration kagenti.io/client-registration-inject: "false" inject

proxy-init always mirrors the envoy-proxy decision and has no independent control.

Proposed Solution

1. Workload Import View — AuthBridge Injection Panel

For any workload of type agent or tool, display an AuthBridge Injection section:

  • Global opt-out toggle — sets/removes kagenti.io/inject: "disabled" on pod template
    labels. When active, shows a badge (e.g. AuthBridge: Disabled) and all per-sidecar
    controls are greyed out.

  • Per-sidecar toggles (active only when global opt-out is OFF):

    Toggle label Sets label Removes label
    Envoy Proxy kagenti.io/envoy-proxy-inject: "false" removes key
    SPIFFE Helper kagenti.io/spiffe-helper-inject: "false" removes key
    Client Registration kagenti.io/client-registration-inject: "false" removes key

    Removing the label (not setting it to "true") restores injection.
    The model is opt-out — absence of the label means inject.

Want to contribute?

  • I would like to work on this issue.

Additional Context

This feature is needed to support changes in kagenti webhook PR: rossoctl/cortex#134

Metadata

Metadata

Assignees

Labels

enhancement

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions