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

[kubectl plugin] Add validate and find commands #65

Merged
merged 2 commits into from
Apr 7, 2020

Conversation

ahmed-mez
Copy link
Contributor

@ahmed-mez ahmed-mez commented Apr 3, 2020

What does this PR do?

  • validate ad pod command for pod annotations
  • validate ad service command for service/endpoints annotations
  • agent find command to get the agent monitoring a given pod

Motivation

make operations easier

@ahmed-mez ahmed-mez added component/plugin enhancement New feature or request labels Apr 3, 2020
@ahmed-mez ahmed-mez force-pushed the ahmed-mez/add-more-plugin-cmds branch from 1eb1438 to 4a882f7 Compare April 3, 2020 21:53
@ahmed-mez ahmed-mez marked this pull request as ready for review April 3, 2020 22:33
@ahmed-mez ahmed-mez requested a review from a team as a code owner April 3, 2020 22:33
Copy link
Collaborator

@clamoriniere clamoriniere left a comment

Choose a reason for hiding this comment

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

nice PR.
I have just a proposition about how to structure the different commands to have it maybe more generic.
WDYT if we put both auto-discovery command like this

kubectl datadog validate ad pod <pod-name>
kubectl datadog validate ad service <service-name>

like this if we want to support after

kubectl datadog validate ad deployment|daemonset|statefulset <pod-name>

or others resources it will be simpler ?

Later, we can think also to implement:

kubectl datadog validate config

func New(streams genericclioptions.IOStreams) *cobra.Command {
o := newOptions(streams)
cmd := &cobra.Command{
Use: "find [pod name] [flags]",
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think if we move this command as a agent subcommand ?
example: kubectl datadog agent find <myapp-pod>

@ahmed-mez
Copy link
Contributor Author

Makes perfect sense thanks! I will update the PR accordingly 👍

@ahmed-mez ahmed-mez force-pushed the ahmed-mez/add-more-plugin-cmds branch from 4a882f7 to 474c334 Compare April 7, 2020 08:44
@ahmed-mez
Copy link
Contributor Author

@clamoriniere PR updated

Copy link
Collaborator

@clamoriniere clamoriniere left a comment

Choose a reason for hiding this comment

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

💯

could you please update the PR description according to your change.

@ahmed-mez ahmed-mez merged commit c9305e2 into master Apr 7, 2020
@ahmed-mez ahmed-mez deleted the ahmed-mez/add-more-plugin-cmds branch April 7, 2020 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/plugin enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants