Merge pull request #104624 from Haleygo/support-null-resolvConf-in-configFile
When resolvConf is "" in kubelet configuration, pod will be created with wrong dns policy Kubernetes-commit: fa2657b8b2f839b88834579917abda1a816a1970
This commit is contained in:
commit
d4a2ada8d0
|
@ -599,9 +599,10 @@ type KubeletConfiguration struct {
|
|||
// dynamically updating this field, consider that
|
||||
// changes will only take effect on Pods created after the update. Draining
|
||||
// the node is recommended before changing this field.
|
||||
// If set to the empty string, will override the default and effectively disable DNS lookups.
|
||||
// Default: "/etc/resolv.conf"
|
||||
// +optional
|
||||
ResolverConfig string `json:"resolvConf,omitempty"`
|
||||
ResolverConfig *string `json:"resolvConf,omitempty"`
|
||||
// runOnce causes the Kubelet to check the API server once for pods,
|
||||
// run those in addition to the pods specified by static pod files, and exit.
|
||||
// Default: false
|
||||
|
|
|
@ -189,6 +189,11 @@ func (in *KubeletConfiguration) DeepCopyInto(out *KubeletConfiguration) {
|
|||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.ResolverConfig != nil {
|
||||
in, out := &in.ResolverConfig, &out.ResolverConfig
|
||||
*out = new(string)
|
||||
**out = **in
|
||||
}
|
||||
if in.CPUCFSQuota != nil {
|
||||
in, out := &in.CPUCFSQuota, &out.CPUCFSQuota
|
||||
*out = new(bool)
|
||||
|
|
14
go.mod
14
go.mod
|
@ -8,14 +8,14 @@ require (
|
|||
github.com/gogo/protobuf v1.3.2
|
||||
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d
|
||||
google.golang.org/grpc v1.38.0
|
||||
k8s.io/api v0.0.0-20210909233056-897e446fab01
|
||||
k8s.io/apimachinery v0.0.0-20210909232852-2694a9d8c2a6
|
||||
k8s.io/component-base v0.0.0-20210909233903-eae60e423670
|
||||
k8s.io/api v0.0.0-20210914033158-96087243fecb
|
||||
k8s.io/apimachinery v0.0.0-20210910032850-71bf7ba06cd4
|
||||
k8s.io/component-base v0.0.0-20210914194403-1eab7a342d1a
|
||||
)
|
||||
|
||||
replace (
|
||||
k8s.io/api => k8s.io/api v0.0.0-20210909233056-897e446fab01
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210909232852-2694a9d8c2a6
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20210909233348-92773dec0039
|
||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20210909233903-eae60e423670
|
||||
k8s.io/api => k8s.io/api v0.0.0-20210914033158-96087243fecb
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210910032850-71bf7ba06cd4
|
||||
k8s.io/client-go => k8s.io/client-go v0.0.0-20210914033512-2ed3e42c4361
|
||||
k8s.io/component-base => k8s.io/component-base v0.0.0-20210914194403-1eab7a342d1a
|
||||
)
|
||||
|
|
14
go.sum
14
go.sum
|
@ -765,13 +765,13 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
|
|||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.0.0-20210909233056-897e446fab01 h1:n/0nzza1kIiP2DIXcZwABuQ04jxHcHL/LZpQ10RLFlY=
|
||||
k8s.io/api v0.0.0-20210909233056-897e446fab01/go.mod h1:0nN0XcqrbGqTm7E11p5o0HXtTw4sWiQpWwP4ABSj9Us=
|
||||
k8s.io/apimachinery v0.0.0-20210909232852-2694a9d8c2a6 h1:29ipmI/gyb6iqWT/4RBzb6yAOeV8lOWYaDHRRqKSylI=
|
||||
k8s.io/apimachinery v0.0.0-20210909232852-2694a9d8c2a6/go.mod h1:ZPgmwNP53+C5GcWxpp1Nk2UcdC35zmuEjgRliNyZqgw=
|
||||
k8s.io/client-go v0.0.0-20210909233348-92773dec0039/go.mod h1:s+NorGBbhxHU8ucpCMXP+ajvqFr2DHIcUfW3D8Lu7OE=
|
||||
k8s.io/component-base v0.0.0-20210909233903-eae60e423670 h1:Q9PMSBver8seWekbtkqcKrrjncscm1AYjWoBl6+/bdA=
|
||||
k8s.io/component-base v0.0.0-20210909233903-eae60e423670/go.mod h1:k++RedPnodUZvaB0SFPAdAljhOmueulpyr9wDkx1M+A=
|
||||
k8s.io/api v0.0.0-20210914033158-96087243fecb h1:EWGDjYQGOZICiHoGeBCWmU1CIGdJPxaoDffIyMXuiqY=
|
||||
k8s.io/api v0.0.0-20210914033158-96087243fecb/go.mod h1:sQuJwpcAhgOCSGReco17GgtkSflhybK6puoB8WhPIzg=
|
||||
k8s.io/apimachinery v0.0.0-20210910032850-71bf7ba06cd4 h1:ST56tx94/5d19mi/fkKMHIm+Q3o1M6YMChuDA4Br4ho=
|
||||
k8s.io/apimachinery v0.0.0-20210910032850-71bf7ba06cd4/go.mod h1:ZPgmwNP53+C5GcWxpp1Nk2UcdC35zmuEjgRliNyZqgw=
|
||||
k8s.io/client-go v0.0.0-20210914033512-2ed3e42c4361/go.mod h1:53Gfih+ZgYh75yCK90HtZv5ag/VmrEtlM4cR87WCwYs=
|
||||
k8s.io/component-base v0.0.0-20210914194403-1eab7a342d1a h1:k4p2+5RYuqxWzunolO6GVYBlmIFY1csHDb3TKCLhir4=
|
||||
k8s.io/component-base v0.0.0-20210914194403-1eab7a342d1a/go.mod h1:aBc7zR4dBEbo78FfelJczSCDV1QO/zvujITujLi1riI=
|
||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.20.0 h1:tlyxlSvd63k7axjhuchckaRJm+a92z5GSOrTOQY5sHw=
|
||||
|
|
Loading…
Reference in New Issue