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
| 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 CoPilot container, including image, CPU, memory, and name prefix. |
| args | []string | A slice of strings representing the command-line arguments to pass to the CoPilot 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 the Flyte CoPilot, or an error if resource quantities cannot be parsed. |