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
Sunny
90b7cec915
ocirepo: Fix event trace type value
...
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-09-22 15:42:53 +05:30
Sunny
64bd34f116
Use bipolarity option in gitrepo and ocirepo
...
Use the bipolarity condition options in OCIRepository and GitRepository
reconcilers.
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-09-22 15:42:53 +05:30
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
7c92949d17
Retry failed verifications with exponential backoff
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-20 21:26:34 +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
Furkan
03af4f6418
fix: ocirepository_controller reviews
...
Signed-off-by: Furkan <furkan.turkal@trendyol.com>
2022-09-20 14:07:11 +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
3cb8046866
Add SourceVerifiedCondition to OCI source conditions
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-09-20 14:07:11 +03:00
Stefan Prodan
7c72acc5b0
Set timeout for cosgin verification
...
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
Sunny
59294bf582
controllers: Remove ctx overwrite
...
Context in the reconcilers were overwritten earlier after adding new
log field `reconcileID` in the logger. Since the `reconcileID` is now
set by controller-runtime, this is no longer needed. The logger in the
context already has the field set and when the context is passed to
other functions, they too have the logger with the reconcileID set.
Signed-off-by: Sunny <darkowlzz@protonmail.com>
2022-09-04 18:56:02 +05:30
Somtochi Onyekwere
c38fafe128
Align controller logs to Kubernetes structured logging
...
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
2022-08-31 14:24:40 +01: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
181b2177fe
Add support for plain HTTP OCIRepositories
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-31 10:08:29 +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
Santosh Kaluskar
1ad2f004ac
Implementing RecoverPanic on reconcilers to ensure it recovers from panic instead of crashing the controller and Squashed commits.
...
Signed-off-by: Santosh Kaluskar <dtshbl@gmail.com>
2022-08-11 18:35:25 +05:30
Stefan Prodan
94e98ee5ca
Add the opencontainers annotations to API docs
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-08 12:58:04 +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
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
Stefan Prodan
9a6ff19487
Normalise error messages
...
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
4506acb9d6
Use the internal pkg to handle errors
...
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
2022-08-02 13:07:06 +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