Skip to content

PolicyServer leader controller #1108

@fabriziosestito

Description

@fabriziosestito

The leader reconciler will be responsible for pulling policies from the registry, validating policy settings, precompiling the policy, and storing it in the shared cache.

Implement a leader election mechanism to ensure that only one Policy Server instance acts as a leader at a time.

References

Acceptance criteria

  • Implement leader election using Kubernetes Leases via the kubert crate
  • Create leader reconciliation loop to process new/updated PolicyRevisions
  • Implement policy pulling, validation, and precompilation in the leader
  • Store the precompiled modules in a volume
  • Handle Wasmtime version compatibility across different versions
  • Update PolicyRevision status conditions (Scheduled, Initialized)
  • Implement cleanup mechanism for old policies in the shared cache
  • Ensure proper handover of leader responsibilities during failover

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions