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

feat: add cobra cli #1

Merged
merged 4 commits into from
Sep 15, 2023
Merged

feat: add cobra cli #1

merged 4 commits into from
Sep 15, 2023

Conversation

xunholy
Copy link
Contributor

@xunholy xunholy commented Sep 12, 2023

No description provided.

Signed-off-by: Michael Fornaro <[email protected]>
Signed-off-by: Michael Fornaro <[email protected]>
Copy link
Contributor

@maheshrayas maheshrayas left a comment

Choose a reason for hiding this comment

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

🚀

main.go Outdated
Copy link

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

Copy link
Contributor

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

Copy link

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?

@@ -17,6 +37,103 @@ type NetworkPolicySpec struct {
Egress []NetworkPolicyRule
}

func GenerateNetworkPolicy(podName string) {
Copy link

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, namespace is needed,

Copy link

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.

Copy link

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

https://cloud.tencent.com/developer/article/2168026

Copy link
Contributor Author

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

@xunholy xunholy merged commit 91330d9 into main Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants