-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Group checkers by category #2083
Conversation
The linkerd check command organized the various checks via loosely coupled category IDs, category names, and checkers themselves, all with ordering defined by consumers of this code. This change removes category IDs in favor of category names, groups all checkers by category, and enforces ordering at the HealthChecker level. Part of #1471, depends on #2078. Signed-off-by: Andrew Seigner <[email protected]>
Signed-off-by: Andrew Seigner <[email protected]>
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.
⭐️ Huge improvement! This is awesome.
pkg/healthcheck/healthcheck.go
Outdated
}, | ||
}, | ||
{ | ||
description: fmt.Sprintf("can create %ss", "ClusterRole"), |
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.
Since there's no variable anymore, you can write this as:
description: fmt.Sprintf("can create %ss", "ClusterRole"), | |
description: "can create ClusterRoles", |
pkg/healthcheck/healthcheck.go
Outdated
}, | ||
}, | ||
{ | ||
description: fmt.Sprintf("can create %ss", "ClusterRoleBinding"), |
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.
description: fmt.Sprintf("can create %ss", "ClusterRoleBinding"), | |
description: "can create ClusterRoleBindings", |
pkg/healthcheck/healthcheck.go
Outdated
}, | ||
}, | ||
{ | ||
description: fmt.Sprintf("can create %ss", "Role"), |
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.
description: fmt.Sprintf("can create %ss", "Role"), | |
description: "can create Roles", |
pkg/healthcheck/healthcheck.go
Outdated
}, | ||
}, | ||
{ | ||
description: fmt.Sprintf("can create %ss", "RoleBinding"), |
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.
description: fmt.Sprintf("can create %ss", "RoleBinding"), | |
description: "can create RoleBindings", |
Signed-off-by: Andrew Seigner <[email protected]>
The linkerd check command organized the various checks via loosely
coupled category IDs, category names, and checkers themselves, all with
ordering defined by consumers of this code.
This change removes category IDs in favor of category names, groups all
checkers by category, and enforces ordering at the HealthChecker
level.
Part of #1471, depends on #2078.
Signed-off-by: Andrew Seigner [email protected]