0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2024-12-23 22:27:35 -05:00
Commit graph

537 commits

Author SHA1 Message Date
Shivam Mishra
5f230bd8ff Added unit test cases 2020-08-19 00:19:35 -07:00
Shivam Mishra
ed254159a0 Added support for searching fixed tag given cve and an image 2020-08-18 23:53:04 -07:00
Shivam Mishra
72ae02ca4b Added image format validation to validate media type because squashfs image media type not supported for vulnerability scanning 2020-08-18 23:05:52 -07:00
Shivam Mishra
2cf2c16137 Added graphql api feature for image vulnerability scanning 2020-08-18 22:44:34 -07:00
Shivam Mishra
baa5d247ec Enable trivy db download and update 2020-08-18 21:46:17 -07:00
Shivam Mishra
e537f27f00 Added search extension and integrated trivy to support image vulnerability scanning 2020-08-18 21:03:48 -07:00
Ramkumar Chinchani
a06ad7e701
Merge pull request #127 from shimish2/dedupe-fix
Dedupe fix
2020-08-17 16:33:25 -07:00
Shivam Mishra
3a30290e08 Using "destRecord" as a path in DeleteBlob function instead of "dst".
dstRecord :- blob path stored in cache.
dst :- blob path that is trying to be uploaded.

Currently, if the actual blob on disk may have been removed by GC/delete, during syncing the cache dst is being passed to DeleteBlob function and retry section is being continuously called because DeleteBlob function never deletes dst path (doesn't exist in db), dstRecord should be passed into DeleteBlob function because dstRecord is actual blob path stored in db.

If dst and dstRecord path value is same then this issue will not be produced and DeleteBlob method will delete the blob info from cache but if both are different then DeleteBlob method will try to delete dst path which is not in cache.

Note:- boltdb delete method return nil even when value doesn't exist (https://godoc.org/github.com/boltdb/bolt#Bucket.Delete)
2020-08-12 10:06:20 -07:00
Ramkumar Chinchani
703eb182fe
Merge pull request #126 from rchincha/skopeo
ci/cd: install skopeo
2020-08-10 21:49:33 -07:00
Ramkumar Chinchani
5c14da5dc5 ci/cd: install skopeo
zot trivy extensions test code needs an oci layout as test data.
Install skopeo to help with that.
2020-08-10 10:10:53 -07:00
Ramkumar Chinchani
b2ef9ab124
Merge pull request #118 from tsnaik/cli-tls-verify
cli: add option to ignore TLS verification
2020-07-17 15:53:09 -07:00
Tanmay Naik
6285a730a1 cli: add option to ignore TLS verification
adds a property in config : "verify-tls"
2020-07-17 17:48:42 -04:00
Serge Hallyn
e0cdc6b6a4
Merge pull request #116 from rchincha/s3
stacker: fix stacker build
2020-07-15 12:00:58 -05:00
Ramkumar Chinchani
f9b2092bd9 stacker: fix stacker build 2020-07-14 20:14:21 -07:00
Ramkumar Chinchani
728eb7f6fc
Merge pull request #113 from rchincha/s2
stacker: fix stacker build
2020-07-14 20:08:18 -07:00
Ramkumar Chinchani
adc6859cd6 stacker: fix stacker build 2020-07-14 13:31:57 -07:00
Ramkumar Chinchani
2ac675e682
Merge pull request #115 from tsnaik/cli-fix
cli: move client-only code out of the server flow
2020-07-14 11:17:12 -07:00
Tanmay Naik
bb9fbd2ef9 cli: move client-only code out of the server flow
earlier, some of the client exclusive code was being run on zot server
instance too.

cli: fix the bug: spinner is not stopped with -o
2020-07-14 13:35:56 -04:00
Ramkumar Chinchani
e639b4814e
Merge pull request #114 from rchincha/ro
auth: support a read-only mode
2020-07-13 10:09:03 -07:00
Ramkumar Chinchani
78be4cbe3c auth: support a read-only mode
This is useful if we want to roll out experimental versions of zot
pointing to some storage shared with another zot instance.

Also, when under storage full conditions, will be useful to turn on this
flag to prevent further writes.
2020-07-10 21:48:35 -07:00
Ramkumar Chinchani
74f48e6ad3
Merge pull request #108 from rchincha/systemd
systemd: add a systemd service example file
2020-07-07 13:18:46 -07:00
Ramkumar Chinchani
7e0a3a6617
Merge branch 'master' into systemd 2020-07-07 13:02:49 -07:00
Serge Hallyn
811a424858
Merge pull request #112 from rchincha/gc
gc: add a policy to skip garbage collecting new blobs
2020-07-07 13:01:33 -05:00
Ramkumar Chinchani
324a517ea3 gc: add a policy to skip garbage collecting new blobs
We perform inline garbage collection of orphan blobs. However, the
dist-spec poses a problem because blobs begin their life as orphan blobs
and then a manifest is add which refers to these blobs.

We use umoci's GC() to perform garbage collection and policy support
has been added recently which can control whether a blob can be skipped
for GC.

In this patch, we use a time-based policy to skip blobs.
2020-07-06 15:52:35 -07:00
Ramkumar Chinchani
80244f1282
Merge pull request #103 from tsnaik/search-core
cli: add command to list images
2020-07-02 12:09:03 -07:00
Tanmay Naik
ad684ac44b cli: add config and images command
Extends the existing zot CLI to add commands for listing all images and
their details on a zot server.
Listing all images introduces the need for configurations.

Each configuration has a name and URL at the least. Check 'zot config
-h' for more details.

The user can specify the URL of zot server explicitly while running the
command or configure a URL and pass it directly.

Adding a configuration:
zot config add aci-zot <zot-url>

Run 'zot config --help' for more.

Listing all images:
zot images --url <zot-url>

Pass a config instead of the url:
zot images <config-name>

Filter the list of images by image name:
zot images <config-name> --name <image-name>

Run 'zot images --help' for all details

- Stores configurations in '$HOME/.zot' file

Add CLI README
2020-07-02 14:30:35 -04:00
Ramkumar Chinchani
4a1519bb1d
Merge pull request #107 from shimish2/BuildPipelineUpgrade
Upgraded build pipeline
2020-06-26 15:20:13 -07:00
Shivam Mishra
af77876306 Upgraded build pipeline
Go version changed to 1.14.4
Golangci-lint changed to 1.26.0
Bazel version changed to 3.0.0
Bazel rules_go version changed to 0.23.3
Bazel gazelle version changed to v0.21.0
Bazel build tools version changed to 0.25.1
Bazel skylib version changed to 1.0.2
2020-06-25 23:43:31 -07:00
Ramkumar Chinchani
557ac6b5c1 systemd: add a systemd service example file
Copy this file into /etc/systemd/system, and

\# systemctl enable zot
\# systemctl start zot
2020-06-25 17:50:30 -07:00
Ramkumar Chinchani
ff4a300057
Merge pull request #109 from shimish2/OpensuseChange
Changed umoci import path
2020-06-25 17:49:26 -07:00
Shivam Mishra
85d3e1db4b Changed umoci import path 2020-06-25 17:04:32 -07:00
Ramkumar Chinchani
3dc9885ee9 update the size field when existing manifest entry is updated
An existing manifest descriptor in index.json can be updated with
different manifest contents for the same/existing tag. We were updating
the digest but not the size field causing GC to report an error.

Add a unit test case to cover this.

Add logs.
2020-06-18 16:20:43 -07:00
Ramkumar Chinchani
c374f9dbcb
Merge pull request #98 from tsnaik/fix-htpasswd
fix: the bug when htpasswd has multiple creds
2020-06-18 15:57:25 -07:00
Tanmay Naik
3f3f7e3f8c tests: add better tests for 3cfb2b3 2020-06-17 20:17:49 -04:00
Tanmay Naik
904ae763d7 tests: add unit tests for fix 3cfb2b3 2020-06-09 19:18:33 -04:00
Tanmay Naik
3cfb2b30a6 fix: the bug when htpasswd has multiple creds
earlier, when you had more than one creds in htpasswd file separated by
newline, it used to only read the first cred in the file and ignore the
rest.
2020-06-09 17:19:01 -04:00
Tanmay Naik
d16cbb0b10 .gitignore: add .vscode/ 2020-06-09 17:18:30 -04:00
Ramkumar Chinchani
dbb0a2d57a
Merge pull request #93 from rchincha/d2
dedupe: record relative path for cache entries
2020-05-28 12:16:54 -07:00
Ramkumar Chinchani
cb9e773a3e dedupe: record relative path for cache entries
In a production use case we found that the actual rootdir can be moved.
Currently, cache entries for dedupe record the full blob path which
doesn't work in the move use case.

Only for dedupe cache entries, record relative blob paths.
2020-05-27 22:11:26 -07:00
Ramkumar Chinchani
36efa17915
Merge pull request #91 from rchamarthy/fix/conformance
fix the conformance link
2020-05-20 11:53:42 -07:00
Ravi Chamarthy
7caf748341 fix the conformance link
Signed-off-by: Ravi Chamarthy <ravchama@cisco.com>
2020-05-20 11:37:54 -07:00
Ramkumar Chinchani
afa52bc54d
Merge pull request #90 from rchincha/helm
helm: relax Content-Type checks
2020-05-19 17:27:23 -07:00
Ramkumar Chinchani
e83999ae0d helm: relax Content-Type checks
OCI registries are moving towards a more generic artifact storage
mechanism. In short-term, at the very least support helm charts.
2020-05-19 16:53:05 -07:00
Tycho Andersen
6017be5bfd
Merge pull request #89 from rchincha/client-compat
compat: when in "world-readable" mode, return the WWW-Authenticate
2020-05-19 15:48:34 -06:00
Ramkumar Chinchani
026b009dbb compat: when in "world-readable" mode, return the WWW-Authenticate
header

containers/image is the dominant client library to interact with
registries.

It detects which authentication to use based on the WWW-Authenticate
header returned when pinging "/v2/" end-point. If we didn't return this
header, then creds are not used for other write-protected end-points.
Hence, the compatibility fix.
2020-05-19 13:54:45 -07:00
Tycho Andersen
b2338b4819
Merge pull request #83 from rchincha/compl
conformance: align with upstream conformance tests
2020-04-16 17:41:51 -06:00
Ramkumar Chinchani
dd1fc1e866 config: add gc and dedupe as configurable params (default to enabled)
Since we want to conform to dist-spec, sometimes the gc and dedupe
optimizations conflict with the conformance tests that are being run.
So allow them to be turned off via configuration params.
2020-04-16 16:01:53 -07:00
Ramkumar Chinchani
b1f882e1b8 conformance: align with upstream conformance tests
Upstream conformance tests are being updated, so we need to align along
with our internal GC and dedupe features.

Add a new example config file which plays nice with conformance tests.

DeleteImageManifest() updated to deal with the case where the same
manifest can be created with multiple tags and deleted with the same
digest - so all entries must be deleted.

DeleteBlob() delete the digest key (bucket) when last reference is
dropped
2020-04-16 16:01:53 -07:00
Serge Hallyn
ea6018b168
Merge pull request #76 from rchincha/dedupe
dedupe: use hard links to dedupe blobs
2020-04-03 13:28:16 -05:00
Ramkumar Chinchani
25f5a45296 dedupe: use hard links to dedupe blobs
As the number of repos and layers increases, the greater the probability
that layers are duplicated. We dedupe using hard links when content is
the same. This is intended to be purely a storage layer optimization.
Access control when available is orthogonal this optimization.

Add a durable cache to help speed up layer lookups.

Update README.

Add more unit tests.
2020-04-03 09:29:12 -07:00