mirror of https://github.com/k3s-io/k3s
Merge pull request #39731 from apprenda/dockertools_fix
Automatic merge from submit-queue Fix kubelet cross build **What this PR does / why we need it**: Cross builds are not passing for MacOS and Windows. We are expecting Windows binaries for `kubelet` and `kube-proxy` to be released by the first time with 1.5.2 to be released later today. **Which issue this PR fixes**: fixes #39005 fixes #39714 **Special notes for your reviewer**: /cc @feiskyer @smarterclayton @vishh this should be P0 in order to be merged before 1.5.2 and obviously fix the cross build.pull/6/head
commit
636902c759
|
@ -709,7 +709,7 @@ func (dm *DockerManager) runContainer(
|
|||
SecurityOpt: fmtSecurityOpts,
|
||||
}
|
||||
|
||||
updateHostConfig(hc)
|
||||
updateHostConfig(hc, opts)
|
||||
|
||||
// Set sysctls if requested
|
||||
if container.Name == PodInfraContainerName {
|
||||
|
|
|
@ -23,15 +23,16 @@ 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.
|
||||
}
|
||||
|
||||
func DefaultMemorySwap() int64 {
|
||||
return -1
|
||||
return 0
|
||||
}
|
||||
|
||||
func getContainerIP(container *dockertypes.ContainerJSON) string {
|
||||
|
|
|
@ -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