-
Notifications
You must be signed in to change notification settings - Fork 38
feat: add init container to install fleet CRDs #1141
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
Conversation
4409ec9 to
7509600
Compare
d1f9080 to
565af68
Compare
1ef75b2 to
1da8ccf
Compare
344b47f to
0b2de1c
Compare
cmd/crdinstaller/utils/util.go
Outdated
| } | ||
|
|
||
| // Type assertion to make sure we have a CRD. | ||
| crd, ok := obj.(*apiextensionsv1.CustomResourceDefinition) |
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.
is the GVK returned not enough?
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.
We need to convert obj -> crd to access crd.Name to get object existing on the cluster. We can use check to achieve both (type assertion and get object name)
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.
what's that GVK? is that not always CustomResourceDefinition? or that's the real GVK of that CRD (i.e. crp.kube-fleet.io)?
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.
e574c46 to
4c736a0
Compare
a36cc2b to
9246062
Compare
cmd/crdinstaller/utils/util.go
Outdated
| } | ||
|
|
||
| // Type assertion to make sure we have a CRD. | ||
| crd, ok := obj.(*apiextensionsv1.CustomResourceDefinition) |
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.
what's that GVK? is that not always CustomResourceDefinition? or that's the real GVK of that CRD (i.e. crp.kube-fleet.io)?
ryanzhang-oss
left a comment
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.
we need to add metrics and alert in the next PR

Description of your changes
Fixes #
I have:
make reviewableto ensure this PR is ready for review.How has this code been tested
Special notes for your reviewer