Clarify the layer selection behaviour

Co-authored-by: Hidde Beydals <hiddeco@users.noreply.github.com>
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
pull/3014/head
Stefan Prodan 2 years ago
parent 16d3180e42
commit db0920ba32
No known key found for this signature in database
GPG Key ID: 3299AEB0E4085BAF

@ -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

Loading…
Cancel
Save