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

Revise Antrea NetworkPolicies short names #1253

Closed
abhiraut opened this issue Sep 15, 2020 · 3 comments · Fixed by #1291
Closed

Revise Antrea NetworkPolicies short names #1253

abhiraut opened this issue Sep 15, 2020 · 3 comments · Fixed by #1291
Labels
kind/design Categorizes issue or PR as related to design.

Comments

@abhiraut
Copy link
Contributor

abhiraut commented Sep 15, 2020

Antrea NetworkPolicy CRDs can be retrieved using kubectl commands using either full name or short name. However, the short name netpol for Antrea NetworkPolicy collides with that of K8s NetworkPolicy, in which case, the K8s NetworPolicies are returned. In order to retrieve Antrea NetworkPolicy, users must append the short name with the group name. eg
kubectl get networkpolicies.security
The above is a little counterintuitive and is different than the short name used for Antrea ClusterNetworkPolicy.

Based on the discussion in the community meeting, following is one of the proposal to make the short names for policies uniform.

Antrea ClusterNetworkPolicy
Current short name: kubectl get cnp
Proposed short name1: kubectl get acnp 
Proposed short name2: keep same

Antrea NetworkPolicy
Current short name: kubectl get netpol.security
Proposed short name: kubectl get anp
@abhiraut abhiraut added the kind/design Categorizes issue or PR as related to design. label Sep 15, 2020
@abhiraut
Copy link
Contributor Author

@antoninbas
Copy link
Contributor

I think standardizing the names to "antreaclusternetworkpolicies" / "acnp" and "antreanetworkpolicies" / "anp" would be good and may help avoid any conflicts in the future as the upstream NetworkPolicy APIs evolve. If changing the full resource names is too disruptive, adding"acnp" and "anp" as short names (we can preserve the existing ones for now) is probably a good start. When we upgrade the API version, we can revisit full names. If we decided to switch to "antreaclusternetworkpolicies" / "antreanetworkpolicies", we would need to ensure consistency with the new metrics API (https://github.com/vmware-tanzu/antrea/pull/1172/files#r487954032).

@abhiraut
Copy link
Contributor Author

Fixed by #1291

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/design Categorizes issue or PR as related to design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants