Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Jun 30, 2025

Simplify the Conditions field in status scaffolding by removing patchStrategy, patchMergeKey, and protobuf tags.

Applied to:

  • deploy-image/alpha-v1 plugin template
  • Getting Started Memcached example

These fields are unnecessary by default and can introduce unexpected
strategic merge behavior. Omitting them simplifies CRD scaffolding
and avoids compatibility risks for most use cases.

Follows Kubernetes API conventions:
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties

Motivation

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 30, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 30, 2025
@camilamacedo86 camilamacedo86 changed the title πŸ› plugin/deploy-image/v1alpha1: drop patchStrategy/protobuf tags from Conditions πŸ› plugin/deploy-image/v1alpha1 and samples: drop patchStrategy/protobuf tags from Conditions Jun 30, 2025
…onditions

Simplify the Conditions field in status scaffolding by removing
patchStrategy, patchMergeKey, and protobuf tags.

Applied to:
- deploy-image/alpha-v1 plugin template
- Getting Started Memcached example

These tags are unnecessary by default and can cause unintended
merge behavior. This aligns with best practices for CRD scaffolding.
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 30, 2025
@camilamacedo86 camilamacedo86 changed the title πŸ› plugin/deploy-image/v1alpha1 and samples: drop patchStrategy/protobuf tags from Conditions πŸ› (deploy-image/v1alpha1): drop patchStrategy/protobuf tags from Conditions Jun 30, 2025
@camilamacedo86
Copy link
Member Author

Moving forward, to not block others' follow-up PRs
Since it was requested as part of kube-api-linter review and already checked by others and it is very small

@camilamacedo86 camilamacedo86 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 30, 2025
@camilamacedo86 camilamacedo86 requested a review from JoelSpeed June 30, 2025 08:09
@JoelSpeed
Copy link

/lgtm

For completeness, these markers have no effect on CRDs and only affect core/built-in Kube API types and those built using aggregated API servers

@k8s-ci-robot k8s-ci-robot merged commit 6d79463 into kubernetes-sigs:master Jun 30, 2025
35 checks passed
@camilamacedo86 camilamacedo86 deleted the fix-confitions branch June 30, 2025 09:40
pedjak added a commit to pedjak/kubebuilder that referenced this pull request Sep 18, 2025
…arted section

Followup of PR kubernetes-sigs#4893

These tags are of no use for CRDs. They have their use
in k8s core types in order to produce proper strategic merge patches, see
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md
but are superseded by +listType and +listMapKey in CRD world.

Added `+listType`, `+listMapKey` and `+optional` markers to the example snippet
camilamacedo86 added a commit that referenced this pull request Sep 22, 2025
* 🌱 Bump github.com/onsi/gomega from 1.38.1 to 1.38.2

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.38.1 to 1.38.2.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](onsi/gomega@v1.38.1...v1.38.2)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-version: 1.38.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* πŸ“– Bump sigs.k8s.io/kubebuilder/v4

Bumps [sigs.k8s.io/kubebuilder/v4](https://github.com/kubernetes-sigs/kubebuilder) from 4.7.1 to 4.8.0.
- [Release notes](https://github.com/kubernetes-sigs/kubebuilder/releases)
- [Changelog](https://github.com/kubernetes-sigs/kubebuilder/blob/master/RELEASE.md)
- [Commits](v4.7.1...v4.8.0)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/kubebuilder/v4
  dependency-version: 4.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🌱 Bump github.com/onsi/ginkgo/v2 from 2.25.1 to 2.25.2

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.25.1 to 2.25.2.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.25.1...v2.25.2)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-version: 2.25.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* ✨ feat: Upgrade controller-gen from v0.18.0 to v0.19.0 (#5064)

feat: Upgrade controller-gen from v0.18.0 to v0.19.0

* ✨ Upgrade golang CI from v2.3.0 to v2.4.0 (#5063)

Upgrade golang CI from v2.3.0 to v2.4.0

* ✨ feat: upgrade controller-runtime from v0.21.0 to v0.22.0 (#5062)

feat: upgrade controller-runtime from v0.21.0 to v0.22.0

* (fix): Fix Docker builds failing when projects don’t include apis/, controllers/, or webhooks by updating .dockerignore to allow only Go source files and module metadata

The make docker-build command no longer fails for new projects that don't yet have api/ or internal/ directories.

What changed:

- The Dockerfile now uses a general COPY . . command.
- The .dockerignore file has been updated to filter the build context, ensuring only necessary files are included.

* πŸ“– Remove unit tests badge from README (#5067)

Remove unit tests badge from README

Removed the unit tests badge from the README.

* πŸ“– Bump github.com/spf13/pflag

Bumps [github.com/spf13/pflag](https://github.com/spf13/pflag) from 1.0.7 to 1.0.10.
- [Release notes](https://github.com/spf13/pflag/releases)
- [Commits](spf13/pflag@v1.0.7...v1.0.10)

---
updated-dependencies:
- dependency-name: github.com/spf13/pflag
  dependency-version: 1.0.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🌱 Bump github.com/onsi/ginkgo/v2 from 2.25.2 to 2.25.3

Bumps [github.com/onsi/ginkgo/v2](https://github.com/onsi/ginkgo) from 2.25.2 to 2.25.3.
- [Release notes](https://github.com/onsi/ginkgo/releases)
- [Changelog](https://github.com/onsi/ginkgo/blob/master/CHANGELOG.md)
- [Commits](onsi/ginkgo@v2.25.2...v2.25.3)

---
updated-dependencies:
- dependency-name: github.com/onsi/ginkgo/v2
  dependency-version: 2.25.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🌱 Bump actions/setup-node from 4 to 5

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🌱 Bump actions/setup-go from 5 to 6

Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5 to 6.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](actions/setup-go@v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🌱 Bump github.com/spf13/cobra from 1.9.1 to 1.10.1

Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.9.1 to 1.10.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](spf13/cobra@v1.9.1...v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-version: 1.10.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* docs: add note about Windows support

The docs now inform users about the plans not to pursue
native Windows support, and also provides instructions
on how to set up Docker and kind on WSL2 for development
on a Windows machine.

* Fix Kubebuilder executable path for alpha generate.

Fix Kubebuilder executable path not found for `kubebuilder alpha generate` command.

* (chore): adjust comments on Auto Update workflow

The comments for the `Run kubebuilder alpha update`
step are now properly syntax-highlighted as such in
yaml.

The `--use-gh-models` flag is now properly referenced
in the comments.

* (helm/v1-alpha): Migrate from installCRDs=true to crds.enabled=true in GitHub action test-chart.yml

The Helm chart flag installCRDs has been replaced with the community-standard crds.enabled. Update your GitHub action test-chart.ymlto ensure CRDs are installed during chart deployment.

* (e2e) upgrade certmanager from v1.16.3 to v1.18.2

* (e2e/docs): upgrade prometheus version used to run the tests

* go: upgraded github.com/spf13/pflag v1.0.9 => v1.0.10

* fix: handle empty CRD directories in Makefile install/uninstall

- Gracefully no-op install/uninstall when no CRDs exist
- Update sample Makefiles accordingly and add CI job to validate empty project
- Revert Dockerfile and .dockerignore changes; keep templates and samples matching upstream

* 🌱 Bump golang.org/x/text from 0.28.0 to 0.29.0

Bumps [golang.org/x/text](https://github.com/golang/text) from 0.28.0 to 0.29.0.
- [Release notes](https://github.com/golang/text/releases)
- [Commits](golang/text@v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/text
  dependency-version: 0.29.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🌱 Bump github.com/spf13/afero from 1.14.0 to 1.15.0

Bumps [github.com/spf13/afero](https://github.com/spf13/afero) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/spf13/afero/releases)
- [Commits](spf13/afero@v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/afero
  dependency-version: 1.15.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🌱 Bump helm.sh/helm/v3 from 3.18.6 to 3.19.0

Bumps [helm.sh/helm/v3](https://github.com/helm/helm) from 3.18.6 to 3.19.0.
- [Release notes](https://github.com/helm/helm/releases)
- [Commits](helm/helm@v3.18.6...v3.19.0)

---
updated-dependencies:
- dependency-name: helm.sh/helm/v3
  dependency-version: 3.19.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* 🌱 Bump golang.org/x/tools from 0.36.0 to 0.37.0

Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](golang/tools@v0.36.0...v0.37.0)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  dependency-version: 0.37.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* ✨ Upgrade controller-runtime from v0.22.0 to v0.22.1 (#5098)

Upgrade controller-runtime from v0.22.0 to v0.22.1

* ✨ Upgrade kustomize from v5.6.0 to v5.7.1 (#5099)

Upgrade kustomize from v5.6.0 to v5.7.1

* πŸ› (go/v4): Fix e2e test to validate that metrics are exported without asserting a controller-specific metric (#5100)

Fix e2e test to validate that metrics are exported without asserting a controller-specific metric

* (docs) drop patchStrategy/protobuf tags from Conditions in Getting Started section

Followup of PR #4893

These tags are of no use for CRDs. They have their use
in k8s core types in order to produce proper strategic merge patches, see
https://github.com/kubernetes/community/blob/master/contributors/devel/sig-api-machinery/strategic-merge-patch.md
but are superseded by +listType and +listMapKey in CRD world.

Added `+listType`, `+listMapKey` and `+optional` markers to the example snippet

* πŸ“– (doc): Add demo for auto-update plugin (#5105)

(doc): Add demo for auto-update plugin

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kubernetes Prow Robot <[email protected]>
Co-authored-by: Vitor Floriano <[email protected]>
Co-authored-by: Ashish K Pathak <[email protected]>
Co-authored-by: Obinna Odirionye <[email protected]>
Co-authored-by: Predrag Knezevic <[email protected]>
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants