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

Blog entry for KEP-4358: Custom resource field selectors to GA #48374

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jpbetz
Copy link
Contributor

@jpbetz jpbetz commented Oct 16, 2024

No description provided.

@k8s-ci-robot k8s-ci-robot added this to the 1.32 milestone Oct 16, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/blog Issues or PRs related to the Kubernetes Blog subproject labels Oct 16, 2024
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 16, 2024
Copy link

netlify bot commented Oct 16, 2024

👷 Deploy Preview for kubernetes-io-vnext-staging processing.

Name Link
🔨 Latest commit 792c3e2
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-vnext-staging/deploys/67408c1d22d4f2000879061d

Copy link
Contributor

@tengqm tengqm left a comment

Choose a reason for hiding this comment

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

A few nits identified.
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 16, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: dedf77e9e5bb4b7b2edb9e4ff1e7ccc55b6d2546

@T-Lakshmi
Copy link
Contributor

@jpbetz,
Looks netlify build faild, please re-push the commit.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 16, 2024
@k8s-ci-robot k8s-ci-robot requested a review from tengqm October 16, 2024 13:00
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@jpbetz jpbetz force-pushed the custom-resource-field-selectors-blog branch 2 times, most recently from b7acd7b to 6563855 Compare October 16, 2024 13:03
@jpbetz jpbetz force-pushed the custom-resource-field-selectors-blog branch from 6563855 to cf597b8 Compare October 16, 2024 13:05
Copy link

netlify bot commented Oct 16, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 9f42b91
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/670fb8f4b2c76d000850d0ef
😎 Deploy Preview https://deploy-preview-48374--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@sftim
Copy link
Contributor

sftim commented Oct 16, 2024

/hold

This mustn't publish until release comms confirm it's OK, and that includes having the correct publication date.
So:

/lgtm cancel

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 16, 2024
Copy link
Contributor

@sftim sftim 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 the PR.

The title should typically mention the release that the announcement goes along with, and we recommend following key bits of the style guide (eg: headings in sentence case; use italics for terms)

So, custom resource field selectors not Custom Resource Field Selectors.

Also, avoid using “we“ unless it is obvious to readers who it refers to; for this one, you could reword the first paragraph to make that clear.

Copy link

netlify bot commented Oct 16, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 792c3e2
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/67408c1d2ec71300088c2a5c
😎 Deploy Preview https://deploy-preview-48374--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@jpbetz jpbetz force-pushed the custom-resource-field-selectors-blog branch from 704ea7a to 4ad4ad6 Compare October 16, 2024 15:10
@jpbetz
Copy link
Contributor Author

jpbetz commented Oct 16, 2024

Thanks @sftim. Feedback applied.

@jpbetz
Copy link
Contributor Author

jpbetz commented Oct 31, 2024

friendly nudge

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Thanks @jpbetz

  • Please add draft: true to the article's front matter
  • Please set the publication date to Tuesday 11th December 2024 (we'll update that after it merges). This is a change to the article path in source and to the front matter.

Copy link
Contributor

Choose a reason for hiding this comment

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

The announcement could be more about how to use the new feature (including a title change) and less about the graduation itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

SGTM. Done.

@jpbetz jpbetz force-pushed the custom-resource-field-selectors-blog branch from 3f2c40a to a2ac99c Compare November 21, 2024 22:25
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Nov 21, 2024
@jpbetz
Copy link
Contributor Author

jpbetz commented Nov 21, 2024

Thanks @sftim. Feedback applied.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 21, 2024
@tengqm
Copy link
Contributor

tengqm commented Nov 21, 2024

One more thing. The change to go.mod file in this PR was not intentional, right?

@jpbetz jpbetz force-pushed the custom-resource-field-selectors-blog branch from a2ac99c to 792c3e2 Compare November 22, 2024 13:50
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from sftim. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 22, 2024
@jpbetz
Copy link
Contributor Author

jpbetz commented Nov 22, 2024

One more thing. The change to go.mod file in this PR was not intentional, right?

Thanks for noticing. I blame scripts/verify-spelling.sh. Fixed.

Update your CRD definition with the `selectableFields` section. This tells Kubernetes
which fields you want to filter by.

For example, let's say you have a `Shirt` CRD with color and size fields in the spec:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
For example, let's say you have a `Shirt` CRD with color and size fields in the spec:
For example, let's say you have a CustomResourceDefinition that defines a Shirt API. The Shirt API has
`color` and `size` fields in the object spec:

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

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

Looks OK to merge; I'd prefer to address several style and clarity nits.


# Here's how to use it

## 1. Define Selectable Fields in your CRD:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## 1. Define Selectable Fields in your CRD:
## 1. Define selectable fields in your CustomResourceDefinition

type: string
```

## 2. Filter CRDs with `kubectl`:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
## 2. Filter CRDs with `kubectl`:
## 2. Filter custom resources using `kubectl`

The `=` and `!=` operators are supported.

```sh
kubectl get shirts.stable.example.com --field-selector spec.color=blue
Copy link
Contributor

Choose a reason for hiding this comment

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

If this works, I'd recommend it. The first . helps show that it's a path

Suggested change
kubectl get shirts.stable.example.com --field-selector spec.color=blue
kubectl get shirts.stable.example.com --field-selector .spec.color=blue

Comment on lines +76 to +78
- **Reduced Redundancy**: Avoids the practice of duplicating data into labels.
- **Improved Consistency**: Ensure data accuracy by filtering based on actual field values.
- **Efficient Operations**: Utilize filtered informers in controllers for better resource reconciliation.
Copy link
Contributor

Choose a reason for hiding this comment

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

(style nit)

Suggested change
- **Reduced Redundancy**: Avoids the practice of duplicating data into labels.
- **Improved Consistency**: Ensure data accuracy by filtering based on actual field values.
- **Efficient Operations**: Utilize filtered informers in controllers for better resource reconciliation.
- **Reduced redundancy**: Avoids the practice of duplicating data into labels.
- **Improved consistency**: Ensure data accuracy by filtering based on actual field values.
- **Efficient operations**: Utilize filtered informers in controllers for better resource reconciliation.


## 1. Define Selectable Fields in your CRD:

Update your CRD definition with the `selectableFields` section. This tells Kubernetes
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Update your CRD definition with the `selectableFields` section. This tells Kubernetes
Update an existing CustomResourceDefinition (CRD) to specify one or more `selectableFields`. This tells Kubernetes

## 1. Define Selectable Fields in your CRD:

Update your CRD definition with the `selectableFields` section. This tells Kubernetes
which fields you want to filter by.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
which fields you want to filter by.
which fields you want to let users filter by.


Start filtering your CRDs with ease using custom resource field selectors in
Kubernetes 1.32 and experience a more streamlined workflow.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe mention the downsides (if any) of allowing all fields to be used in field selectors?

@reylejano
Copy link
Member

@jpbetz , with 1.32 released, please change the target branch to main

@jpbetz jpbetz changed the base branch from dev-1.32 to main December 12, 2024 01:39
@jpbetz
Copy link
Contributor Author

jpbetz commented Dec 12, 2024

please change the target branch to main

Done

@sftim
Copy link
Contributor

sftim commented Dec 23, 2024

/remove-milestone 1.32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/blog Issues or PRs related to the Kubernetes Blog subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
Status: Requires update
Development

Successfully merging this pull request may close these issues.

6 participants