flux create source oci supports OCIRepository layer selectors
Introduced 2026-06-30 · score 0.96
HOW TO USE IT
When you need an OCIRepository to select and process a specific OCI layer, run `flux create source oci` with `--layer-selector=<media-type>:<operation>` and `--export` to render the resource YAML.
flux create source oci <name> --url=<oci-url> --tag=<tag> --layer-selector=<media-type>:<operation> --exportWHY THIS HELPS
Export an OCIRepository that selects and processes a specific OCI layer.
REQUIREMENTS AND LIMITATIONS
- Version: v2.9.0
- <name>: Positional OCIRepository name. The docs do not mark it required.
- --url: OCI repository URL. The docs do not mark it required.
- --tag: OCI artifact tag. The docs do not mark it required.
- --layer-selector: Layer selector in `<media-type>:<operation>` form; the docs do not mark the flag required. Supported operations are `extract` and `copy`.
- mediaType: Selects the first OCI layer matching this media type.
- operation: `extract` extracts the compressed layer to storage by default; `copy` stores the compressed layer as-is. The documented allowed values are `extract` and `copy`.
- --export: Exports the generated resource in YAML format to stdout.
- The operation must be one of the supported API values `extract` or `copy`.
- The source states that this adds CLI support for fields already supported by the OCIRepository API and source-controller; it does not change controller behavior or the API.
FIRST-PARTY EVIDENCE
- https://github.com/fluxcd/flux2/releases/tag/v2.9.0
- https://github.com/fluxcd/flux2/pull/5892
- https://fluxcd.io/flux/cmd/flux_create_source_oci/
- https://fluxcd.io/flux/components/source/api/v1/
Check the installed version and the source before using it. Entry JSON