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
d1e24ace
Unverified
Commit
d1e24ace
authored
Sep 25, 2018
by
k8s-ci-robot
Committed by
GitHub
Sep 25, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68644 from Pingan2017/nodecondition
NodePIDPressure condition should set to unknown when node lost connne…
parents
a38ad775
3b19c33b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
node_lifecycle_controller.go
pkg/controller/nodelifecycle/node_lifecycle_controller.go
+1
-0
node_lifecycle_controller_test.go
...ontroller/nodelifecycle/node_lifecycle_controller_test.go
+16
-0
No files found.
pkg/controller/nodelifecycle/node_lifecycle_controller.go
View file @
d1e24ace
...
...
@@ -924,6 +924,7 @@ func (nc *Controller) tryUpdateNodeStatus(node *v1.Node) (time.Duration, v1.Node
v1
.
NodeOutOfDisk
,
v1
.
NodeMemoryPressure
,
v1
.
NodeDiskPressure
,
v1
.
NodePIDPressure
,
// We don't change 'NodeNetworkUnavailable' condition, as it's managed on a control plane level.
// v1.NodeNetworkUnavailable,
}
...
...
pkg/controller/nodelifecycle/node_lifecycle_controller_test.go
View file @
d1e24ace
...
...
@@ -1605,6 +1605,14 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) {
LastHeartbeatTime
:
metav1
.
Date
(
2012
,
1
,
1
,
0
,
0
,
0
,
0
,
time
.
UTC
),
LastTransitionTime
:
fakeNow
,
},
{
Type
:
v1
.
NodePIDPressure
,
Status
:
v1
.
ConditionUnknown
,
Reason
:
"NodeStatusNeverUpdated"
,
Message
:
"Kubelet never posted node status."
,
LastHeartbeatTime
:
metav1
.
Date
(
2012
,
1
,
1
,
0
,
0
,
0
,
0
,
time
.
UTC
),
LastTransitionTime
:
fakeNow
,
},
},
},
},
...
...
@@ -1727,6 +1735,14 @@ func TestMonitorNodeStatusUpdateStatus(t *testing.T) {
LastHeartbeatTime
:
metav1
.
Date
(
2012
,
1
,
1
,
0
,
0
,
0
,
0
,
time
.
UTC
),
// should default to node creation time if condition was never updated
LastTransitionTime
:
metav1
.
Time
{
Time
:
metav1
.
Date
(
2015
,
1
,
1
,
12
,
0
,
0
,
0
,
time
.
UTC
)
.
Add
(
time
.
Hour
)},
},
{
Type
:
v1
.
NodePIDPressure
,
Status
:
v1
.
ConditionUnknown
,
Reason
:
"NodeStatusNeverUpdated"
,
Message
:
"Kubelet never posted node status."
,
LastHeartbeatTime
:
metav1
.
Date
(
2012
,
1
,
1
,
0
,
0
,
0
,
0
,
time
.
UTC
),
// should default to node creation time if condition was never updated
LastTransitionTime
:
metav1
.
Time
{
Time
:
metav1
.
Date
(
2015
,
1
,
1
,
12
,
0
,
0
,
0
,
time
.
UTC
)
.
Add
(
time
.
Hour
)},
},
},
Capacity
:
v1
.
ResourceList
{
v1
.
ResourceName
(
v1
.
ResourceCPU
)
:
resource
.
MustParse
(
"10"
),
...
...
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