evict-pod action¶
Description¶
EvictPodAction requests policy/v1 eviction of one immutable Pod identity. Outputs describe the last successful invocation when an unchanged action skips. Removing the action does not undo eviction. A managed Pod may later be recreated.
Source: internal/api/policy/v1/evict_pod_action.go:30
Example usage:
imports: {
kubernetes-policy-v1: 'github.com/cloudboss/unobin-library-kubernetes//api/policy/v1'
}
actions: {
example: kubernetes-policy-v1.evict-pod {
# Set input fields here.
}
}
Inputs¶
name
string
namespace
optional(string)
Namespace defaults to the configured kubeconfig or library namespace.
expected-uid
string
grace-period-seconds
optional(integer)
Omission uses Kubernetes' grace period; zero explicitly requests immediate grace.
wait-for-deletion
optional(boolean)
true
WaitForDeletion defaults true and observes only the original UID's absence.
timeout
optional(string)
10m
Timeout defaults to 10m for requests, refusal delays and deletion observation together.
Input Constraints¶
Name rules
Requirement.
Rule logic
- Require
@core.is-match(input.name, '^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$')
&& @core.length(input.name) <= 253
Namespace rules
Conditional requirement.
Rule logic
- When
input.namespace != null- Require
@core.is-match(input.namespace, '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$')
&& @core.length(input.namespace) <= 63
Expected uid rules
Requirement.
Rule logic
- Require
@core.length(input.expected-uid) >= 1
Grace period seconds rules
Requirement.
Rule logic
- Require
input.grace-period-seconds == null
|| input.grace-period-seconds >= 0
Timeout rules
If set, timeout must be a positive duration.
Rule logic
- Require
@core.is-format(input.timeout, 'positive-duration')
Outputs¶
server
string
api-version
string
kind
string
namespace
string
name
string
uid
string
accepted
boolean
deleted
boolean
waited
boolean