Commit 662ecf2
Refine registry+v1 revision phase definitions for granular resource ordering (#2520)
Restructure the phase definitions to provide more granular control over
the order in which Kubernetes resources are applied during extension
installation. The previous coarse-grained phases (rbac, deploy, publish)
are replaced with finer-grained phases that better reflect resource
dependency chains and operational best practices.
Phase changes:
- Split "rbac" into "identity" (ServiceAccount), "roles" (ClusterRole,
Role), and "bindings" (ClusterRoleBinding, RoleBinding) for explicit
ordering of RBAC prerequisites before their bindings
- Extract "configuration" phase (Secret, ConfigMap) from "deploy" so
config resources are available before workloads that mount them
- Extract "infrastructure" phase (Service, Issuer) from "deploy" so
services and cert-manager issuers exist before workloads reference them
- Add "scaling" phase (VerticalPodAutoscaler) after deploy for
autoscaling policies to target running workloads
- Add "admission" phase (ValidatingWebhookConfiguration,
MutatingWebhookConfiguration) as the final phase so webhooks are
registered only after their backing services are ready
- Move CRDs before roles/bindings so RBAC rules referencing custom
resources can be validated
- Add cert-manager Certificate to "deploy" phase alongside Deployment
- Add monitoring resources (PrometheusRule, ServiceMonitor, PodMonitor)
and OpenShift console resources to "publish" phase
- Remove explicit mappings for workload kinds that already default to
"deploy" (DaemonSet, StatefulSet, ReplicaSet, Pod, Job, CronJob)
New phase order: namespaces → policies → identity → configuration →
storage → crds → roles → bindings → infrastructure → deploy →
scaling → publish → admission
Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
Co-authored-by: Per G. da Silva <pegoncal@redhat.com>1 parent b49a5b8 commit 662ecf2
File tree
3 files changed
+221
-91
lines changed- internal/operator-controller/applier
3 files changed
+221
-91
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
236 | 241 | | |
237 | 242 | | |
238 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
49 | 57 | | |
| 58 | + | |
50 | 59 | | |
| 60 | + | |
51 | 61 | | |
52 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
53 | 69 | | |
54 | 70 | | |
55 | 71 | | |
| |||
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 78 | | |
66 | | - | |
67 | 79 | | |
| 80 | + | |
68 | 81 | | |
69 | 82 | | |
70 | | - | |
| 83 | + | |
71 | 84 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | 85 | | |
80 | 86 | | |
81 | | - | |
82 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| |||
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
91 | 117 | | |
| 118 | + | |
92 | 119 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
102 | 124 | | |
103 | 125 | | |
104 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
105 | 130 | | |
106 | | - | |
107 | 131 | | |
108 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
109 | 140 | | |
| 141 | + | |
110 | 142 | | |
111 | 143 | | |
112 | 144 | | |
| |||
0 commit comments