Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guanchzhou
Copy link
Contributor

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.

Adding TAINTS-LIST column in Wide mode to show current taints present on node.
Copy link
Owner

@derailed derailed left a 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 {
Copy link
Owner

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{
Copy link
Owner

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.

@derailed derailed added enhancement New feature or request needs-tlc Pr needs additional updates labels Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-tlc Pr needs additional updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants