pub struct KubectlSpec { /* private fields */ }Expand description
Subcommand-aware kubectl evaluator.
Evaluation order:
- Read-only subcommands → ALLOW (with redirection escalation)
- Env-gated subcommands → ALLOW if all
config_enventries match, else ASK - Known mutating subcommands → ASK
- Everything else → ASK
Implementations§
Source§impl KubectlSpec
impl KubectlSpec
Sourcepub fn from_config(config: &KubectlConfig) -> Self
pub fn from_config(config: &KubectlConfig) -> Self
Build a kubectl spec from configuration.
Trait Implementations§
Source§impl CommandSpec for KubectlSpec
impl CommandSpec for KubectlSpec
Source§fn evaluate(&self, ctx: &CommandContext<'_>) -> RuleMatch
fn evaluate(&self, ctx: &CommandContext<'_>) -> RuleMatch
Evaluate the command in the given context and return a decision.
Auto Trait Implementations§
impl Freeze for KubectlSpec
impl RefUnwindSafe for KubectlSpec
impl Send for KubectlSpec
impl Sync for KubectlSpec
impl Unpin for KubectlSpec
impl UnsafeUnpin for KubectlSpec
impl UnwindSafe for KubectlSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more