-
Notifications
You must be signed in to change notification settings - Fork 17
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 should not delete CRDs #172
Operator should not delete CRDs #172
Conversation
193e106
to
e9c521d
Compare
e9c521d
to
4ff5f1a
Compare
/kind bug |
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.
/approve
Giving 👍 on this fix going in. I only ask that my comment on default_test.go
be addressed before merging.
test.CRDEventuallyExists(ctx, k8sClient, "builds.shipwright.io") | ||
test.CRDEventuallyExists(ctx, k8sClient, "buildruns.shipwright.io") | ||
test.CRDEventuallyExists(ctx, k8sClient, "buildstrategies.shipwright.io") | ||
test.CRDEventuallyExists(ctx, k8sClient, "clusterbuildstrategies.shipwright.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.
I wonder if we should introduce a wait period before checking that the CRDs still exist?
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.
@adambkaplan The test is passing without the wait period, we do the same for the deployment and rbac and those tests had been working since the begining.
https://github.com/shipwright-io/operator/blob/main/controllers/default_test.go#L222
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.
The AfterEach
for this set of tests should delete the *.shipwright.io
CRD instances. I think the tests previously relied on the delete behavior to tear down the CRD instance each time.
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.
@adambkaplan Should we care about not deleteing the CRDs on tear down if the cluster is been stopped/deleed
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: adambkaplan 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 |
/lgtm I am going to merge this as-is. Any additional work regarding test setup/teardown can be addressed in a follow-up pull request. |
Fixes #174 |
Changes
Fixes #173
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes