Skip to content
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

etcdctl, e2e: add --check-key option to endpoint health #6619

Merged
merged 1 commit into from
Oct 14, 2016

Conversation

mitake
Copy link
Contributor

@mitake mitake commented Oct 11, 2016

This commit adds a new option --check-key to endpoint health command
for health checking with a custom key. It is mainly for avoiding
permission problem.

/cc @xiang90 @lonelili

@@ -44,6 +48,9 @@ func newEpHealthCommand() *cobra.Command {
Short: "Checks the healthiness of endpoints specified in `--endpoints` flag",
Run: epHealthCommandFunc,
}

cmd.Flags().StringVar(&healthCheckKey, "check-key", "health", "A key used as a parameter of get request")
Copy link
Contributor

Choose a reason for hiding this comment

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

health-key? or health-check-key?

A key that is accessed by the health check command. Make sure the command have at least read access to the key. The default key is "health".

/cc @heyitsanthony better words?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think --health-check-key seems to be good. How about this @heyitsanthony ?

Copy link
Contributor

Choose a reason for hiding this comment

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

let's do health-check-key

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@mitake
Copy link
Contributor Author

mitake commented Oct 14, 2016

@xiang90 updated for the option name, PTAL

@@ -44,6 +48,9 @@ func newEpHealthCommand() *cobra.Command {
Short: "Checks the healthiness of endpoints specified in `--endpoints` flag",
Run: epHealthCommandFunc,
}

cmd.Flags().StringVar(&healthCheckKey, "health-check-key", "health", "A key used as a parameter of get request")
Copy link
Contributor

Choose a reason for hiding this comment

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

The key used to perform the health check. Makes sure the user can access the key.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems good. I updated the description. Could you take a look?

This commit adds a new option --check-key to endpoint health command
for health checking with a custom key. It is mainly for avoiding
permission problem.
@xiang90
Copy link
Contributor

xiang90 commented Oct 14, 2016

LGTM

@xiang90 xiang90 merged commit d1660b5 into etcd-io:master Oct 14, 2016
@mitake mitake deleted the health-key branch October 14, 2016 04:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants