mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 00:31:00 +00:00
parent
3888aca8ab
commit
dacc363605
@ -709,7 +709,7 @@ func (dm *DockerManager) runContainer(
|
||||
SecurityOpt: fmtSecurityOpts,
|
||||
}
|
||||
|
||||
updateHostConfig(hc)
|
||||
updateHostConfig(hc, opts)
|
||||
|
||||
// Set sysctls if requested
|
||||
if container.Name == PodInfraContainerName {
|
||||
|
@ -23,10 +23,11 @@ import (
|
||||
dockercontainer "github.com/docker/engine-api/types/container"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||
)
|
||||
|
||||
// These two functions are OS specific (for now at least)
|
||||
func updateHostConfig(config *dockercontainer.HostConfig) {
|
||||
func updateHostConfig(hc *dockercontainer.HostConfig, opts *kubecontainer.RunContainerOptions) {
|
||||
// no-op, there is a windows implementation that is different.
|
||||
}
|
||||
|
||||
|
@ -19,14 +19,15 @@ limitations under the License.
|
||||
package dockertools
|
||||
|
||||
import (
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
|
||||
dockertypes "github.com/docker/engine-api/types"
|
||||
dockercontainer "github.com/docker/engine-api/types/container"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||
)
|
||||
|
||||
// These two functions are OS specific (for now at least)
|
||||
func updateHostConfig(config *dockercontainer.HostConfig) {
|
||||
func updateHostConfig(hc *dockercontainer.HostConfig, opts *kubecontainer.RunContainerOptions) {
|
||||
}
|
||||
|
||||
func DefaultMemorySwap() int64 {
|
||||
|
@ -21,14 +21,15 @@ package dockertools
|
||||
import (
|
||||
"os"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
|
||||
dockertypes "github.com/docker/engine-api/types"
|
||||
dockercontainer "github.com/docker/engine-api/types/container"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||
)
|
||||
|
||||
// These two functions are OS specific (for now at least)
|
||||
func updateHostConfig(config *dockercontainer.HostConfig) {
|
||||
func updateHostConfig(hc *dockercontainer.HostConfig, opts *kubecontainer.RunContainerOptions) {
|
||||
// There is no /etc/resolv.conf in Windows, DNS and DNSSearch options would have to be passed to Docker runtime instead
|
||||
hc.DNS = opts.DNS
|
||||
hc.DNSSearch = opts.DNSSearch
|
||||
|
Loading…
Reference in New Issue
Block a user