• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

opendefensecloud / solution-arsenal / 27404628011
75%

Build:
DEFAULT BRANCH: main
Ran 12 Jun 2026 08:51AM UTC
Jobs 1
Files 33
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 Jun 2026 08:36AM UTC coverage: 74.416% (+0.3%) from 74.122%
27404628011

push

github

web-flow
feat: implemented artifact cleanup (#554)

## What
Clean up rendered OCI artifacts and `RenderTask`s when SolAr API
resources are deleted.
Closes #358

## Why
Deleting a `ReleaseBinding` or `Target` previously left orphaned
`RenderTask` objects and OCI images in the render registry. This
implements the full deletion lifecycle.

## Testing
- Unit tests: `RenderArtifactReconciler` covered with fake client +
injected `DeleteTag` stub (`pkg/controller`)
- Unit tests: `TargetReconciler` extended for `ensureRenderArtifact`,
`ensureRenderBinding`, and `deleteStaleRenderBindings`
- `pkg/ociregistry.DeleteTag` tested for success and error paths
- E2E:
  - 1 artifact + 1 binding created on first render
- Same artifact reused (2 bindings) when a second Target renders the
same release
  - Artifact survives removal of one binding while another remains
- Artifact GC'd and OCI tag deleted after last binding removed via
Target deletion (finalizer path)
- Artifact GC'd and OCI tag deleted after last ReleaseBinding deleted
directly (stale-binding path)


## Notes for reviewers
**New API resources (CRD-equivalent, served via extension apiserver):**
- `RenderArtifact` records OCI coordinates of a pushed chart artifact;
carries a finalizer; reconciled by `RenderArtifactReconciler`
- `RenderBinding` ref-count record linking a Target to a
`RenderArtifact`; drives GC when the last binding is removed

**Helm chart:** top-level `caBundle` block added to mount a CA bundle
`ConfigMap` into the controller-manager pod (`SSL_CERT_FILE`), required
for TLS to self-signed registries in cluster.

## Checklist
- [x] Tests added/updated
- [x] No breaking changes (or upgrade path documented above)
- [x] Readable commit history (squashed and cleaned up as desired)
- [x] AI code review considered and comments resolved


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added RenderArtifact and RenderBinding CRDs, typed
... (continued)

312 of 425 new or added lines in 6 files covered. (73.41%)

2 existing lines in 1 file now uncovered.

2964 of 3983 relevant lines covered (74.42%)

41.55 hits per line

Uncovered Changes

Lines Coverage ∆ File
49
76.78
pkg/controller/renderartifact_controller.go
41
72.68
0.58% pkg/controller/target_controller.go
19
76.59
-3.55% pkg/controller/helpers.go
2
47.22
-2.78% cmd/solar-apiserver/main.go
2
84.62
pkg/ociregistry/standard.go

Coverage Regressions

Lines Coverage ∆ File
2
87.7
0.91% pkg/controller/rendertask_controller.go
Jobs
ID Job ID Ran Files Coverage
1 27404628011.1 12 Jun 2026 08:51AM UTC 33
74.42
GitHub Action Run
Source Files on build 27404628011
  • Tree
  • List 33
  • Changed 5
  • Source Changed 3
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27404628011
  • 762f047d on github
  • Prev Build on main (#27348406272)
  • Next Build on main (#27414439904)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc