Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
4 changes: 2 additions & 2 deletions docs/book/src/cronjob-tutorial/testdata/project/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
4 changes: 2 additions & 2 deletions docs/book/src/migration/manually_migration_guide_v2_v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -481,12 +481,12 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
```

And then, to make your project use the `kustomize` version defined in the Makefile, replace all usage of `kustomize` with `$(KUSTOMIZE)`
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/multiversion-tutorial/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ controller-manager deployment) onto the cluster.

## Testing

Once all of the bits are up an running on the cluster with conversion enabled, we can test out our
Once all of the bits are up and running on the cluster with conversion enabled, we can test out our
conversion by requesting different versions.

We'll make a v2 version based on our v1 version (put it under `config/samples`)
Expand Down
4 changes: 2 additions & 2 deletions docs/book/src/multiversion-tutorial/testdata/project/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,13 @@ var _ = Describe("{{ .Resource.Kind }} controller", func() {
}

err = k8sClient.Create(ctx, {{ lower .Resource.Kind }})
if err != nil {
Expect(err).To(Not(HaveOccurred()))
}
Expect(err).To(Not(HaveOccurred()))
}

By("Checking if the custom resource was successfully created")
Eventually(func() error {
found := &{{ .Resource.ImportAlias }}.{{ .Resource.Kind }}{}
err = k8sClient.Get(ctx, typeNamespaceName, found)
if err != nil {
return err
}
return nil
return k8sClient.Get(ctx, typeNamespaceName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Reconciling the custom resource created")
Expand All @@ -164,11 +158,7 @@ var _ = Describe("{{ .Resource.Kind }} controller", func() {
By("Checking if Deployment was successfully created in the reconciliation")
Eventually(func() error {
found := &appsv1.Deployment{}
err = k8sClient.Get(ctx, typeNamespaceName, found)
if err != nil {
return err
}
return nil
return k8sClient.Get(ctx, typeNamespaceName, found)
}, time.Minute, time.Second).Should(Succeed())
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,5 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
`
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
`
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const controllerRuntimeTemplate = `{
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Total number of reconciliation per controller",
"description": "Total number of reconciliations per controller",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -187,7 +187,7 @@ const controllerRuntimeTemplate = `{
"refId": "A"
}
],
"title": "Reconciliation Total Count Per Controller",
"title": "Total Reconciliation Count Per Controller",
"type": "timeseries"
},
{
Expand Down
2 changes: 1 addition & 1 deletion testdata/project-v2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
4 changes: 2 additions & 2 deletions testdata/project-v3-addon-and-grafana/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Total number of reconciliation per controller",
"description": "Total number of reconciliations per controller",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -142,7 +142,7 @@
"refId": "A"
}
],
"title": "Reconciliation Total Count Per Controller",
"title": "Total Reconciliation Count Per Controller",
"type": "timeseries"
},
{
Expand Down
4 changes: 2 additions & 2 deletions testdata/project-v3-config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
4 changes: 2 additions & 2 deletions testdata/project-v3-multigroup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
4 changes: 2 additions & 2 deletions testdata/project-v3-with-deploy-image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,13 @@ var _ = Describe("Busybox controller", func() {
}

err = k8sClient.Create(ctx, busybox)
if err != nil {
Expect(err).To(Not(HaveOccurred()))
}
Expect(err).To(Not(HaveOccurred()))
}

By("Checking if the custom resource was successfully created")
Eventually(func() error {
found := &examplecomv1alpha1.Busybox{}
err = k8sClient.Get(ctx, typeNamespaceName, found)
if err != nil {
return err
}
return nil
return k8sClient.Get(ctx, typeNamespaceName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Reconciling the custom resource created")
Expand All @@ -114,11 +108,7 @@ var _ = Describe("Busybox controller", func() {
By("Checking if Deployment was successfully created in the reconciliation")
Eventually(func() error {
found := &appsv1.Deployment{}
err = k8sClient.Get(ctx, typeNamespaceName, found)
if err != nil {
return err
}
return nil
return k8sClient.Get(ctx, typeNamespaceName, found)
}, time.Minute, time.Second).Should(Succeed())
})
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,13 @@ var _ = Describe("Memcached controller", func() {
}

err = k8sClient.Create(ctx, memcached)
if err != nil {
Expect(err).To(Not(HaveOccurred()))
}
Expect(err).To(Not(HaveOccurred()))
}

By("Checking if the custom resource was successfully created")
Eventually(func() error {
found := &examplecomv1alpha1.Memcached{}
err = k8sClient.Get(ctx, typeNamespaceName, found)
if err != nil {
return err
}
return nil
return k8sClient.Get(ctx, typeNamespaceName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Reconciling the custom resource created")
Expand All @@ -115,11 +109,7 @@ var _ = Describe("Memcached controller", func() {
By("Checking if Deployment was successfully created in the reconciliation")
Eventually(func() error {
found := &appsv1.Deployment{}
err = k8sClient.Get(ctx, typeNamespaceName, found)
if err != nil {
return err
}
return nil
return k8sClient.Get(ctx, typeNamespaceName, found)
}, time.Minute, time.Second).Should(Succeed())
})
})
Expand Down
4 changes: 2 additions & 2 deletions testdata/project-v3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
4 changes: 2 additions & 2 deletions testdata/project-v4-addon-and-grafana/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
},
{
"datasource": "${DS_PROMETHEUS}",
"description": "Total number of reconciliation per controller",
"description": "Total number of reconciliations per controller",
"fieldConfig": {
"defaults": {
"color": {
Expand Down Expand Up @@ -142,7 +142,7 @@
"refId": "A"
}
],
"title": "Reconciliation Total Count Per Controller",
"title": "Total Reconciliation Count Per Controller",
"type": "timeseries"
},
{
Expand Down
4 changes: 2 additions & 2 deletions testdata/project-v4-config/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
4 changes: 2 additions & 2 deletions testdata/project-v4-multigroup/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
4 changes: 2 additions & 2 deletions testdata/project-v4-with-deploy-image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ $(KUSTOMIZE): $(LOCALBIN)
.PHONY: controller-gen
controller-gen: $(CONTROLLER_GEN) ## Download controller-gen locally if necessary.
$(CONTROLLER_GEN): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)
test -s $(LOCALBIN)/controller-gen || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-tools/cmd/controller-gen@$(CONTROLLER_TOOLS_VERSION)

.PHONY: envtest
envtest: $(ENVTEST) ## Download envtest-setup locally if necessary.
$(ENVTEST): $(LOCALBIN)
GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
test -s $(LOCALBIN)/setup-envtest || GOBIN=$(LOCALBIN) go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,13 @@ var _ = Describe("Busybox controller", func() {
}

err = k8sClient.Create(ctx, busybox)
if err != nil {
Expect(err).To(Not(HaveOccurred()))
}
Expect(err).To(Not(HaveOccurred()))
}

By("Checking if the custom resource was successfully created")
Eventually(func() error {
found := &examplecomv1alpha1.Busybox{}
err = k8sClient.Get(ctx, typeNamespaceName, found)
if err != nil {
return err
}
return nil
return k8sClient.Get(ctx, typeNamespaceName, found)
}, time.Minute, time.Second).Should(Succeed())

By("Reconciling the custom resource created")
Expand All @@ -114,11 +108,7 @@ var _ = Describe("Busybox controller", func() {
By("Checking if Deployment was successfully created in the reconciliation")
Eventually(func() error {
found := &appsv1.Deployment{}
err = k8sClient.Get(ctx, typeNamespaceName, found)
if err != nil {
return err
}
return nil
return k8sClient.Get(ctx, typeNamespaceName, found)
}, time.Minute, time.Second).Should(Succeed())
})
})
Expand Down
Loading