OverrideContainerSpec
Overrides the specified container's properties in the given podSpec. The function updates the image and command arguments of the container that matches the given containerName.
def OverrideContainerSpec(
podSpec: *v1.PodSpec,
containerName: string,
image: string,
args: []string
) - > error
Overrides the specified container's properties in the given podSpec. The function updates the image and command arguments of the container that matches the given containerName.
Parameters
| Name | Type | Description |
|---|---|---|
| podSpec | *v1.PodSpec | The PodSpec object whose container properties are to be overridden. |
| containerName | string | The name of the container within the PodSpec to be updated. |
| image | string | The new image name to set for the matching container. If empty, the image will not be updated. |
| args | []string | The new command arguments to set for the matching container. If empty, the arguments will not be updated. |
Returns
| Type | Description |
|---|---|
error | An error if the operation fails, otherwise nil. |