mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
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.
This commit is contained in:
commit
636902c759
@ -709,7 +709,7 @@ func (dm *DockerManager) runContainer(
|
|||||||
SecurityOpt: fmtSecurityOpts,
|
SecurityOpt: fmtSecurityOpts,
|
||||||
}
|
}
|
||||||
|
|
||||||
updateHostConfig(hc)
|
updateHostConfig(hc, opts)
|
||||||
|
|
||||||
// Set sysctls if requested
|
// Set sysctls if requested
|
||||||
if container.Name == PodInfraContainerName {
|
if container.Name == PodInfraContainerName {
|
||||||
|
@ -23,15 +23,16 @@ import (
|
|||||||
dockercontainer "github.com/docker/engine-api/types/container"
|
dockercontainer "github.com/docker/engine-api/types/container"
|
||||||
|
|
||||||
"k8s.io/kubernetes/pkg/api/v1"
|
"k8s.io/kubernetes/pkg/api/v1"
|
||||||
|
kubecontainer "k8s.io/kubernetes/pkg/kubelet/container"
|
||||||
)
|
)
|
||||||
|
|
||||||
// These two functions are OS specific (for now at least)
|
// 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.
|
// no-op, there is a windows implementation that is different.
|
||||||
}
|
}
|
||||||
|
|
||||||
func DefaultMemorySwap() int64 {
|
func DefaultMemorySwap() int64 {
|
||||||
return -1
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func getContainerIP(container *dockertypes.ContainerJSON) string {
|
func getContainerIP(container *dockertypes.ContainerJSON) string {
|
||||||
|
@ -19,14 +19,15 @@ limitations under the License.
|
|||||||
package dockertools
|
package dockertools
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"k8s.io/kubernetes/pkg/api/v1"
|
|
||||||
|
|
||||||
dockertypes "github.com/docker/engine-api/types"
|
dockertypes "github.com/docker/engine-api/types"
|
||||||
dockercontainer "github.com/docker/engine-api/types/container"
|
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)
|
// 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 {
|
func DefaultMemorySwap() int64 {
|
||||||
|
@ -21,14 +21,15 @@ package dockertools
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"k8s.io/kubernetes/pkg/api/v1"
|
|
||||||
|
|
||||||
dockertypes "github.com/docker/engine-api/types"
|
dockertypes "github.com/docker/engine-api/types"
|
||||||
dockercontainer "github.com/docker/engine-api/types/container"
|
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)
|
// 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
|
// 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.DNS = opts.DNS
|
||||||
hc.DNSSearch = opts.DNSSearch
|
hc.DNSSearch = opts.DNSSearch
|
||||||
|
Loading…
Reference in New Issue
Block a user