Skip to content

Commit

Permalink
Update doc and switch flag to default false
Browse files Browse the repository at this point in the history
Signed-off-by: James Hewitt <james.hewitt@uk.ibm.com>
  • Loading branch information
Jamstah committed Apr 10, 2022
1 parent fd8909b commit daeef49
Showing 1 changed file with 43 additions and 17 deletions.
60 changes: 43 additions & 17 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1221,16 +1221,16 @@ features. Each subsection defines such a feature with configurable behavior.

## `validation`

```none
```yaml
validation:
manifests:
urls:
allow:
- ^https?://([^/]+\.)*example\.com/
deny:
- ^https?://www\.example\.com/
disabled: false
```

Use these settings to configure what validation the registry performs on content.

Validation is performed when content is uploaded to the registry. Changing these
settings will not validate content that has already been accepting into the registry.

### `disabled`

The `disabled` flag disables the other options in the `validation`
Expand All @@ -1243,6 +1243,16 @@ Use the `manifests` subsection to configure validation of manifests. If

#### `urls`

```yaml
validation:
manifests:
urls:
allow:
- ^https?://([^/]+\.)*example\.com/
deny:
- ^https?://www\.example\.com/
```

The `allow` and `deny` options are each a list of
[regular expressions](https://pkg.go.dev/regexp/syntax) that restrict the URLs in
pushed manifests.
Expand All @@ -1258,24 +1268,40 @@ one of the `allow` regular expressions **and** one of the following holds:

#### `imageindex`

validation:
manifests:
imageindex:
images:
disabled: false
platforms:
- os: linux
architecture: amd64

##### `images`

Set `exist` to false to disable validation that images exist when an image
index manifest is uploaded.
By default, when an image index is uploaded to the registry, the registry will
validate that the images referenced by the index exist in the registry before
accepting the image index.

Set `disabled` to `true` to disable all validation that images exist when an image
index manifest is uploaded. This allows image lists to be uploaded to the registry
without their associated images.

Set `platforms` to configure the set of platforms to validate the existence of.
If a platform is included in this list and in the images contained within an index,
the registry will validate that it exists in the registry. The registry will not
validate the existence of other platform images in the index.
Set `platforms` to selectively validate the existence of platforms within image
index manifests. If a platform is included in this list and in the images contained
within an index, the registry will validate that the platform specific image exists
in the registry before accepting the index. The registry will not validate the
existence of other platform specific images in the index.

This parameter does not validate that the platforms are included in the index,
if an image index is missing one or more platform images from this array it may
still be accepted by the registry.
This parameter does not validate that the configured platforms are included in every
index. If an image index is missing one or more platform specific images configured
here, it may still be accepted by the registry.

Each platform is a map with two keys, `os` and `architecture`, as defined in the
[OCI Image Index specification](https://github.com/opencontainers/image-spec/blob/main/image-index.md#image-index-property-descriptions).

If `platforms` is an empty array, all images in the index must exist.
If `platforms` is an empty array (default), all images in the index must exist for
the index to be accepted.

## Example: Development configuration

Expand Down

0 comments on commit daeef49

Please sign in to comment.