-
Notifications
You must be signed in to change notification settings - Fork 20
chore: move the envelope CRDs to the v1beta1 API group #44
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
chore: move the envelope CRDs to the v1beta1 API group #44
Conversation
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
Signed-off-by: michaelawyu <chenyu1@microsoft.com>
|
The APIs are updated per offline discussion. |
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.
Pull Request Overview
This PR migrates envelope CRDs from the v1alpha1 API group to the v1beta1 API group. Key changes include updating apiVersion fields in YAML examples, modifying the CRD schema (replacing the old spec field with data), and regenerating deepcopy functions for the new API version.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/envelopes/namespaced.yaml | Updated apiVersion to v1beta1 and replaced spec.manifests with data mapping |
| examples/envelopes/clusterscoped.yaml | Updated apiVersion to v1beta1 and replaced spec.manifests with data mapping |
| config/crd/bases/placement.kubernetes-fleet.io_resourceenvelopes.yaml | Updated version, added a schema definition for the data field, and provided descriptive text |
| config/crd/bases/placement.kubernetes-fleet.io_clusterresourceenvelopes.yaml | Updated version and schema to use the new data field |
| apis/placement/v1beta1/* | Updated package version and regenerated deepcopy functions for the new API group |
| apis/placement/v1beta1/envelope_types.go | Changed package name and replaced EnvelopeSpec with Data in CRD type definitions |
| apis/placement/v1alpha1/zz_generated.deepcopy.go | Removed deepcopy functions for types shifted to v1beta1 |
Comments suppressed due to low confidence (2)
apis/placement/v1alpha1/zz_generated.deepcopy.go:161
- [nitpick] If the v1alpha1 API group is fully deprecated, consider removing legacy deepcopy functions to reduce long-term maintenance overhead.
func (in *ClusterResourceEnvelope) DeepCopyInto(out *ClusterResourceEnvelope) {
examples/envelopes/namespaced.yaml:1
- Confirm that client code and documentation have been updated to account for the change from using the 'spec' field to the 'data' field for embedded manifests.
apiVersion: placement.kubernetes-fleet.io/v1beta1
| Servers should convert recognized schemas to the latest internal value, and | ||
| may reject unrecognized values. | ||
| More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources | ||
| type: string |
Copilot
AI
May 1, 2025
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.
Consider adding an inline comment that explains the structure and purpose of the new 'data' field, clarifying that each key typically represents a filename that identifies a manifest.
| type: string | |
| type: string | |
| # The 'data' field contains manifests wrapped in this envelope. | |
| # Each key in the 'data' object typically represents a filename identifying a manifest. |
| Spec EnvelopeSpec `json:"spec"` | ||
| // +kubebuilder:validation:MinProperties=1 | ||
| // +kubebuilder:validation:MaxProperties=50 | ||
| Data map[string]runtime.RawExtension `json:"data"` |
Copilot
AI
May 1, 2025
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.
[nitpick] Ensure that the transition from using a dedicated EnvelopeSpec to a direct 'data' mapping is thoroughly documented in code comments and external documentation for consistency.
Description of your changes
As discussed offline, this PR moves the envelope CRDs to the v1beta1 API group.
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
N/A, API only change
Special notes for your reviewer
N/A