Skip to content

Multi-stage check support#2765

Merged
siggy merged 5 commits intomasterfrom
siggy/check-stages
Apr 30, 2019
Merged

Multi-stage check support#2765
siggy merged 5 commits intomasterfrom
siggy/check-stages

Conversation

@siggy
Copy link
Member

@siggy siggy commented Apr 29, 2019

Add support for linkerd check config. Validates the existence of the
Linkerd Namespace, ClusterRoles, ClusterRoleBindings, ServiceAccounts,
and CustomResourceDefitions.

Part of #2337

Signed-off-by: Andrew Seigner [email protected]

@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 29, 2019

Copy link
Contributor

@ihcsim ihcsim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Question: Is there a plan to extend the unit test cases in TestConfigExists() to include checks for cluster role, cluster role bindings and service accounts?

@siggy
Copy link
Member Author

siggy commented Apr 30, 2019

Question: Is there a plan to extend the unit test cases in TestConfigExists() to include checks for cluster role, cluster role bindings and service accounts?

@ihcsim good point, i've updated the unit tests to include a successful check of all the new resources.

siggy added 2 commits April 30, 2019 16:44
Add support for `linkerd check config`. Validates the existence of the
Linkerd Namespace, ClusterRoles, ClusterRoleBindings, ServiceAccounts,
and CustomResourceDefitions.

Part of #2337

Signed-off-by: Andrew Seigner <[email protected]>
Signed-off-by: Andrew Seigner <[email protected]>
@siggy siggy force-pushed the siggy/check-stages branch from ed56951 to 04ecc05 Compare April 30, 2019 14:44
Copy link
Member

@alpeb alpeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, modulo my comment below.

Nice tests refactors 👍

cli/cmd/check.go Outdated
flags := pflag.NewFlagSet("check", pflag.ExitOnError)

flags.StringVar(&options.versionOverride, "expected-version", options.versionOverride, "Overrides the version used when checking if Linkerd is running the latest version (mostly for testing)")
flags.StringVarP(&options.namespace, "namespace", "n", options.namespace, "Namespace to use for --proxy checks (default: all namespaces)")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this is to be used with --proxy, it should belong into nonConfigFlagSet() instead

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 30, 2019

@siggy siggy merged commit 6649459 into master Apr 30, 2019
@siggy siggy deleted the siggy/check-stages branch April 30, 2019 16:18
@l5d-bot
Copy link
Collaborator

l5d-bot commented Apr 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants