-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
exit server if not all Ark CRDs exist at startup #683
Conversation
16950a0
to
8d31472
Compare
|
||
// CustomResources returns a map of all custom resources within the Ark | ||
// API group, keyed on Kind. | ||
func CustomResources() map[string]typeInfo { |
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.
Would it make sense to re-use https://github.com/heptio/ark/blob/master/pkg/install/crd.go here? That way we'd have them defined in one place.
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'd rather go the other way around (have pkg/install
use the pkg/apis/ark/v1
func), but yeah good point, I'll update the install package.
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.
Yeah, that direction does make more sense. If we use one common source then we're less likely to miss requiring any new CRDs getting added.
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.
updated.
8d31472
to
ad0f94a
Compare
Working on adding a unit test for the server func. |
Signed-off-by: Steve Kriss <steve@heptio.com>
ad0f94a
to
1df9a8a
Compare
added unit. |
Manual testing looks good on this - if any CRD is missing, the server exits. If all are present, the server proceeds. |
I 👀 👍 |
Signed-off-by: Steve Kriss steve@heptio.com