1
0
mirror of synced 2026-02-07 03:05:56 +00:00

Clarify the layer selection behaviour

Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
Stefan Prodan
2022-08-22 16:02:03 +03:00
parent 16d3180e42
commit db0920ba32

View File

@@ -137,15 +137,24 @@ spec:
### Layer selection ### Layer selection
By default, Flux assumes that the first layer of the OCI artifact contains the Kubernetes configuration. By default, Flux assumes that the first layer of the OCI artifact contains the Kubernetes configuration.
For multi-layer artifacts created by other tools than Flux CLI, users can specify the media type of the layer For multi-layer artifacts created by other tools than Flux CLI
(e.g. [oras](https://github.com/oras-project/oras),
[crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane)),
users can specify the [media type](https://github.com/opencontainers/image-spec/blob/v1.0.2/media-types.md) of the layer
which contains the tarball with Kubernetes manifests. which contains the tarball with Kubernetes manifests.
```yaml ```yaml
spec: spec:
layerSelector: layerSelector:
mediaType: "application/vnd.cncf.flux.content.v1.tar+gzip" mediaType: "application/deployment.content.v1.tar+gzip"
``` ```
If the layer selector matches more than one layer,
the first layer matching the specified media type will be used.
Note that Flux requires that the OCI layer is
[compressed](https://github.com/opencontainers/image-spec/blob/v1.0.2/layer.md#gzip-media-types)
in the `tar+gzip` format.
### Pull artifacts from private repositories ### Pull artifacts from private repositories
For authentication purposes, Flux users can choose between supplying static credentials with Kubernetes secrets For authentication purposes, Flux users can choose between supplying static credentials with Kubernetes secrets