Commit da4f73c
🌱 Externalize CER phase objects into Secrets (#2595)
* Externalize CER phase objects into Secret refs
Add support for storing ClusterExtensionRevision phase objects in
content-addressable immutable Secrets instead of inline in the CER spec.
This removes the etcd object size limit as a constraint on bundle size.
API changes:
- Add ObjectSourceRef type with name, namespace, and key fields
- Make ClusterExtensionRevisionObject.Object optional (omitzero)
- Add optional Ref field with XValidation ensuring exactly one is set
- Add RefResolutionFailed condition reason
- Add RevisionNameKey label for ref Secret association
Applier (boxcutter.go):
- Add SecretPacker to bin-pack serialized objects into Secrets with
gzip compression for objects exceeding 800KiB
- Add createExternalizedRevision with crash-safe three-step sequence:
create Secrets, create CER with refs, patch ownerReferences
- Externalize desiredRevision before SSA comparison so the patch
compares refs-vs-refs instead of inline-vs-refs
- Add ensureSecretOwnerReferences for crash recovery
- Pass SystemNamespace to Boxcutter from main.go
CER controller:
- Add resolveObjectRef to fetch and decompress objects from Secrets
- Handle ref resolution in buildBoxcutterPhases
- Add RBAC for Secret get/list/watch
E2e tests:
- Add scenario verifying refs, immutability, labels, and ownerRefs
- Add step definitions for ref Secret validation
- Fix listExtensionRevisionResources and
ClusterExtensionRevisionObjectsNotFoundOrNotOwned to resolve refs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address PR #2595 review feedback
- Fix duplicate key size inflation in SecretPacker by only incrementing
size for new content hash keys
- Add io.LimitReader (10 MiB cap) for gzip decompression to prevent
gzip bombs in controller and e2e helpers
- Add doc comment clarifying ObjectSourceRef.Namespace defaults to OLM
system namespace during ref resolution
- Fix docs: orphan cleanup uses ownerReference GC, ref resolution
failures are retried (not terminal)
- Remove unused ClusterExtensionRevisionReasonRefResolutionFailed constant
- Add default error branch in e2e listExtensionRevisionResources for
objects missing both ref and inline content
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Change gzipThreshold from 800 KiB to 900 KiB
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent e709e65 commit da4f73c
File tree
22 files changed
+2473
-46
lines changed- api/v1
- applyconfigurations
- api/v1
- cmd/operator-controller
- docs
- api-reference
- concepts
- helm/olmv1/base/operator-controller/crd/experimental
- internal/operator-controller
- applier
- controllers
- labels
- manifests
- test/e2e
- features
- steps
22 files changed
+2473
-46
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
395 | 399 | | |
396 | | - | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
397 | 403 | | |
398 | 404 | | |
399 | 405 | | |
400 | 406 | | |
401 | 407 | | |
402 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
403 | 418 | | |
404 | 419 | | |
405 | 420 | | |
| |||
425 | 440 | | |
426 | 441 | | |
427 | 442 | | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
428 | 470 | | |
429 | 471 | | |
430 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
275 | 346 | | |
276 | 347 | | |
277 | 348 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
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 | |
|---|---|---|---|
| |||
634 | 634 | | |
635 | 635 | | |
636 | 636 | | |
| 637 | + | |
637 | 638 | | |
638 | 639 | | |
639 | 640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
| 478 | + | |
| 479 | + | |
478 | 480 | | |
479 | 481 | | |
480 | 482 | | |
| |||
0 commit comments