-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: adding taints list #3115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat: adding taints list #3115
Conversation
Adding TAINTS-LIST column in Wide mode to show current taints present on node.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@guanchzhou Thank you for this update!
@@ -132,6 +134,21 @@ func (n Node) defaultRow(nwm *NodeWithMetrics, r *model1.Row) error { | |||
return nil | |||
} | |||
|
|||
func formatTaints(taints []v1.Taint) string { | |||
if len(taints) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this check is necessary.
@@ -25,8 +25,27 @@ func TestNodeRender(t *testing.T) { | |||
assert.Nil(t, err) | |||
|
|||
assert.Equal(t, "minikube", r.ID) | |||
e := model1.Fields{"minikube", "Ready", "master", "amd64", "0", "v1.15.2", "Buildroot 2018.05.3", "4.15.0", "192.168.64.107", "<none>", "0", "10", "20", "0", "0", "4000", "7874"} | |||
assert.Equal(t, e, r.Fields[:17]) | |||
e := model1.Fields{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good idea to test the taint list is ok. Or at the very least test formatTaints
.
Adding TAINTS-LIST column in wide mode to show current taints present on a node.
I tried new custom views feature and found it is quite difficult to add a column with list of taints present on node.
But the same time it is quite easy to achieve with this simple PR.