Skip to content

Introduce a new mutating webhook that adds a readiness gate #1458

@thisthat

Description

@thisthat

Goal

Register a new mutating webhook that injects the Readiness Gate keptn-pre-checks-gate.

Details

With controller runtime v0.15.0, we can deprecate the scheduler approach in favor of gates.
However, this can be only fully supported once K8s promotes the Readiness Gate APIs to stable. Hence, we should hide this new behavior behind the keptn.readiness-gate Feature Flag - by default this is disabled.
If the FF is enabled, the operator registers an additional webhook that adds a readiness gate names keptn-pre-checks-gate.
This webhook should only react to CREATE operations and operates iff the ns is annotated and the required labels are present.

Acceptance Criteria

  • Use OpenFeature FF keptn.readiness-gate to hide the new behavior
  • If the FF is enabled, then register the webhook
  • The new webhook uses the same logic of the already existing webhook to determine if it should add the gate or not

DoD

  • The keptn-pre-checks-gate readiness gate is added only when a new manifest is created
  • If the FF is disabled, KLT works like this feature was never introduced
  • Component
  • Kuttl test that assert on the different annotations: scheduler and readiness gates

Depends on

Resources

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions