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

Add blog post: Immutability patterns using CEL #36032

Merged
merged 7 commits into from
Sep 29, 2022

Conversation

alexzielenski
Copy link
Contributor

@alexzielenski alexzielenski commented Aug 17, 2022

a post expanding upon #35459 which walks a reader through how to use kubebuilder marker comments to enforce common immutability design patterns.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Aug 17, 2022
@k8s-ci-robot k8s-ci-robot added the area/blog Issues or PRs related to the Kubernetes Blog subproject label Aug 17, 2022
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language sig/docs Categorizes an issue or PR as relevant to SIG Docs. labels Aug 17, 2022
@alexzielenski
Copy link
Contributor Author

cc @jpbetz @cici37 @apelisse

review & comments appreciated

@alexzielenski alexzielenski force-pushed the immutability-cel branch 2 times, most recently from 40b0702 to 6f8322a Compare August 17, 2022 01:07
@netlify
Copy link

netlify bot commented Aug 17, 2022

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 9f8226e
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/62fc3d80e1bd2c00095f8c8d
😎 Deploy Preview https://deploy-preview-36032--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 settings.

@netlify
Copy link

netlify bot commented Aug 17, 2022

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 6321569
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/6335a4e55704260009baebfa
😎 Deploy Preview https://deploy-preview-36032--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 settings.

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.

The article should be in the future - how about mid-September, after the v1.25 post-release articles are out?
/hold

Two style tweaks I recommend:

Plus, some inline feedback.

content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
content/en/blog/_posts/2022-08-15-immutability-with-cel.md Outdated Show resolved Hide resolved
@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 Aug 17, 2022
@alexzielenski
Copy link
Contributor Author

Thanks Tim for looking it over and helping the article look better! I've incorporated your tips everywhere I could find with the exception of the mermaid diagram for the folder structure which I've followed up on in the comment.

The article should be in the future - how about mid-September, after the v1.25 post-release articles are out?

I am not familiar with how the articles names/metadata apply to the timing of their release. Does this require the file to be renamed and the date changed within?

@sftim
Copy link
Contributor

sftim commented Aug 19, 2022

I am not familiar with how the articles names/metadata apply to the timing of their release. Does this require the file to be renamed and the date changed within?

Yes, please.

Comment on lines 659 to 662
Usage of CEL within Kubernetes Validation Rules is so much more powerful than
what has been shown in this article. For more information please check out
[validation rules](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules)
in the Kubernetes documentation.
Copy link
Contributor

Choose a reason for hiding this comment

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

We could also link to the blog that #35459 will publish, and we could amend that article to link to this one (would need us to delay merging this PR, so that we don't link to a not-yet-published article).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Link to a prospective URL added. Agreed hold until link is confirmed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sftim
Copy link
Contributor

sftim commented Aug 22, 2022

I suggest publication on the 29th of September.

@alexzielenski alexzielenski changed the title [WIP] add blog post: immutability patterns using CEL Add blog post: Immutability patterns using CEL Aug 23, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 23, 2022
@sftim
Copy link
Contributor

sftim commented Aug 30, 2022

@katcosgrove how does that date sound to you?

@katcosgrove
Copy link
Contributor

@sftim Fine by me -- I'll add it to the spreadsheet. Thanks!

@sftim
Copy link
Contributor

sftim commented Sep 29, 2022

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 29, 2022
@sftim
Copy link
Contributor

sftim commented Sep 29, 2022

This looks like a thought-through article. I haven't tested that it's technically correct; I think it'll be good to publish based on circumstantial evidence around the quality of writing.

I'd have liked to see this PR make an update to https://kubernetes.io/blog/2022/09/23/crd-validation-rules-beta/, so that https://kubernetes.io/blog/2022/09/23/crd-validation-rules-beta/ links to the new article.

Anyway, let's ship it.

/lgtm
/approve

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

LGTM label has been added.

Git tree hash: fd80310c6540b00bac0686a6d6a60c6ec261178a

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sftim

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

The pull request process is described 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 the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 29, 2022
@k8s-ci-robot k8s-ci-robot merged commit cc432a2 into kubernetes:main Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/blog Issues or PRs related to the Kubernetes Blog subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants