Skip to content

Commit 7f1aa76

Browse files
authored
UPSTREAM: <carry>: OCPBUGS-81452 rollout stall for webhook installs (#2616)
1 parent 8bd971b commit 7f1aa76

File tree

2 files changed

+34
-7
lines changed

2 files changed

+34
-7
lines changed

internal/operator-controller/applier/phase.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,10 @@ var (
112112
PhaseInfrastructure: {
113113
{Kind: "Service"},
114114
{Kind: "Issuer", Group: "cert-manager.io"},
115+
{Kind: "Certificate", Group: "cert-manager.io"},
115116
},
116117

117118
PhaseDeploy: {
118-
{Kind: "Certificate", Group: "cert-manager.io"},
119119
{Kind: "Deployment", Group: "apps"},
120120
},
121121

internal/operator-controller/applier/phase_test.go

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,17 @@ func Test_PhaseSort(t *testing.T) {
160160
},
161161
},
162162
},
163+
{
164+
Object: &unstructured.Unstructured{
165+
Object: map[string]interface{}{
166+
"apiVersion": "cert-manager.io/v1",
167+
"kind": "Certificate",
168+
"metadata": map[string]interface{}{
169+
"name": "test",
170+
},
171+
},
172+
},
173+
},
163174
{
164175
Object: &unstructured.Unstructured{
165176
Object: map[string]interface{}{
@@ -309,6 +320,17 @@ func Test_PhaseSort(t *testing.T) {
309320
},
310321
},
311322
},
323+
{
324+
Object: &unstructured.Unstructured{
325+
Object: map[string]interface{}{
326+
"apiVersion": "cert-manager.io/v1",
327+
"kind": "Certificate",
328+
"metadata": map[string]interface{}{
329+
"name": "test",
330+
},
331+
},
332+
},
333+
},
312334
},
313335
},
314336
{
@@ -449,7 +471,7 @@ func Test_PhaseSort(t *testing.T) {
449471
want: []*ocv1ac.ClusterObjectSetPhaseApplyConfiguration{},
450472
},
451473
{
452-
name: "sort by group within same phase",
474+
name: "sort by group across infrastructure and deploy phases",
453475
objs: []ocv1ac.ClusterObjectSetObjectApplyConfiguration{
454476
{
455477
Object: &unstructured.Unstructured{
@@ -476,24 +498,29 @@ func Test_PhaseSort(t *testing.T) {
476498
},
477499
want: []*ocv1ac.ClusterObjectSetPhaseApplyConfiguration{
478500
{
479-
Name: ptr.To(string(applier.PhaseDeploy)),
501+
Name: ptr.To(string(applier.PhaseInfrastructure)),
480502
Objects: []ocv1ac.ClusterObjectSetObjectApplyConfiguration{
481503
{
482504
Object: &unstructured.Unstructured{
483505
Object: map[string]interface{}{
484-
"apiVersion": "apps/v1",
485-
"kind": "Deployment",
506+
"apiVersion": "cert-manager.io/v1",
507+
"kind": "Certificate",
486508
"metadata": map[string]interface{}{
487509
"name": "test",
488510
},
489511
},
490512
},
491513
},
514+
},
515+
},
516+
{
517+
Name: ptr.To(string(applier.PhaseDeploy)),
518+
Objects: []ocv1ac.ClusterObjectSetObjectApplyConfiguration{
492519
{
493520
Object: &unstructured.Unstructured{
494521
Object: map[string]interface{}{
495-
"apiVersion": "cert-manager.io/v1",
496-
"kind": "Certificate",
522+
"apiVersion": "apps/v1",
523+
"kind": "Deployment",
497524
"metadata": map[string]interface{}{
498525
"name": "test",
499526
},

0 commit comments

Comments
 (0)