-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add cobra cli #1
Conversation
Signed-off-by: Michael Fornaro <[email protected]>
Signed-off-by: Michael Fornaro <[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.
🚀
main.go
Outdated
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.
Not sure if we need to have an empty main.go
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.
i think he deleted main.go
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.
weird, why it's not appears as deleted?
advisor/pkg/k8s/networkpolicies.go
Outdated
@@ -17,6 +37,103 @@ type NetworkPolicySpec struct { | |||
Egress []NetworkPolicyRule | |||
} | |||
|
|||
func GenerateNetworkPolicy(podName string) { |
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.
Do we need to support namespace as parameter?
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.
Yes, namespace is needed,
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.
Just do the kubectl way, using -n or --namespace flag to receive the value.
advisor/cmd/root.go
Outdated
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.
For future reference, it would be good to use genericclioptions to inherit some flags for example namespace, context and more
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.
This is a great idea - I'm going to merge this all in and it would be a great update
…e broker and more Signed-off-by: Michael Fornaro <[email protected]>
Signed-off-by: Michael Fornaro <[email protected]>
No description provided.