Feat: Support Running Sidecar with a Command. (#2449)
* Feat: Support Running Sidecard with a Command. This PR addresses issue #2448 . Some containers may not have entry points, if this is the case they would need to be run using a command. This change extends the definition of sidecar so that there is an optional command field. If the field is present then the container will be run using that command. This is a two line change that is fully backward compatible.
This commit is contained in:
parent
548e387745
commit
b276cd2f94
|
|
@ -220,6 +220,7 @@ type Sidecar struct {
|
|||
DockerImage string `json:"image,omitempty"`
|
||||
Ports []v1.ContainerPort `json:"ports,omitempty"`
|
||||
Env []v1.EnvVar `json:"env,omitempty"`
|
||||
Command []string `json:"command,omitempty"`
|
||||
}
|
||||
|
||||
// UserFlags defines flags (such as superuser, nologin) that could be assigned to individual users
|
||||
|
|
|
|||
|
|
@ -1222,6 +1222,7 @@ func getSidecarContainer(sidecar acidv1.Sidecar, index int, resources *v1.Resour
|
|||
Resources: *resources,
|
||||
Env: sidecar.Env,
|
||||
Ports: sidecar.Ports,
|
||||
Command: sidecar.Command,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue