Skip to content

Validating Admission Policy: Uniform workload type policy enforcement #130565

@jpbetz

Description

@jpbetz

This is a feature suggestion for ValidatingAdmissionPolicy (VAP). It may depend on other enhancements to workload types before it becomes tractable.

Writing a VAP that verifies all PodSpecs is difficult/impossible. PodSpecs are embedded in multiple built-in types (Deployments, Jobs...) as well as CRDs.

Even writing a VAP to validate the containers in Pod requires writing validation code in triplicate to handle containers, initContainers and ephemeralContainers.

Writing a VAP against Pod and all the other built-in types that embed PodSpec is even more difficult and is at risk of not validating types that are introduced AFTER the VAP is authored.

If CRDs were to clearly identify where PodSpecs were embedded, and VAP had a way to match "all resources that embed PodSpec", this could become feasible.

This idea has come up multiple times and relates to topics such as CRX and "workload type embedding", so I'd like to open this tracker to allow for discussion.

/sig api-machinery

cc @cici37 @cheftako @thockin

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.sig/api-machineryCategorizes an issue or PR as relevant to SIG API Machinery.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions