Skip to content

Policy status restructuring #1653

@guicassolato

Description

@guicassolato

Policy objects MUST specify a status stanza. As of kubernetes-sigs/gateway-api#3609, the following changes to the Kuadrant policy CRDs are required to be conformant.

1. The following conditions and reasons SHOULD be adopted (Standard):

  • Condition: Accepted

    • Reasons for True:
      • Accepted
    • Reason for False:
      • Conflicted - for direct policies when targeting a network object already in scope of another policy, N/A for policy kinds that implement merge strategies other than None
      • Invalid - e.g.: invalid CEL expression
      • TargetNotFound
  • Condition: Programmed (replaces current Enforced)

    • Reasons for True:
      • Programmed - no parts of the policy overridden by another
      • PartiallyProgrammed - parts of the policy overridden by another, though not entirely
    • Reason for False:
      • Overridden - policy entirely overridden by another
      • Reconciling - intermediary state while reconciling the policy post acceptance

2. Policy status SHOULD be organised using the upstream PolicyAncestorStatus struct (Experimental).

  • Policy implementations can arbitrate what the best ancestor is for each case (e.g., Gateway object, target object, scope, etc)
  • My personal recommendation is to use the exact target object (sectionName included) as the ancestor, so automated tools can reason about the status of the policy in terms of each target.
  • To have in mind: trade-off between desired level of detail to provide and avoiding the fanout status update problem

3. Policy status SHOULD reflect the applied merge strategy (Experimental).


Subtasks:

  • AuthPolicy status restructuring
  • RateLimitPolicy status restructuring
  • TokenBasedRatePolicy status restructuring
  • TLSPolicy status restructuring
  • DNSPolicy status restructuring
  • OIDCPolicy status restructuring
  • PlanPolicy status restructuring

Supersedes #433

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions