-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,8 +232,8 @@ var _ = g.Describe("Reconcile default ShipwrightBuild installation", func() { | |
test.EventuallyRemoved(ctx, k8sClient, expectedDeployment) | ||
}) | ||
|
||
// TODO: Do not delete the CRDs! This is something only a cluster admin should do. | ||
g.It("deletes the custom resource definitions for the Shipwright build APIs", func(ctx g.SpecContext) { | ||
// Deteling the build instance should not delete CRDS | ||
g.It("should not delete the custom resource definitions for the Shipwright build APIs", func(ctx g.SpecContext) { | ||
test.CRDEventuallyExists(ctx, k8sClient, "builds.shipwright.io") | ||
test.CRDEventuallyExists(ctx, k8sClient, "buildruns.shipwright.io") | ||
test.CRDEventuallyExists(ctx, k8sClient, "buildstrategies.shipwright.io") | ||
|
@@ -244,10 +244,10 @@ var _ = g.Describe("Reconcile default ShipwrightBuild installation", func() { | |
o.Expect(err).NotTo(o.HaveOccurred()) | ||
|
||
// Verify - check the behavior | ||
test.CRDEventuallyRemoved(ctx, k8sClient, "builds.shipwright.io") | ||
test.CRDEventuallyRemoved(ctx, k8sClient, "buildruns.shipwright.io") | ||
test.CRDEventuallyRemoved(ctx, k8sClient, "buildstrategies.shipwright.io") | ||
test.CRDEventuallyRemoved(ctx, k8sClient, "clusterbuildstrategies.shipwright.io") | ||
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") | ||
Comment on lines
+247
to
+250
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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. |
||
}) | ||
}) | ||
|
||
|
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