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

Update policy resources with list examples #1361

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

MichalFupso
Copy link
Contributor

Update policy with List examples
Product Version(s):

Calico Enterprise
Issue:

Link to docs preview:

SME review:

  • An SME has approved this change.

DOCS review:

  • A member of the docs team has approved this change.

Additional information:

Merge checklist:

  • Deploy preview inspected wherever changes were made
  • Build completed successfully
  • Test have passed

@MichalFupso MichalFupso requested a review from a team as a code owner March 7, 2024 23:21
Copy link

netlify bot commented Mar 7, 2024

Deploy Preview for calico-docs-preview-next ready!

Name Link
🔨 Latest commit 44f07f1
🔍 Latest deploy log https://app.netlify.com/sites/calico-docs-preview-next/deploys/65ef8c951c35d20008c4b779
😎 Deploy Preview https://deploy-preview-1361--calico-docs-preview-next.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 58 (🔴 down 1 from production)
Accessibility: 93 (no change from production)
Best Practices: 92 (no change from production)
SEO: 79 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Mar 7, 2024

Deploy Preview succeeded!

Built without sensitive environment variables

Name Link
🔨 Latest commit 44f07f1
🔍 Latest deploy log https://app.netlify.com/sites/tigera/deploys/65ef8c95e8dd270008e4b39c
😎 Deploy Preview https://deploy-preview-1361--tigera.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 70 (🟢 up 2 from production)
Accessibility: 93 (no change from production)
Best Practices: 83 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@ctauchen ctauchen left a 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

Comment on lines 191 to 193
#### 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.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
#### 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
Copy link
Collaborator

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 ==
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
When using the field selector, supported operators are = and ==
When using the field selector, supported operators are `=` and `==`.

Comment on lines 198 to 201
Example to retrieve all GlobalNetworkPolicies in default tier:
```
kubectl get globalnetworkpolicy --field-selector spec.tier=default
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
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

Comment on lines 203 to 209
##### 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)'
```
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
##### 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)'

@ctauchen
Copy link
Collaborator

LGTM, thanks!

@ctauchen ctauchen merged commit 5b0f373 into tigera:main Mar 20, 2024
10 checks passed
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.

2 participants