Sunny
f4aed8baf8
OCIRepoReconciler: no-op reconcile improvements
...
Introduce contentConfigChecksum in the OCIRepository status to store a
checksum of the values that affect the source artifact. It is used to
detect when to rebuild an artifact when the spec changes.
The considerations for this are similar to the GitRepository
reconciler no-op clone implementation. Both reconcileSource and
reconcileArtifact need to consider the source configuration change
when deciding if the artifact in the storage is up-to-date.
Adds tests for reconcileSource and reconcileArtifact for the noop
cases.
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-09-29 09:48:27 +03:00
Stefan Prodan
3f7d4630cc
Use the OCI artifact revision in status and events
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-26 13:30:28 +03:00
Stefan Prodan
aae9d917fb
Optimise OCI artifacts reconciliation
...
- Fetch the upstream digest before validation and pulling
- Pull artifact only if the upstream digest is different from the one in storage
- Add the image tag to the revision string `<tag>/<digest-hex>` for a better UX
- Extract the layer processing to a dedicated function
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-24 10:30:46 +03:00
Stefan Prodan
4ec51ca306
Add option to copy the OCI layer to storage
...
Add on optional field to the `OCIRepository.spec.layerSelector` called `operation` that accepts one of the following values: `extract` or `copy`. When the operation is set to `copy`, instead of extracting the compressed layer, the controller copies the compressed blob as it is to storage, thus keeping the original content unaltered.
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-23 19:00:30 +03:00
Stefan Prodan
3b637a82fe
Add tests for keyless verification
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-22 12:25:40 +03:00
Stefan Prodan
082028e115
Refactor internal OCI package
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-20 18:34:02 +03:00
Batuhan Apaydın
2db2715988
feat: add condition tests for verification logic
...
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2022-09-20 14:07:11 +03:00
Stefan Prodan
44b8288d83
Add basic cosign verification tests
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-20 14:07:11 +03:00
Furkan
697f260dba
Introduce Initial OCIRepository Source Verification
...
Fixes #863
Signed-off-by: Furkan <furkan.turkal@trendyol.com>
Co-authored-by: Batuhan <batuhan.apaydin@trendyol.com>
Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
2022-09-20 14:07:10 +03:00
Soule BA
869c73d0ad
secretRef take precedence over provider
...
if secretRef is provided, we do not attempt to resolve oidc
Signed-off-by: Soule BA <soule@weave.works>
2022-09-09 14:43:35 +02:00
Stefan Prodan
e1ad5a6fd3
Add `spec.insecure` to OCIRepository API
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-31 11:10:25 +03:00
Stefan Prodan
49dc30922d
Add tests for OCI layer selector
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-24 12:27:30 +03:00
Stefan Prodan
11dc0a3bc7
Select layer by OCI media type
...
Allow specifying the media type of the layer which should be extracted from the OCI artifact.
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-23 12:25:18 +03:00
Stefan Prodan
1a59935858
Add OCI failure reasons to API
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-05 13:24:06 +03:00
Stefan Prodan
c52576c151
Mark resource as stalled on invalid URL
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-04 16:52:55 +03:00
Stefan Prodan
63c94397f7
Implement OCI auth for cloud providers
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-04 13:29:03 +03:00
Stefan Prodan
acc95d8c50
Add upstream source and revision to logs and events
...
Enrich the successful reconciliation event message with the upstream opencontainers annotations
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:11:15 +03:00
Somtochi Onyekwere
25b88256ef
Add tests for reconcile delete
...
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-02 13:11:08 +03:00
Somtochi Onyekwere
eb40efea1c
reconcile artifact
...
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-02 13:07:08 +03:00
Somtochi Onyekwere
648beef063
Add test for reconcileArtifact
...
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-02 13:07:08 +03:00
Somtochi Onyekwere
e42e9d086c
Add tests for getArtifactURL
...
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-02 13:07:08 +03:00
Somtochi Onyekwere
b072d78874
Add tests for oci controller
...
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-02 13:07:07 +03:00
Stefan Prodan
05f9c0ee2b
Add the OCI metadata to the internal artifact
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:07:07 +03:00
Stefan Prodan
4b0729203b
Add OCIRepository API spec to docs
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:07:07 +03:00
Rashed Kamal
942d92834b
OCIRepository client cert auth
...
Signed-off-by: Rashed Kamal <krashed@vmware.com>
2022-08-02 13:07:07 +03:00
Stefan Prodan
ded0c2d78b
Add `oci://` prefix
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:07:06 +03:00
rashedkvm
c9f5af7ddc
Implements basic auth with static credentials OCIRepository
...
Signed-off-by: rashedkvm <krashed@vmware.com>
2022-08-02 13:07:06 +03:00
Stefan Prodan
768adc2dd9
Implement OCIRepository ref.semver
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:07:06 +03:00
Stefan Prodan
07466730c0
Implement OCIRepository controller for public repos
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:07:06 +03:00