pub struct PolicyPackSpec {
pub id: String,
pub description: Option<String>,
pub version: Option<String>,
pub placement: Option<PlacementSpec>,
pub rules: PolicyRules,
}Fields§
§id: StringPortable identifier for this pack — used in spec.policy.packId.
description: Option<String>§version: Option<String>Pack schema version — semver MAJOR.MINOR.PATCH (optional pre-release).
When present, the runtime compares this against
MIN_SUPPORTED_POLICY_PACK_VERSION at admission and rejects packs
whose version is lower than the runtime’s compiled-in floor unless
the operator sets CELLOS_POLICY_ALLOW_DOWNGRADE=1. When absent, the
pack is treated as version MIN_SUPPORTED_POLICY_PACK_VERSION for
backwards compatibility with packs authored before the field existed.
See P4-04.
placement: Option<PlacementSpec>T11 — optional placement scope. When set, the pack’s rules apply only
to specs whose spec.placement matches every populated field of this
scope (a None field on the policy means “any” for that axis).
A pack without a placement scope is global — applied to every spec
regardless of where it runs. The matching rule lives in
spec_matches_placement_scope so the contract is testable
independently of the rest of admission.
rules: PolicyRulesTrait Implementations§
Source§impl Clone for PolicyPackSpec
impl Clone for PolicyPackSpec
Source§fn clone(&self) -> PolicyPackSpec
fn clone(&self) -> PolicyPackSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more