From db0920ba32d8e2777936d16f63aca231ef9548c1 Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Mon, 22 Aug 2022 16:02:03 +0300 Subject: [PATCH] Clarify the layer selection behaviour Co-authored-by: Hidde Beydals Signed-off-by: Stefan Prodan --- rfcs/0003-kubernetes-oci/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rfcs/0003-kubernetes-oci/README.md b/rfcs/0003-kubernetes-oci/README.md index b8321e6f..a1cb08de 100644 --- a/rfcs/0003-kubernetes-oci/README.md +++ b/rfcs/0003-kubernetes-oci/README.md @@ -137,15 +137,24 @@ spec: ### Layer selection 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. ```yaml spec: 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 For authentication purposes, Flux users can choose between supplying static credentials with Kubernetes secrets