Skip to content

[FEATURE] Support anyOf condition aggregation policy alongside the existing allOf behavior #313

Description

@vishnukothakapu

Is your feature request related to a problem or existing issue? Please describe.

NRC evaluates conditions with implicit AND logic all conditions must pass before a taint is removed. That works for most cases, but I've hit a wall with it.

We have nodes that can boot with either a hardware GPU driver or a software fallback. If either is ready, the node should schedule GPU workloads. There's no clean way to express this today. Two rules with the same taint key hits the webhook conflict check. The only real escape is writing a sidecar to synthesize a third aggregated condition which is extra infrastructure just to paper over a gap in the rule API.

Didn't find this covered in existing issues. #272 is about rule ordering (different), #282 is about defaultStatus for missing conditions (also different).

Describe the solution you'd like

Add an optional conditionPolicy field allOf (default, existing behavior) or anyOf (taint removed when at least one condition is satisfied):

spec:
  conditionPolicy: anyOf
  conditions:
    - type: "gpu.example.com/HardwareDriverReady"
      requiredStatus: "True"
    - type: "gpu.example.com/SoftwareFallbackReady"
      requiredStatus: "True"
  taint:
    key: "readiness.k8s.io/GPUReady"
    effect: "NoSchedule"
  enforcementMode: "continuous"

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions