Skip to content

Commit de3d871

Browse files
authored
drop composite catalog template (#327)
Signed-off-by: Jordan Keister <[email protected]>
1 parent afff7da commit de3d871

File tree

1 file changed

+0
-142
lines changed

1 file changed

+0
-142
lines changed

content/en/docs/Reference/catalog-templates.md

Lines changed: 0 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ In this context, there are two components to every `template`:
1919
The templates supported by [`opm`](https://github.com/operator-framework/operator-registry/blob/master/docs/design/opm-tooling.md) are:
2020
- the [`basic template`](#basic-template), which provides a simplified abstraction of an FBC
2121
- the [`semver template`](#semver-template), which provides the capability to generate an entire upgrade graph
22-
- the [`composite template`](#composite-template), which provides the capability to generate an FBC contribution for multiple catalogs
2322

2423
## Basic Template
2524
The `basic template` is an input schema which eliminates FBC information that can be retrieved from existing registries when we process it.
@@ -561,144 +560,3 @@ package: testoperator
561560
schema: olm.channel
562561
```
563562

564-
## Composite Template
565-
A `composite template` can help an operator author manage FBC contributions to multiple catalogs. The template functionality is composed of schemas which represent the author's role and the catalog maintainer's role, and rendering the template performs an explicit negotiation between them.
566-
567-
### Usage
568-
```sh
569-
opm alpha render-template composite [flags]
570-
```
571-
572-
| Flag | Description |
573-
| ------------------- | -------------------------------------------------------------------------------------- |
574-
| -f, --catalog-config string | File to use as the catalog configuration file (default "catalogs.yaml") |
575-
| -c, --composite-config string | File to use as the composite configuration file (default "catalog/config.yaml") |
576-
| -h, --help | help for composite |
577-
| -o, --output string | Output format (json|yaml) (default "json") |
578-
| --validate | whether or not the created FBC should be validated (i.e 'opm validate') (default true) |
579-
| --skip-tls-verify | skip TLS certificate verification for container image registries while pulling bundles |
580-
| --use-http | use plain HTTP for container image registries while pulling bundles |
581-
582-
583-
584-
585-
### Specifications
586-
The `composite template` is composed of two schemas that represent the operator author's role and the catalog maintainer's role, fulfilled by `olm.composite` and `olm.composite.catalogs`, respectively.
587-
588-
#### olm.composite
589-
The `olm.composite` schema represents the operator author role and defines the following:
590-
- Where each input (`Component`) exists
591-
- How each `Component` is mapped to a destination catalog (`Component.Name`). All destination catalogs defined in this file **must** also exist in the catalog configuration file created by the catalog maintainers
592-
- How each `Component` is processed to generate a catalog contribution (`Component.Strategy`)
593-
- The directory structure the catalog contribution generation should follow (`Component.Destination`)
594-
595-
The cue schema for the `olm.composite` schema is:
596-
```cue
597-
#CompositeConfig: {
598-
Schema: "olm.composite"
599-
Components: [...#Component]
600-
}
601-
602-
#Component: {
603-
Name: string
604-
Destination: #ComponentDestination
605-
Strategy: #BuildStrategy
606-
}
607-
608-
#ComponentDestination {
609-
Path: string
610-
}
611-
612-
#BuildStrategy: {
613-
Name: string
614-
Template: #TemplateDefinition
615-
}
616-
617-
#TemplateDefinition: {
618-
Schema: string
619-
}
620-
```
621-
622-
#### olm.composite.catalogs
623-
The `olm.composite.catalogs` schema represents the catalog maintainer role and defines the following:
624-
- One or more catalogs (`Catalog`) identified by a string (`Catalog.Name`)
625-
- Supported input formats (`Builder`) for each `Catalog` (`Catalog.Builders`) which is a list of strings where each item is a `Builder` schema. The currently supported `Builder` schemas are:
626-
- `olm.builder.basic` which represents that the use of [basic templates](#basic-template) for catalog contribution generation is allowed
627-
- `olm.builder.semver` which represents that the use of [semver templates](#semver-template) for catalog contribution generation is allowed
628-
- The expected directory structure of any generated contribution (`Catalog.Destination.WorkingDir`)
629-
630-
The cue schema for the `olm.composite.catalogs` schema is:
631-
```cue
632-
#CatalogConfig: {
633-
Schema: "olm.composite.catalogs"
634-
Catalogs: [... #Catalog]
635-
}
636-
637-
#Catalog: {
638-
Name: string
639-
Destination: #CatalogDestination
640-
Builders: [...string]
641-
}
642-
643-
#CatalogDestination: {
644-
BaseImage: string
645-
WorkingDir: string
646-
}
647-
```
648-
649-
### Example
650-
**catalogs.yaml**
651-
652-
The following example specifies a catalog configuration that defines a catalog named `v1`. This example limits the input to the [semver template](#semver-template) for contribution generation logic. If you use the `opm alpha render-template composite` subcommand the path to this file can be specified with the `-f` option. This option can be a file path or a URL. If you use a URL, the URL must return the raw file contents.
653-
654-
```yaml
655-
schema: olm.composite.catalogs
656-
catalogs:
657-
- name: v1 {{< code_callout 1 >}}
658-
destination:
659-
baseImage: quay.io/operator-framework/opm:v1.24
660-
workingDir: catalogs/v1 {{< code_callout 2 >}}
661-
builders:
662-
- olm.builder.semver {{< code_callout 3 >}}
663-
```
664-
665-
- {{< code_callout 1 >}} Defines the `v1` catalog configuration
666-
- {{< code_callout 2 >}} Defines the directory path that all output should be placed for this catalog. In this example, when rendering using the composite catalog all output for the `v1` catalog will be put under the `catalogs/v1/` directory
667-
- {{< code_callout 3 >}} Defines the allowed builders for the `v1` catalog. In this example the semver builder is the only builder allowed. As a result, this catalog renders only [semver templates](#semver-template) as contributions
668-
669-
**contributions.yaml**
670-
671-
The following example specifies a composite template configuration that defines the input, build process, and output of a catalog contribution for the `v1` catalog.
672-
673-
```yaml
674-
schema: olm.composite
675-
components:
676-
- name: v1 {{< code_callout 1 >}}
677-
destination:
678-
path: my-package {{< code_callout 2 >}}
679-
strategy:
680-
name: basic
681-
template:
682-
schema: olm.builder.semver {{< code_callout 3 >}}
683-
config:
684-
input: components/v1.yaml {{< code_callout 4 >}}
685-
output: catalog.yaml {{< code_callout 5 >}}
686-
```
687-
688-
- {{< code_callout 1 >}} Defines the build process for the `v1` catalog contribution.
689-
- {{< code_callout 2 >}} Defines the name of the package being contributed and is used to create the package directory
690-
- {{< code_callout 3 >}} Specifies that the input for the `v1` catalog contribution is a [semver template](#semver-template) so that the contribution can be rendered appropriately
691-
- {{< code_callout 4 >}} Specifies the input file that is used to generate the catalog contribution
692-
- {{< code_callout 5 >}} Defines the name of the output file. This is joined as a path with the `destination.path` value defined in {{< code_callout 2 >}}. In this example the full output path after rendering the template is `my-package/catalog.yaml`
693-
694-
When using the `opm alpha render-template composite -f catalogs.yaml -c contributions.yaml` command, the resulting output should look similar to:
695-
```tree
696-
catalogs
697-
├── v1 {{< code_callout 1 >}}
698-
│   └── my-package {{< code_callout 2 >}}
699-
│   └── catalog.yaml {{< code_callout 3 >}}
700-
```
701-
702-
- {{< code_callout 1 >}} Output directory for the `v1` catalog as specified by the example catalog configuration file
703-
- {{< code_callout 2 >}} Output directory for our `v1` catalog contribution as specified by the example composite configuration file
704-
- {{< code_callout 3 >}} Output file containing the rendered FBC for our contribution to the `v1` catalog

0 commit comments

Comments
 (0)