1
0
mirror of https://github.com/openshift/image-registry.git synced 2026-02-05 09:45:55 +01:00

350 Commits

Author SHA1 Message Date
Ricardo Maraschini
94dae5f64f chore: address vet after bumping library-go
when we bump library-go the function diff.ObjectGoPrintDiff vanished. we
need to replace it with diff.ObjectGoPrintSideBySide on all test files.
2026-01-15 17:51:29 +01:00
Flavian Missi
2026b6d81c metrics: document error codes 2024-10-21 15:10:02 +02:00
Flavian Missi
c14ef8b7f5 metrics: report filesystem errors
to help customers detect and solve errors, we specifically report
metrics on a few filesystem specific errors.

we have seen customers configure the registry with a read-only
filesystem without noticing until it's too late. more specifically, when
using the registry only as a pull-through cache, a read-only filesystem
will be imperceptible to clients unless the upstream registry
experiences an outage, then it'll be too late to fix the cache.

the file too large (EFBIG) and device out of space (ENOSPC) errors were
added just in case. there have not been (so far) reports of customers
silently running into this errors on their PVCs.
2024-09-26 17:15:48 +02:00
Flavian Missi
8317f5e28b metrics: turn error codes into constants 2024-09-24 11:49:30 +02:00
Flavian Missi
4fd4de64c6 pkg/dockerregistry/server/client: removed unused user interface
now that we rely on the SelfSubjectReview api to get user info, we no
longer need the openshfit specific user client.
2024-06-14 14:47:21 +02:00
Flavian Missi
018bd4544a pkg/dockerregistry/server: use SelfAccessReview api instead of users
the users api is specific to openshift, and is not available on every
openshift cluster, i.e when OIDC is configured with external users.
2024-06-14 14:43:41 +02:00
Flavian Missi
9a0f90d952 pkg/dockerregistry/server: gofumpt auth test file 2024-06-14 14:42:57 +02:00
Krzysztof Ostrowski
64b7965e70 p/d/server: try SAR for unauthenticated
With AUTH-509 the ability for the unauthenticated group to do
selfsubjectacessreviews (ssar) has been removed. In case that the ssar
fails, we attempt a subjectaccessreview for system:anonymous or the
system:unauthenticated group.
2024-06-04 16:22:20 +02:00
Krzysztof Ostrowski
9b3550d810 p/d/server: refactor verifyWithSAR 2024-06-04 16:10:24 +02:00
openshift-ci[bot]
855b24b7a2 Merge pull request #378 from flavianmissi/OCPBUGS-17674
IR-401: pkg/dockerregistry/server/configuration: remove OPENSHIFT_DEFAULT_REGISTRY support
2023-10-23 13:32:15 +00:00
Qi Wang
d68b0d7dfd Allow ICSP IDMS coexisting
Allow ICSP IDMS coexisting

Signed-off-by: Qi Wang <qiwan@redhat.com>
2023-10-16 21:04:28 -04:00
Flavian Missi
37f9e646f4 pkg/dockerregistry: increase rest Config QPS and Burst 2023-09-18 15:07:43 +02:00
Flavian Missi
6bd6aac4de pkg/dockerregistry/server/configuration: remove OPENSHIFT_DEFAULT_REGISTRY support
also remove support for DOCKER_REGISTRY_SERVICE_HOST and DOCKER_REGISTRY_SERVICE_PORT
env vars.
2023-09-04 17:14:25 +02:00
Flavian Missi
ecf85057be pkg/dockerregistry/server/configuration: format test file 2023-09-04 16:14:58 +02:00
Qi Wang
ec0ff6e562 [OCPNODE-1258] Migrate icsp to idms
Signed-off-by: Qi Wang <qiwan@redhat.com>
2023-08-21 15:22:25 -04:00
Stephen Benjamin
9c1c93e3b3 Revert "[OCPNODE-1258] Support both icsp and idms" 2023-07-24 15:47:29 -04:00
Qi Wang
45da6c3765 [OCPNODE-1258] Migrate icsp to idms
Signed-off-by: Qi Wang <qiwan@redhat.com>
2023-07-18 01:09:20 -04:00
Flavian Missi
51d044856c pkg/dockerregistry: stop using router in tests
distribution/distribution#3683 made the router global.
this broke all our pullthrough tests.
since TestBlobDescriptorServiceIsApplied was the only one using the
router it was easier to remove that from our code than to introduce the
router host call to every failing test.
2023-06-26 14:01:44 +02:00
Flavian Missi
c0c9012af1 pkg/dockerregistry/server: give ctx to filewriter Cancel method
also fix cache provider initialisation
2023-06-26 14:01:44 +02:00
Flavian Missi
f9d93c44be pkg,test: import distribution/distribution/v3
instead of the deprecated docker/distribution
2023-06-19 12:06:47 +02:00
Forrest Babcock
81fae2eb92 Revert "Merge pull request #370 from flavianmissi/bump-docker-distribution"
This reverts commit b095928ea9, reversing
changes made to 92c7270360.
2023-06-16 10:37:39 -04:00
Flavian Missi
e699cc2c81 pkg/dockerregistry: stop using router in tests
distribution/distribution#3683 made the router global.
this broke all our pullthrough tests.
since TestBlobDescriptorServiceIsApplied was the only one using the
router it was easier to remove that from our code than to introduce the
router host call to every failing test.
2023-06-13 12:03:24 +02:00
Flavian Missi
80fc1891f5 pkg/dockerregistry/server: give ctx to filewriter Cancel method
also fix cache provider initialisation
2023-06-13 12:03:24 +02:00
Flavian Missi
342cc1a242 pkg,test: import distribution/distribution/v3
instead of the deprecated docker/distribution
2023-06-13 12:03:23 +02:00
Flavian Missi
92cb1356bb pkg/dockerregistry/server: handle push by digest
to support manifest lists and oci image indexes, push by digest support
is required.

