-
Notifications
You must be signed in to change notification settings - Fork 106
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
Allow HNC to propagate changes to CRD. #59
Conversation
Welcome @just1900! |
Hi @just1900. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
NB: this is a continuation of kubernetes-retired/multi-tenancy#1513 |
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.
lgtm after one tiny last change. @rjbez17 , lgty?
/ok-to-test
You're absolutely right, it's delete-type. Thanks!
…On Fri, Jul 9, 2021 at 11:35 AM Justin Huang ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In test/e2e/issues_test.go
<#59 (comment)>
:
> + metadata:
+ type: object
+ spec:
+ description: EETestSpec defines the desired state of EETest
+ properties:
+ foo:
+ description: Foo is an example field of EETest. Edit eetest_types.go
+ to remove/update
+ type: string
+ type: object
+ type: object
+ served: true
+ storage: true`
+ // create CRD and set the propagation strategy for it.
+ MustApplyYAML(crd)
+ MustRun("kubectl hns config set-resource eetests --group e2e.hnc.x-k8s.io --mode Propagate --force")
Maybe run the command kubectl hns config delete-type --group
e2e.hnc.x-k8s.io --resource eetests to delete this type is better?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#59 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AE43PZENF2SRSTCC4MZ5Z53TW4JNJANCNFSM5AB4TRRQ>
.
|
Sorry can you please squash those two commits? |
Currently, HNC are clearing out most of the metadata when doing an update request, which works fine for most types, but fails for CRDs. This PR allows HNC to propagate changes to CRD by setting 'ResourceVersion' explicitly when performing an update. Tested: before this change, the added e2etest case will fail, another way to reproduce is, first create an crd in the parent namespace, and then update whatever field of the crd, wait a second and run the following command: kubectl hns describe child Result: Events from the objects in namespace child Last Seen Reason Object Message 0s CannotUpdateObject EETest:child/eetest-sample Could not write from source namespace parent: eetests.e2e.hnc.x-k8s.io eetest-sample is invalid: metadata.resourceVersion: Invalid value: 0x0: must be specified for an update. After this change, you should see it propagates normally and the inherited crd's field is updated.
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.
/lgtm
/approve
/hold
/assign @rjbez17
Ryan, lgty?
sry, |
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.
/lgtm
/approve
/hold cancel
@rjbez17 lmk if you had any concerns with this one, but I think it's ready to merge
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adrianludwin, just1900 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 |
Fix #53
Currently, HNC are clearing out most of the metadata when doing an update request, which works fine for most types, but fails for CRDs. This PR allows HNC to propagate changes to CRD by setting 'ResourceVersion' explicitly when performing an update.