Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
727dd667
Unverified
Commit
727dd667
authored
Feb 12, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
Feb 12, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #73949 from xichengliudui/fixerrornote
Fix function comment to consistent with its name
parents
29403174
5dd26eca
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
dns.go
pkg/kubelet/network/dns/dns.go
+2
-2
generic.go
pkg/kubelet/pleg/generic.go
+1
-1
No files found.
pkg/kubelet/network/dns/dns.go
View file @
727dd667
...
@@ -190,7 +190,7 @@ func (c *Configurer) CheckLimitsForResolvConf() {
...
@@ -190,7 +190,7 @@ func (c *Configurer) CheckLimitsForResolvConf() {
return
return
}
}
// parseResolv
e
Conf reads a resolv.conf file from the given reader, and parses
// parseResolvConf reads a resolv.conf file from the given reader, and parses
// it into nameservers, searches and options, possibly returning an error.
// it into nameservers, searches and options, possibly returning an error.
func
parseResolvConf
(
reader
io
.
Reader
)
(
nameservers
[]
string
,
searches
[]
string
,
options
[]
string
,
err
error
)
{
func
parseResolvConf
(
reader
io
.
Reader
)
(
nameservers
[]
string
,
searches
[]
string
,
options
[]
string
,
err
error
)
{
file
,
err
:=
ioutil
.
ReadAll
(
reader
)
file
,
err
:=
ioutil
.
ReadAll
(
reader
)
...
@@ -280,7 +280,7 @@ func getPodDNSType(pod *v1.Pod) (podDNSType, error) {
...
@@ -280,7 +280,7 @@ func getPodDNSType(pod *v1.Pod) (podDNSType, error) {
return
podDNSCluster
,
fmt
.
Errorf
(
fmt
.
Sprintf
(
"invalid DNSPolicy=%v"
,
dnsPolicy
))
return
podDNSCluster
,
fmt
.
Errorf
(
fmt
.
Sprintf
(
"invalid DNSPolicy=%v"
,
dnsPolicy
))
}
}
//
Merge
DNS options. If duplicated, entries given by PodDNSConfigOption will
//
mergeDNSOptions merges
DNS options. If duplicated, entries given by PodDNSConfigOption will
// overwrite the existing ones.
// overwrite the existing ones.
func
mergeDNSOptions
(
existingDNSConfigOptions
[]
string
,
dnsConfigOptions
[]
v1
.
PodDNSConfigOption
)
[]
string
{
func
mergeDNSOptions
(
existingDNSConfigOptions
[]
string
,
dnsConfigOptions
[]
v1
.
PodDNSConfigOption
)
[]
string
{
optionsMap
:=
make
(
map
[
string
]
string
)
optionsMap
:=
make
(
map
[
string
]
string
)
...
...
pkg/kubelet/pleg/generic.go
View file @
727dd667
...
@@ -337,7 +337,7 @@ func (g *GenericPLEG) cacheEnabled() bool {
...
@@ -337,7 +337,7 @@ func (g *GenericPLEG) cacheEnabled() bool {
return
g
.
cache
!=
nil
return
g
.
cache
!=
nil
}
}
//
Preserve
an older cached status' pod IP if the new status has no pod IP
//
getPodIP preserves
an older cached status' pod IP if the new status has no pod IP
// and its sandboxes have exited
// and its sandboxes have exited
func
(
g
*
GenericPLEG
)
getPodIP
(
pid
types
.
UID
,
status
*
kubecontainer
.
PodStatus
)
string
{
func
(
g
*
GenericPLEG
)
getPodIP
(
pid
types
.
UID
,
status
*
kubecontainer
.
PodStatus
)
string
{
if
status
.
IP
!=
""
{
if
status
.
IP
!=
""
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment