Skip to content

Commit 8d6e1f9

Browse files
committed
Make FBC method a default in documentation
The documentation is updated to reflect FBC changes and suggest using FBC for all operators. Hopefully this will increase an adoption of the FBC method. JIRA: ISV-5377 Signed-off-by: Ales Raszka <[email protected]>
1 parent 5d522eb commit 8d6e1f9

File tree

4 files changed

+58
-15
lines changed

4 files changed

+58
-15
lines changed

docs/users/contributing-via-pr.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ To submit an operator one has to do these steps
88
- operators
99
1. Configure `ci.yaml` file. [More info](./operator-ci-yaml.md)
1010
- Setup reviewers
11-
- Operator versioning strategy
12-
1. Make a pull request
11+
- Enable FBC mode
12+
1. Make a pull request with a new operator bundle or catalog changes
1313
1. Verify tests and fix problems, if possible
1414
1. Ask for help in the PR in case of problems
1515

@@ -33,8 +33,8 @@ In case of failures, please have a look at the logs of specific tests. If an err
3333
## Useful commands interacting with the pipeline
3434
You can post the following comment/command:
3535

36-
Command | Functionality |
37-
--- | --- |
38-
`/pipeline restart operator-hosted-pipeline` | The hosted pipeline will be re-triggered and PR will be merged if possible. |
39-
`/pipeline restart operator-release-pipeline` | The release pipeline will be re-triggered.
40-
`/test skip {test_case_name}` | *test_case_name* test will be skipped. Please consider that only a subset of tests (*currently only pruned graph test*) can be skipped.
36+
| Command | Functionality |
37+
| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
38+
| `/pipeline restart operator-hosted-pipeline` | The hosted pipeline will be re-triggered and PR will be merged if possible. The command only works if a previous pipeline failed. |
39+
| `/pipeline restart operator-release-pipeline` | The release pipeline will be re-triggered. The command only works if a previous pipeline failed. |
40+
| `/test skip {test_case_name}` | *test_case_name* test will be skipped. Please consider that only a subset of tests (*currently only pruned graph test*) can be skipped. |

docs/users/contributing-where-to.md

+12-4
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,23 @@ Once you have forked the upstream repo, you will require to add your Operator Bu
1818
│ │ └── tests
1919
│ │ └── scorecard
2020
│ │ └── config.yaml
21-
│ └── ci.yaml
21+
│ ├── catalog-templates
22+
│ │ ├── v4.14.yaml
23+
│ │ ├── v4.15.yaml
24+
│ │ └── v4.16.yaml
25+
│ ├── ci.yaml
26+
│ └── Makefile
2227
└── README.md
2328
```
2429

2530
Follow the `operators` directory in the forked repo. Add your Operator Bundle under this `operators` directory following the example format.
31+
2632
1. Under the `operators` directory, create a new directory with the name of your operator.
27-
1. Inside of this newly created directory add your `ci.yaml`.
28-
1. Also, under the new directory create a subdirectory for each version of your Operator.
29-
1. In each version directory there should be a `manifests/` directory containing your OpenShift yaml files, a `metadata/` directory containing your `annotations.yaml` file, and a `tests/` directory containing the required `config.yaml` file for the preflight tests.
33+
2. Inside of this newly created directory add your `ci.yaml` and set its content based on [doc](./operator-ci-yaml.md).
34+
3. Also, under the new directory create a subdirectory for each version of your Operator.
35+
4. In each version directory there should be a `manifests/` directory containing your OpenShift yaml files, a `metadata/` directory containing your `annotations.yaml` file, and a `tests/` directory containing the required `config.yaml` file for the preflight tests.
36+
5. Create a `catalog-templates/` directory under the operator directory and add a yaml file for each OpenShift version you want to support. The yaml file should contain the catalog template for the operator. More information on how to create the catalog template can be found [here](./fbc_workflow.md).
37+
6. Download the template `Makefile` from [here](https://raw.githubusercontent.com/redhat-openshift-ecosystem/operator-pipelines/main/fbc/Makefile) and place it in the root of the operator directory.
3038

3139
>**Note** To learn more about preflight tests please follow this [link](https://github.com/redhat-openshift-ecosystem/openshift-preflight?tab=readme-ov-file#preflight).
3240

docs/users/fbc_workflow.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,17 @@ catalogs
8585
### Adding new bundle to Catalog
8686
To add a bundle to the catalog you need to first submit the new version of the operator
8787
using traditional [PR workflow](./contributing-via-pr.md). The operator pipeline builds,
88-
tests, and releases the bundle into the registry. At this point, the operator is not available
89-
in the catalog yet. To add the bundle to the catalog you need to update catalog templates
88+
tests, and releases the bundle into the registry. **At this point, the operator is not available
89+
in the catalog yet.** To add the bundle to the catalog you need to update catalog templates
9090
and add a bundle pullspec given by pull request comment and open a new pull request with catalog
9191
changes.
9292

9393
![Release info](../img/release-info.png)
9494

95+
> [!NOTE]
96+
> Currently a workflow requires a 2-step process to release a new bundle into the catalog. In the first step, the operator bundle is released and in the second step, the catalog is updated with the new bundle.
97+
> We are working on a solution to automate this process and make it a single step. However, this will require a usage of `SemVer` catalog template. In case you would like to use this feature once available please consider using `SemVer` template.
98+
9599
#### SemVer
96100
For example if I want to add `v1.1.0` bundle into `Fast` channel of a specific catalog I'll
97101
add it as mentioned in the example below:

docs/users/operator-ci-yaml.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Operator Publishing / Review settings
22

3-
Each operator might have `ci.yaml` configuration file to be present in an operator directory (for example `operators/aqua/ci.yaml`). This configuration file is used by [community-operators](https://github.com/redhat-openshift-ecosystem/community-operators-prod) pipeline to setup various features like `reviewers` or `operator versioning`.
3+
Each operator might have `ci.yaml` configuration file to be present in an operator directory (for example `operators/aqua/ci.yaml`). This configuration file is used by the pipeline automation to control a way how the operator will be published and reviewed.
4+
5+
A content of the file depends on the operator source type. There are a different set of options for community operators and certified operators.
6+
47

58
> **Note:**
69
One can create or modify `ci.yaml` file with a new operator version. This operation can be done in the same PR with other operator changes.
@@ -21,7 +24,7 @@ If you want to accelerate publishing your changes, consider adding yourself and
2124
For this to work, it is required to setup reviewers in `ci.yaml` file. It can be done by adding `reviewers` tag with a list of GitHub usernames. For example
2225

2326
### Example
24-
```
27+
```yaml
2528
$ cat <path-to-operator>/ci.yaml
2629
---
2730
reviewers:
@@ -30,7 +33,30 @@ reviewers:
3033

3134
```
3235

36+
## FBC mode
37+
38+
### `fbc.enabled`
39+
The `fbc.enabled` flag enables the [File-Based catalog](./fbc_workflow.md) feature. It is highly recommended to use the FBC mode in order to have better control over the operator's catalog.
40+
41+
### `fbc.version_promotion_strategy`
42+
The `fbc.version_promotion_strategy` option defines the strategy for promoting the operator into a next OCP version. When a new OCP version becomes available an automated process will promote the operator from a version N to a version N+1. The `fbc.version_promotion_strategy` option can have the following values:
43+
44+
- `never` - the operator will not be promoted to the next OCP version automatically (default)
45+
- `always` - the operator will be promoted to the next OCP version automatically
46+
- `review-needed` - the operator will be promoted to the next OCP version automatically, but the PR will be created and the reviewers will be asked to review the changes
47+
48+
### Example
49+
```yaml
50+
---
51+
fbc:
52+
enabled: true
53+
version_promotion_strategy: never
54+
```
55+
56+
3357
## Operator versioning
58+
> **_NOTE:_** This option is only available for the non-FBC operators where user doesn't have a direct control over the catalog.
59+
3460
Operators have multiple versions. When a new version is released, OLM can update an operator automatically. There are 2 update strategies possible, which are defined in `ci.yaml` at the operator top level.
3561

3662
### replaces-mode
@@ -50,6 +76,11 @@ $ cat <path-to-operator>/ci.yaml
5076
updateGraph: replaces-mode
5177
```
5278
79+
## Certification project
80+
81+
### `cert_project_id`
82+
The `cert_project_id` option is required for certified and marketplace operators. It is used to link the operator to the certification project in Red Hat Connect.
83+
5384
## Kubernetes max version in CSV
5485
5586
Starting from kubernetes 1.22 some old APIs were deprecated ([Deprecated API Migration Guide from v1.22](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22). Users can set `operatorhub.io/ui-metadata-max-k8s-version: "<version>"` in its CSV file to inform its maximum supported Kubernetes version. The following example will inform that operator can handle `1.21` as maximum Kubernetes version

0 commit comments

Comments
 (0)