-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix: fix control plane ref validation #159
Conversation
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.
Thanks for handling this. 🙇 I like the generic approach to testing it.
I only have one concern. Currently, KIC only supports 3 types that have a CP ref in their spec: KongConsumer
, KongConsumerGroup
and KongVault
. It makes sense for them to allow a nil CP reference. But what about the rest of types? Given there's no scenario in which a CP ref being empty for a type not supported by KIC (e.g. KongService
, KongUpstream
, etc.) would mean anything sensible, shouldn't we require this to be set for them?
Yup, that makes sense as next improvement to types that are not supported by KIC. While these would simply hang and not get reconciled by anything (with the default cp ref of I believe this could be solved by
WDYT? I propose to solve this in a follow up PR as this would unnecessary make this one complex. |
b5778f9
to
af27478
Compare
What this PR does / why we need it:
This PR:
configuration.konghq.com
SetControlPlaneRef(*configurationv1alpha1.ControlPlaneRef)
GetControlPlaneRef() *configurationv1alpha1.ControlPlaneRef
NewCRDValidationTestCasesGroupCPRefChange()
which constructsCRDValidationTestCasesGroup
in such a way that it generalizes the CRD ref testsWhich issue this PR fixes
Fixes #154