Commit 3c7b8a3
committed
HIVE-2302: Save metadata.json opaquely
Well, mostly.
Previously any time installer added a field to metadata.json, we would
need to evaluate and possibly add a bespoke field and code path for it
to make sure it was supplied to the destroyer at deprovision time.
With this change, we're offloading metadata.json verbatim (except in
some cases we have to scrub/replace credentials fields -- see HIVE-2804
/ #2612) to a new Secret in the ClusterDeployment's namespace,
referenced from a new field:
ClusterDeployment.Spec.ClusterMetadata.MetadataJSONSecretRef.
For legacy clusters -- those created before this change -- we attempt to
retrofit the new Secret based on the legacy fields. This is best effort
and may not always work.
In the future (but not here!) instead of building the installer's
ClusterMetadata structure for the destroyer with individual fields from
the CD's ClusterMetadata, we'll unmarshal it directly from the contents
of this Secret.1 parent c248a51 commit 3c7b8a3
File tree
24 files changed
+685
-40
lines changed- apis/hive/v1
- aws
- azure
- gcp
- config/crds
- contrib/pkg/createcluster
- hack/app-sre
- pkg
- clusterresource
- constants
- controller
- argocdregister
- clusterclaim
- clusterdeployment
- validating-webhooks/hive/v1
- vendor/github.com/openshift/hive/apis/hive/v1
- aws
- azure
- gcp
24 files changed
+685
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
183 | 199 | | |
184 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
185 | 204 | | |
186 | 205 | | |
187 | 206 | | |
| |||
190 | 209 | | |
191 | 210 | | |
192 | 211 | | |
| 212 | + | |
| 213 | + | |
193 | 214 | | |
194 | 215 | | |
195 | 216 | | |
196 | 217 | | |
197 | 218 | | |
198 | 219 | | |
199 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
200 | 224 | | |
201 | 225 | | |
202 | 226 | | |
| |||
205 | 229 | | |
206 | 230 | | |
207 | 231 | | |
208 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
209 | 236 | | |
210 | 237 | | |
211 | 238 | | |
| |||
Lines changed: 30 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
95 | 111 | | |
96 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
97 | 116 | | |
98 | 117 | | |
99 | 118 | | |
| |||
102 | 121 | | |
103 | 122 | | |
104 | 123 | | |
| 124 | + | |
| 125 | + | |
105 | 126 | | |
106 | 127 | | |
107 | 128 | | |
108 | 129 | | |
109 | 130 | | |
110 | 131 | | |
111 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
112 | 136 | | |
113 | 137 | | |
114 | 138 | | |
| |||
117 | 141 | | |
118 | 142 | | |
119 | 143 | | |
120 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
121 | 148 | | |
122 | 149 | | |
123 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
| 341 | + | |
340 | 342 | | |
341 | 343 | | |
342 | 344 | | |
| |||
486 | 488 | | |
487 | 489 | | |
488 | 490 | | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
489 | 497 | | |
490 | 498 | | |
491 | 499 | | |
492 | 500 | | |
493 | 501 | | |
494 | | - | |
495 | | - | |
| 502 | + | |
| 503 | + | |
496 | 504 | | |
497 | 505 | | |
498 | 506 | | |
| |||
638 | 646 | | |
639 | 647 | | |
640 | 648 | | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
641 | 656 | | |
642 | 657 | | |
643 | 658 | | |
| |||
0 commit comments