mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-13 11:25:19 +00:00
Use strong type for container ID
Change all references to the container ID in pkg/kubelet/... to the strong type defined in pkg/kubelet/container: ContainerID The motivation for this change is to make the format of the ID unambiguous, specifically whether or not it includes the runtime prefix (e.g. "docker://").
This commit is contained in:
@@ -46,8 +46,7 @@ func NewHandlerRunner(httpGetter kubeletTypes.HttpGetter, commandRunner kubecont
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(yifan): Use a strong type for containerID.
|
||||
func (hr *HandlerRunner) Run(containerID string, pod *api.Pod, container *api.Container, handler *api.Handler) error {
|
||||
func (hr *HandlerRunner) Run(containerID kubecontainer.ContainerID, pod *api.Pod, container *api.Container, handler *api.Handler) error {
|
||||
switch {
|
||||
case handler.Exec != nil:
|
||||
_, err := hr.commandRunner.RunInContainer(containerID, handler.Exec.Command)
|
||||
|
||||
Reference in New Issue
Block a user