Skip to main content

FlyteCoPilotContainer

Creates a Kubernetes container specification for a FlyteCoPilot service, configuring its name, image, command, arguments, resource limits (CPU and memory), and volume mounts 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 a Flyte CoPilot instance. This function is used to define the container's image, resource limits, command, arguments, and volume mounts, ensuring the CoPilot 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 CoPilot container, including image, CPU, memory, and name prefix.
args[]stringA slice of strings representing the command-line arguments to pass to the CoPilot 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 the Flyte CoPilot, or an error if resource quantities cannot be parsed.