Skip to main content

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

NameTypeDescription
namestringThe base name for the container, which will be prefixed with cfg.NamePrefix.
cfgconfig.FlyteCoPilotConfigThe configuration object containing settings for the FlyteCoPilot container, including image, CPU, memory, and name prefix.
args[]stringA slice of strings representing the command-line arguments to pass to the FlyteCoPilot container.
volumeMounts...v1.VolumeMountA variadic list of Kubernetes v1.VolumeMount objects to be attached to the container, allowing access to persistent storage or configuration.

Returns

TypeDescription
v1.Container, errorA Kubernetes v1.Container object configured for FlyteCoPilot, or an error if resource quantities cannot be parsed.