-
Notifications
You must be signed in to change notification settings - Fork 561
go.*,pkg,vendor: Bump controller-runtime to v0.10.1 #2368
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
Changes from all commits
c2d8b29
f80c391
de27cbd
363f1e0
83c4cad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,14 +88,14 @@ var _ = BeforeSuite(func() { | |
useExisting := false | ||
testEnv = &envtest.Environment{ | ||
UseExistingCluster: &useExisting, | ||
CRDs: []client.Object{ | ||
crds.CatalogSource(), | ||
crds.ClusterServiceVersion(), | ||
crds.InstallPlan(), | ||
crds.Subscription(), | ||
crds.OperatorGroup(), | ||
crds.Operator(), | ||
crds.OperatorCondition(), | ||
CRDs: []apiextensionsv1.CustomResourceDefinition{ | ||
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. nb: Is this something we should move to across the board when using controller-runtime moving forward? |
||
*crds.CatalogSource(), | ||
*crds.ClusterServiceVersion(), | ||
*crds.InstallPlan(), | ||
*crds.Subscription(), | ||
*crds.OperatorGroup(), | ||
*crds.Operator(), | ||
*crds.OperatorCondition(), | ||
}, | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,15 +30,15 @@ var _ = Describe("Not found APIs", func() { | |
// each entry is an installplan with a deprecated resource | ||
type payload struct { | ||
name string | ||
ip *operatorsv1alpha1.InstallPlan | ||
IP *operatorsv1alpha1.InstallPlan | ||
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. Non-blocking: Why was this exported? |
||
errMessage string | ||
} | ||
|
||
var tableEntries []table.TableEntry | ||
tableEntries = []table.TableEntry{ | ||
table.Entry("contains an entry with a missing API not found on cluster ", payload{ | ||
name: "installplan contains a missing API", | ||
ip: &operatorsv1alpha1.InstallPlan{ | ||
IP: &operatorsv1alpha1.InstallPlan{ | ||
ObjectMeta: metav1.ObjectMeta{ | ||
Namespace: *namespace, // this is necessary due to ginkgo table semantics, see https://github.com/onsi/ginkgo/issues/378 | ||
Name: "test-plan-api", | ||
|
@@ -48,41 +48,43 @@ var _ = Describe("Not found APIs", func() { | |
Approved: true, | ||
ClusterServiceVersionNames: []string{}, | ||
}, | ||
Status: operatorsv1alpha1.InstallPlanStatus{ | ||
Phase: operatorsv1alpha1.InstallPlanPhaseInstalling, | ||
CatalogSources: []string{}, | ||
Plan: []*operatorsv1alpha1.Step{ | ||
{ | ||
Resolving: "test-csv", | ||
Status: operatorsv1alpha1.StepStatusUnknown, | ||
Resource: operatorsv1alpha1.StepResource{ | ||
Name: "my.thing", | ||
Group: "verticalpodautoscalers.autoscaling.k8s.io", | ||
Version: "v1", | ||
Kind: "VerticalPodAutoscaler", | ||
Manifest: missingAPI, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
errMessage: "api-server resource not found installing VerticalPodAutoscaler my.thing: GroupVersionKind " + | ||
"verticalpodautoscalers.autoscaling.k8s.io/v1, Kind=VerticalPodAutoscaler not found on the cluster", | ||
}), | ||
} | ||
|
||
table.DescribeTable("the ip enters a failed state with a helpful error message", func(tt payload) { | ||
Expect(ctx.Ctx().Client().Create(context.Background(), tt.ip)).To(Succeed()) | ||
Expect(ctx.Ctx().Client().Status().Update(context.Background(), tt.ip)).To(Succeed()) | ||
Expect(ctx.Ctx().Client().Create(context.Background(), tt.IP)).To(Succeed()) | ||
|
||
tt.IP.Status = operatorsv1alpha1.InstallPlanStatus{ | ||
Phase: operatorsv1alpha1.InstallPlanPhaseInstalling, | ||
CatalogSources: []string{}, | ||
Plan: []*operatorsv1alpha1.Step{ | ||
{ | ||
Resolving: "test-csv", | ||
Status: operatorsv1alpha1.StepStatusUnknown, | ||
Resource: operatorsv1alpha1.StepResource{ | ||
Name: "my.thing", | ||
Group: "verticalpodautoscalers.autoscaling.k8s.io", | ||
Version: "v1", | ||
Kind: "VerticalPodAutoscaler", | ||
Manifest: missingAPI, | ||
}, | ||
}, | ||
}, | ||
} | ||
|
||
Expect(ctx.Ctx().Client().Status().Update(context.Background(), tt.IP)).To(Succeed(), "failed to update the resource") | ||
|
||
// The IP sits in the Installing phase with the GVK missing error | ||
Eventually(func() (*operatorsv1alpha1.InstallPlan, error) { | ||
return tt.ip, ctx.Ctx().Client().Get(context.Background(), client.ObjectKeyFromObject(tt.ip), tt.ip) | ||
return tt.IP, ctx.Ctx().Client().Get(context.Background(), client.ObjectKeyFromObject(tt.IP), tt.IP) | ||
}).Should(And(HavePhase(operatorsv1alpha1.InstallPlanPhaseInstalling)), HaveMessage(tt.errMessage)) | ||
|
||
// Eventually the IP fails with the GVK missing error, after installplan retries, which is by default 1 minute. | ||
Eventually(func() (*operatorsv1alpha1.InstallPlan, error) { | ||
return tt.ip, ctx.Ctx().Client().Get(context.Background(), client.ObjectKeyFromObject(tt.ip), tt.ip) | ||
return tt.IP, ctx.Ctx().Client().Get(context.Background(), client.ObjectKeyFromObject(tt.IP), tt.IP) | ||
}, 2*time.Minute).Should(And(HavePhase(operatorsv1alpha1.InstallPlanPhaseFailed)), HaveMessage(tt.errMessage)) | ||
}, tableEntries...) | ||
}) | ||
|
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.
Tracking the removal of this pin in #2353 (comment).