when a client pushes a manifest list, they will first push each
sub-manifest and its blobs, then finally push the manifest list.

a connection between an image and an image stream is represented via
image stream tags. an image which represents a sub-manifest of a
manifest list is however not directly connected to an image stream, and
it doesn't have an image stream tag.

because of this lack of image stream tag for images representing
sub-manifests of a manifest list, the registry needs to perform a
different action when faced with a push by digest. instead of creating
an image stream mapping between the image stream and the image, it will
simply create an image object for the sub-manifest.
2023-01-25 16:30:42 +01:00
Flavian Missi
275c011fbd pkg/dockerregistry/server/manifesthandler: add manifest list handler 2023-01-25 16:27:42 +01:00
Flavian Missi
ce0b4e544d pkg/dockerregistry/server/util: format file 2023-01-25 16:20:30 +01:00
OpenShift Merge Robot
ea10e9d1a5 Merge pull request #353 from flavianmissi/IR-264
IR-264: add basic tests for hard pruner
2022-11-25 02:57:23 -05:00
OpenShift Merge Robot
127349a1e5 Merge pull request #345 from dorzel/IR-268
IR-268: Support pull through with Manifest Lists
2022-11-22 10:43:40 -05:00
Flavian Missi
0a073f5212 IR-264: add basic tests for hard pruner 2022-11-22 15:32:07 +01:00
Flavian Missi
81c303d613 IR-299: use clock pkg from k8s.io/utils/clock 2022-10-17 14:40:39 +02:00
Flavian Missi
99471aafba IR-299: bump go to 1.19 and k8s to 1.25.2 2022-10-17 14:39:29 +02:00
Dylan Orzel
99b20f708c Add import to gain JSON unmarshalling for ManifestList schema types 2022-09-13 12:29:07 -06:00
Oleg Bulatov
e527769089 Add support of OCI images to hard pruner 2022-08-18 14:51:31 +02:00
Oleg Bulatov
80e24e9dd1 Remove dead code 2022-08-18 14:33:11 +02:00
OpenShift Merge Robot
b70536befc Merge pull request #329 from flavianmissi/bz-1923536
Bug 1923536: forward http.StatusTooManyRequests to client
2022-05-13 12:04:13 +02:00
Ricardo Maraschini
5c8c0494c2 pullthrough: forward http.StatusTooManyRequests to client
makes the registry forward http.StatusTooManyRequests back
to the client during pullthrough operations.
2022-05-05 18:09:18 +02:00
Stephen Benjamin
50f998f40d Revert "Bug 1902456: Fixed incorrect access denied error logs"
This reverts commit 6f3403fd19.
2022-03-03 14:35:17 -05:00
Oleg Bulatov
1bf3a6bac4 Fix ICSP for whole mirror registries 2022-02-17 12:58:40 +01:00
Oleg Bulatov
609e25abe6 Fix ICSP for subrepositories 2022-02-14 13:54:33 +01:00
OpenShift Merge Robot
80dcfed1c5 Merge pull request #299 from dmage/docker-io-auth
Bug 2024859: Fix auth for docker.io images
2021-11-23 10:42:39 +01:00
Oleg Bulatov
46ae9442e4 Fix auth for docker.io images 2021-11-22 14:27:37 +01:00
OpenShift Merge Robot
3ac037cf80 Merge pull request #295 from Nikita757/library-go-usage
IR-104: Use library-go in image-registry
2021-11-17 08:01:36 +01:00
Nichita Gutu
2506d9ace8 Use library-go in image-registry 2021-11-02 12:05:56 +01:00
Nichita Gutu
6f3403fd19 Bug 1902456: Fixed incorrect access denied error logs 2021-10-15 18:20:00 +02:00
Ricardo Maraschini
78d25b4851 Using a CredentialStoreFactory 2021-08-30 09:51:46 +02:00
Ricardo Maraschini
bc0514252c ICSP support
Implements ICSP support for image registry.
2021-06-10 15:43:45 +02:00
Ricardo Maraschini
0a1e0d5401 Using imageapiv1.SecretList instead of corev1.SecretList 2021-06-10 08:32:17 +02:00
Oleg Bulatov
dc909f364d Better log message when action is not allowed
SubjectAccessReview can be in one of three states: allowed, denied, and
no opinion. Also it has the additional field EvaluationError that can
indicate that some error occurred. The registry should log this
information.
2021-03-16 18:12:58 +01:00
OpenShift Merge Robot
4e3557542c Merge pull request #255 from ricardomaraschini/oci-support
IR-114: Adding support for OCI schema
2021-01-05 14:22:13 -05:00