pub struct ComponentDefinitionLifecycleActionsDataLoadExec {
pub args: Option<Vec<String>>,
pub command: Option<Vec<String>>,
pub container: Option<String>,
pub env: Option<Vec<ComponentDefinitionLifecycleActionsDataLoadExecEnv>>,
pub image: Option<String>,
pub matching_key: Option<String>,
pub target_pod_selector: Option<ComponentDefinitionLifecycleActionsDataLoadExecTargetPodSelector>,
}Expand description
Defines the command to run.
This field cannot be updated.
Fields§
§args: Option<Vec<String>>Args represents the arguments that are passed to the command for execution.
command: Option<Vec<String>>Specifies the command to be executed inside the container. The working directory for this command is the container’s root directory(‘/’). Commands are executed directly without a shell environment, meaning shell-specific syntax (‘|’, etc.) is not supported. If the shell is required, it must be explicitly invoked in the command.
A successful execution is indicated by an exit status of 0; any non-zero status signifies a failure.
container: Option<String>Specifies the name of the container within the same pod whose resources will be shared with the action. This allows the action to utilize the specified container’s resources without executing within it.
The name must match one of the containers defined in componentDefinition.spec.runtime.
The resources that can be shared are included:
- volume mounts
This field cannot be updated.
env: Option<Vec<ComponentDefinitionLifecycleActionsDataLoadExecEnv>>Represents a list of environment variables that will be injected into the container. These variables enable the container to adapt its behavior based on the environment it’s running in.
This field cannot be updated.
image: Option<String>Specifies the container image to be used for running the Action.
When specified, a dedicated container will be created using this image to execute the Action. All actions with same image will share the same container.
This field cannot be updated.
matching_key: Option<String>Used in conjunction with the targetPodSelector field to refine the selection of target pod(s) for Action execution.
The impact of this field depends on the targetPodSelector value:
- When
targetPodSelectoris set toAnyorAll, this field will be ignored. - When
targetPodSelectoris set toRole, only those replicas whose role matches thematchingKeywill be selected for the Action. - When
targetPodSelectoris set toOrdinal,matchingKeymust be a non-negative integer and only the replica whose Pod name ends with-<matchingKey>will be selected for the Action. The selector is considered ambiguous and the action fails if multiple Pods share the same ordinal.
This field cannot be updated.
target_pod_selector: Option<ComponentDefinitionLifecycleActionsDataLoadExecTargetPodSelector>Defines the criteria used to select the target Pod(s) for executing the Action. This is useful when there is no default target replica identified. It allows for precise control over which Pod(s) the Action should run in.
If not specified, the Action will be executed in the pod where the Action is triggered, such as the pod to be removed or added; or a random pod if the Action is triggered at the component level, such as post-provision or pre-terminate of the component.
This field cannot be updated.
Trait Implementations§
Source§impl Clone for ComponentDefinitionLifecycleActionsDataLoadExec
impl Clone for ComponentDefinitionLifecycleActionsDataLoadExec
Source§fn clone(&self) -> ComponentDefinitionLifecycleActionsDataLoadExec
fn clone(&self) -> ComponentDefinitionLifecycleActionsDataLoadExec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more