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
operator: cleanup CRD registration #23701
operator: cleanup CRD registration #23701
Conversation
Cleanup CRD registration at operator startup by removing boilerplate functions. Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
/test |
crd *apiextensionsv1.CustomResourceDefinition, | ||
poller poller, | ||
) error { | ||
scopedLog := log.WithField("name", crdName) | ||
scopedLog := log.WithField("name", crd.Name) | ||
|
||
if !k8sversion.Capabilities().APIExtensionsV1CRD { |
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.
I'm pretty sure that this check can go away; can you confirm and, if reasonable, remove it too?
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.
good point.
should be possible to remove since the oldest k8s release supported by stable cilium is k8s 1.16 (https://docs.cilium.io/en/stable/concepts/kubernetes/compatibility/#kubernetes-compatibility) and since k8s 1.16 CRD v1 is supported (https://kubernetes.io/docs/reference/using-api/deprecation-guide/#customresourcedefinition-v122).
going to remove this check and its logic
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.
Looks good! If we can get rid of the v1beta1 CRD code, let's do that too.
Support for CRD v1beta1 has been removed, since this is no longer necessary in all supported k8s versions. Signed-off-by: Marco Hofstetter <marco.hofstetter@isovalent.com>
removed v1beta1 CRD support |
lgtm! |
/test |
I see testing is not done yet, removing |
/ci-verifier |
Cleanup CRD registration at operator startup by removing boilerplate functions and CRD v1beta1 support.