Skip to content

[GEP-713] How to reflect policy conflicts in Status Conditions? #4269

@DamianSawicki

Description

@DamianSawicki

I'm wondering how to best report policy conflicts using status conditions according to GEP-713.

Question 1: The Target object status section of GEP-713 mentions "status Enforced or PartiallyEnforced", but "PartiallyEnforced" does not appear elsewhere in the GEP, and "enforced" is a common adjective (typed without backticks and capitalization) everywhere else. Is the mention of Enforced and PartiallyEnforced an omission? Or should they be fully described as status conditions alongside Accepted and Programmed? In an old version @guicassolato's version of the GEP, both Enforced and PartiallyEnforced are valid status conditions alongside Accepted (and Overridden).

Question 2: Let's assume Enforced or PartiallyEnforced should not exist. I'd like to understand the intended usages for

  • Accepted: Conflicted versus
  • Programmed: PartiallyProgrammed.

2.1. I see that Conflicted indicates that the entire policy is rejected, while PartiallyProgrammed indicates that only parts of it don't take effect. But why do these indications of entirety and partialness appear at different levels (Accepted vs Programmed)? Shouldn't we also have Accepted: PartiallyConflicted or Programmed: FullySuperseded?

2.2 I suppose one intended use case for PartiallyProgrammed is the following: Gateway-level policy sets color: red, opacity: 50, while a Route-level policy sets color: blue (I assume a linear Gateway -> HTTPRoute -> Service topology). Then, the effective policy (assuming the Patch overrides merge strategy) is color: blue, opacity: 50 because color from the more specific Route-level policy takes precedence. In this case, the Gateway-level policy is PartiallyProgrammed because opacity takes effect but color does not.

2.3 Following up on the above example. What if there is another Backend-level policy that sets opacity: 25? I assume the effective policy should then be color: blue, opacity: 25, which means that the entire Gateway-level policy is superseded by other policies. Should it still be reported as PartiallyProgrammed (or rather FullySuperseded)? Personally, I don't see much value in controllers monitoring and reporting whether already the entire policy is superseded or there are still some parts that are effective (assuming that all overrides are mentioned in the Status Condition Message), but want to make sure.

2.4. What's the intended use case for Conflicted?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions