Skip to content

Commit 3a91c53

Browse files
committed
UPSTREAM: <carry>: OCPBUGS-66965 rollout stall for webhook installs
1 parent 056fa80 commit 3a91c53

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
@@ -120,10 +120,10 @@ var (
120120
PhaseInfrastructure: {
121121
{Kind: "Service"},
122122
{Kind: "Issuer", Group: "cert-manager.io"},
123+
{Kind: "Certificate", Group: "cert-manager.io"},
123124
},
124125

125126
PhaseDeploy: {
126-
{Kind: "Certificate", Group: "cert-manager.io"},
127127
{Kind: "Deployment", Group: "apps"},
128128
},
129129

internal/operator-controller/applier/phase_test.go

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,17 @@ func Test_PhaseSort(t *testing.T) {
165165
},
166166
},
167167
},
168+
{
169+
Object: &unstructured.Unstructured{
170+
Object: map[string]interface{}{
171+
"apiVersion": "cert-manager.io/v1",
172+
"kind": "Certificate",
173+
"metadata": map[string]interface{}{
174+
"name": "test",
175+
},
176+
},
177+
},
178+
},
168179
{
169180
Object: &unstructured.Unstructured{
170181
Object: map[string]interface{}{
@@ -314,6 +325,17 @@ func Test_PhaseSort(t *testing.T) {
314325
},
315326
},
316327
},
328+
{
329+
Object: &unstructured.Unstructured{
330+
Object: map[string]interface{}{
331+
"apiVersion": "cert-manager.io/v1",
332+
"kind": "Certificate",
333+
"metadata": map[string]interface{}{
334+
"name": "test",
335+
},
336+
},
337+
},
338+
},
317339
},
318340
},
319341
{
@@ -454,7 +476,7 @@ func Test_PhaseSort(t *testing.T) {
454476
want: []*ocv1ac.ClusterExtensionRevisionPhaseApplyConfiguration{},
455477
},
456478
{
457-
name: "sort by group within same phase",
479+
name: "sort by group across infrastructure and deploy phases",
458480
objs: []ocv1ac.ClusterExtensionRevisionObjectApplyConfiguration{
459481
{
460482
Object: &unstructured.Unstructured{
@@ -481,24 +503,29 @@ func Test_PhaseSort(t *testing.T) {
481503
},
482504
want: []*ocv1ac.ClusterExtensionRevisionPhaseApplyConfiguration{
483505
{
484-
Name: ptr.To(string(applier.PhaseDeploy)),
506+
Name: ptr.To(string(applier.PhaseInfrastructure)),
485507
Objects: []ocv1ac.ClusterExtensionRevisionObjectApplyConfiguration{
486508
{
487509
Object: &unstructured.Unstructured{
488510
Object: map[string]interface{}{
489-
"apiVersion": "apps/v1",
490-
"kind": "Deployment",
511+
"apiVersion": "cert-manager.io/v1",
512+
"kind": "Certificate",
491513
"metadata": map[string]interface{}{
492514
"name": "test",
493515
},
494516
},
495517
},
496518
},
519+
},
520+
},
521+
{
522+
Name: ptr.To(string(applier.PhaseDeploy)),
523+
Objects: []ocv1ac.ClusterExtensionRevisionObjectApplyConfiguration{
497524
{
498525
Object: &unstructured.Unstructured{
499526
Object: map[string]interface{}{
500-
"apiVersion": "cert-manager.io/v1",
501-
"kind": "Certificate",
527+
"apiVersion": "apps/v1",
528+
"kind": "Deployment",
502529
"metadata": map[string]interface{}{
503530
"name": "test",
504531
},

0 commit comments

Comments
 (0)