-
Notifications
You must be signed in to change notification settings - Fork 110
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
Update policy resources with list examples #1361
Conversation
✅ Deploy Preview for calico-docs-preview-next ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview succeeded!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Thanks for this, @MichalFupso ! I've added a few suggestions. Please make similar changes to the other three resources.
In particular, it's important that we keep the resource name as we see it in the code. Sometimes it's hard to resist the temptation to use it as a noun and make it plural.
GlobalNetworkPolicies --> GlobalNetworkPolicy resources
#### List filtering on tiers | ||
List and Watch operations may specify label selector or field selector to filter GlobalNetworkPolicies on tiers returned by the API server. | ||
When no selector is specified the API server returns all GlobalNetworkPolicies from all tiers that the user has access to. |
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.
#### List filtering on tiers | |
List and Watch operations may specify label selector or field selector to filter GlobalNetworkPolicies on tiers returned by the API server. | |
When no selector is specified the API server returns all GlobalNetworkPolicies from all tiers that the user has access to. | |
#### List filtering on tiers | |
List and watch operations may specify label selectors or field selectors to filter `GlobalNetworkPolicy` resources on tiers returned by the API server. | |
When no selector is specified, the API server returns all `GlobalNetworkPolicy` resources from all tiers that the user has access to. |
List and Watch operations may specify label selector or field selector to filter GlobalNetworkPolicies on tiers returned by the API server. | ||
When no selector is specified the API server returns all GlobalNetworkPolicies from all tiers that the user has access to. | ||
|
||
##### Field selector |
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.
Add newline after heading.
When no selector is specified the API server returns all GlobalNetworkPolicies from all tiers that the user has access to. | ||
|
||
##### Field selector | ||
When using the field selector, supported operators are = and == |
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.
When using the field selector, supported operators are = and == | |
When using the field selector, supported operators are `=` and `==`. |
Example to retrieve all GlobalNetworkPolicies in default tier: | ||
``` | ||
kubectl get globalnetworkpolicy --field-selector spec.tier=default | ||
``` |
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.
Example to retrieve all GlobalNetworkPolicies in default tier: | |
``` | |
kubectl get globalnetworkpolicy --field-selector spec.tier=default | |
``` | |
The following example shows how to retrieve all `GlobalNetworkPolicy` resources in the default tier: | |
```bash | |
kubectl get globalnetworkpolicy --field-selector spec.tier=default |
##### Label selector | ||
When using the label selector, supported operators are =, == and IN | ||
|
||
Example to retrieve all GlobalNetworkPolicies in default and net-sec tier: | ||
``` | ||
kubectl get globalnetworkpolicy -l 'projectcalico.org/tier in (default, net-sec)' | ||
``` |
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.
##### Label selector | |
When using the label selector, supported operators are =, == and IN | |
Example to retrieve all GlobalNetworkPolicies in default and net-sec tier: | |
``` | |
kubectl get globalnetworkpolicy -l 'projectcalico.org/tier in (default, net-sec)' | |
``` | |
##### Label selector | |
When using the label selector, supported operators are `=`, `==` and `IN`. | |
The following example shows how to retrieve all `GlobalNetworkPolicy` resources in the `default` and `net-sec` tiers: | |
```bash | |
kubectl get globalnetworkpolicy -l 'projectcalico.org/tier in (default, net-sec)' |
LGTM, thanks! |
Update policy with List examples
Product Version(s):
Calico Enterprise
Issue:
Link to docs preview:
SME review:
DOCS review:
Additional information:
Merge checklist: