mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Merge pull request #40190 from yujuhong/nsenter_exec
Automatic merge from submit-queue (batch tested with PRs 40168, 40165, 39158, 39966, 40190) dockershim: add support for the 'nsenter' exec handler This change simply plumbs the kubelet configuration (--docker-exec-handler) to DockerService. This fixes #35747.
This commit is contained in:
		| @@ -101,7 +101,7 @@ var internalLabelKeys []string = []string{containerTypeLabelKey, containerLogPat | |||||||
|  |  | ||||||
| // NOTE: Anything passed to DockerService should be eventually handled in another way when we switch to running the shim as a different process. | // NOTE: Anything passed to DockerService should be eventually handled in another way when we switch to running the shim as a different process. | ||||||
| func NewDockerService(client dockertools.DockerInterface, seccompProfileRoot string, podSandboxImage string, streamingConfig *streaming.Config, | func NewDockerService(client dockertools.DockerInterface, seccompProfileRoot string, podSandboxImage string, streamingConfig *streaming.Config, | ||||||
| 	pluginSettings *NetworkPluginSettings, cgroupsName string, kubeCgroupDriver string) (DockerService, error) { | 	pluginSettings *NetworkPluginSettings, cgroupsName string, kubeCgroupDriver string, execHandler dockertools.ExecHandler) (DockerService, error) { | ||||||
| 	c := dockertools.NewInstrumentedDockerInterface(client) | 	c := dockertools.NewInstrumentedDockerInterface(client) | ||||||
| 	ds := &dockerService{ | 	ds := &dockerService{ | ||||||
| 		seccompProfileRoot: seccompProfileRoot, | 		seccompProfileRoot: seccompProfileRoot, | ||||||
| @@ -109,10 +109,8 @@ func NewDockerService(client dockertools.DockerInterface, seccompProfileRoot str | |||||||
| 		os:                 kubecontainer.RealOS{}, | 		os:                 kubecontainer.RealOS{}, | ||||||
| 		podSandboxImage:    podSandboxImage, | 		podSandboxImage:    podSandboxImage, | ||||||
| 		streamingRuntime: &streamingRuntime{ | 		streamingRuntime: &streamingRuntime{ | ||||||
| 			client: client, | 			client:      client, | ||||||
| 			// Only the native exec handling is supported for now. | 			execHandler: execHandler, | ||||||
| 			// TODO(#35747) - Either deprecate nsenter exec handling, or add support for it here. |  | ||||||
| 			execHandler: &dockertools.NativeExecHandler{}, |  | ||||||
| 		}, | 		}, | ||||||
| 		containerManager: cm.NewContainerManager(cgroupsName, client), | 		containerManager: cm.NewContainerManager(cgroupsName, client), | ||||||
| 	} | 	} | ||||||
|   | |||||||
| @@ -551,7 +551,7 @@ func NewMainKubelet(kubeCfg *componentconfig.KubeletConfiguration, kubeDeps *Kub | |||||||
| 			streamingConfig := getStreamingConfig(kubeCfg, kubeDeps) | 			streamingConfig := getStreamingConfig(kubeCfg, kubeDeps) | ||||||
| 			// Use the new CRI shim for docker. | 			// Use the new CRI shim for docker. | ||||||
| 			ds, err := dockershim.NewDockerService(klet.dockerClient, kubeCfg.SeccompProfileRoot, kubeCfg.PodInfraContainerImage, | 			ds, err := dockershim.NewDockerService(klet.dockerClient, kubeCfg.SeccompProfileRoot, kubeCfg.PodInfraContainerImage, | ||||||
| 				streamingConfig, &pluginSettings, kubeCfg.RuntimeCgroups, kubeCfg.CgroupDriver) | 				streamingConfig, &pluginSettings, kubeCfg.RuntimeCgroups, kubeCfg.CgroupDriver, dockerExecHandler) | ||||||
| 			if err != nil { | 			if err != nil { | ||||||
| 				return nil, err | 				return nil, err | ||||||
| 			} | 			} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kubernetes Submit Queue
					Kubernetes Submit Queue