FlyteCoPilotContainer
Creates a Kubernetes container specification for a FlyteCoPilot instance, configuring its name, image, command, arguments, working directory, resource limits (CPU and memory), volume mounts, termination message policy, and image pull policy based on the provided configuration.
def FlyteCoPilotContainer(
name: string,
cfg: config.FlyteCoPilotConfig,
args: []string,
volumeMounts: ...v1.VolumeMount
) - > v1.Container, error
Builds a Kubernetes container configuration for the FlyteCoPilot service. This function is used to define the container's image, resource limits, command, arguments, and volume mounts, ensuring the FlyteCoPilot service runs with the specified configurations.
Parameters
| Name | Type | Description |
|---|---|---|
| name | string | The base name for the container, which will be prefixed with cfg.NamePrefix. |
| cfg | config.FlyteCoPilotConfig | The configuration object containing settings for the FlyteCoPilot container, including image, CPU, memory, and name prefix. |
| args | []string | A slice of strings representing the command-line arguments to pass to the FlyteCoPilot container. |
| volumeMounts | ...v1.VolumeMount | A variadic list of Kubernetes v1.VolumeMount objects to be attached to the container, allowing access to persistent storage or configuration. |
Returns
| Type | Description |
|---|---|
v1.Container, error | A Kubernetes v1.Container object configured for FlyteCoPilot, or an error if resource quantities cannot be parsed. |