Skip to content

Commit 7ad50c0

Browse files
committed
Add user facing documentation and mkdoc
The mkdoc is used to generate a dynamic pages with a user documentation. The documentation is common for ISV and community operators. The docs will server as a official doc for operator users. The mkdoc will run whenever a doc is updated and will be released to Github hosted environment. JIRA: ISV-4507 Signed-off-by: Ales Raszka <[email protected]>
1 parent 1d985bb commit 7ad50c0

19 files changed

+749
-12
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: "Documentation"
3+
4+
on:
5+
push:
6+
paths:
7+
- docs/**
8+
- mkdocs.yml
9+
workflow_dispatch:
10+
11+
jobs:
12+
documentation:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Generate docs
17+
run: |
18+
pip install mkdocs \
19+
mkdocs-material \
20+
pymdown-extensions \
21+
mkdocs-mermaid2-plugin
22+
23+
mkdocs build
24+
- name: Deploy
25+
uses: peaceiris/actions-gh-pages@v3
26+
if: github.ref == 'refs/heads/main'
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./site

docs/README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Openshift Operators
2+
3+
## About this repository
4+
5+
This repo is the canonical source for Kubernetes Operators that appear on [OpenShift Container Platform](https://openshift.com) and [OKD](https://www.okd.io/).
6+
7+
**NOTE** The index catalogs:
8+
9+
- `registry.redhat.io/redhat/certified-operator-index:v<OCP Version>`
10+
- `registry.redhat.io/redhat/redhat-marketplace-index:v<OCP Version>`
11+
- `registry.redhat.io/redhat/community-operator-index:v<OCP Version>`
12+
13+
are built from this repository and it is
14+
consumed by Openshift and OKD to create their sources and built their catalog. To know more about how
15+
Openshift catalog are built see the [documentation](https://docs.openshift.com/container-platform/4.14/operators/understanding/olm-rh-catalogs.html#olm-rh-catalogs_olm-rh-catalogs).
16+
17+
See our [documentation](https://redhat-openshift-ecosystem.github.io/operator-pipelines/) to find out
18+
more about Community, Certified and Marketplace operators and contribution.
19+
20+
## Add your Operator
21+
22+
We would love to see your Operator added to this collection. We currently use automated vetting via continuous integration plus manual review to curate a list of high-quality, well-documented Operators. If you are new to Kubernetes Operators start [here](https://sdk.operatorframework.io/build/).
23+
24+
If you have an existing Operator read our contribution guidelines on how to [open a PR](contributing-via-pr.md). Then the community operator pipeline will be triggered to test your Operator and merge a Pull Request.
25+
26+
## Contributing Guide
27+
28+
- [Prerequisites](contributing-prerequisites.md)
29+
- [Where to place operator](contributing-where-to.md)
30+
- [Creating pull request (PR)](contributing-via-pr.md)
31+
- [Operator Publishing / Review settings](operator-ci-yaml.md)
32+
- [OKD/OpenShift Catalogs criteria and options](packaging-required-criteria-ocp.md)
33+
34+
## Test and release process for the Operator
35+
36+
Refer to the [operator pipeline documentation](docs/pipelines_overview.md) .
37+
38+
## IMPORTANT NOTICE
39+
40+
Some APIs versions are deprecated and are OR will no longer be served on the Kubernetes version
41+
`1.22/1.25/1.26` and consequently on vendors like Openshift `4.9/4.12/4.13`.
42+
43+
**What does it mean for you?**
44+
45+
Operator bundle versions using the removed APIs can not work successfully from the respective releases.
46+
Therefore, it is recommended to check if your solutions are failing in these scenarios to stop using these versions
47+
OR by setting the `"olm.properties": '[{"type": "olm.maxOpenShiftVersion", "value": "<OCP version>"}]'`
48+
to block cluster admins upgrades when they have Operator versions installed that can **not**
49+
work well in OCP versions higher than the value informed. Also, by defining a valid OCP range via the annotation `com.redhat.openshift.versions`
50+
into the `metadata/annotations.yaml` for our solution does **not** end up shipped on OCP/OKD versions where it cannot be installed.
51+
52+
> WARNING: `olm.maxOpenShiftVersion` should ONLY be used if you are 100% sure that your Operator bundle version
53+
> cannot work in upper releases. Otherwise, you might provide a bad user experience. Be aware that cluster admins
54+
> will be unable to upgrade their clusters with your solution installed. Then, suppose you do not provide any upper
55+
> version and a valid upgrade path for those who have your Operator installed be able to upgrade it and consequently
56+
> be allowed to upgrade their cluster version (i.e from OCP 4.10 to 4.11). In that case, cluster admins might
57+
> choose to uninstall your Operator and no longer use it so that they can move forward and upgrade their cluster
58+
> version without it.
59+
60+
Please, make sure you check the following announcements:
61+
- [How to deal with removal of v1beta1 CRD removals in Kubernetes 1.22 / OpenShift 4.9](https://github.com/redhat-openshift-ecosystem/community-operators-prod/discussions/138)
62+
- [Kubernetes API removals on 1.25/1.26 and Openshift 4.12/4.13 might impact your Operator. How to deal with it?](https://github.com/redhat-openshift-ecosystem/community-operators-prod/discussions/1182)
63+
64+
## Reporting Bugs
65+
66+
Use the issue tracker in this repository to report bugs.
67+
68+
[k8s-deprecated-guide]: https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-22

docs/img/op_pr_tests_failed.png

203 KB
Loading

docs/img/op_test_pr.png

222 KB
Loading
30.1 KB
Loading

docs/img/static_tests_example.png

178 KB
Loading

docs/pipeline-admin-guide.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ This document aims to provide information needed for maintenance and troubleshoo
44

55
## Operator repositories
66
- Certified operators
7-
- prod: https://github.com/redhat-openshift-ecosystem/certified-operators
8-
- nonprod: https://github.com/redhat-openshift-ecosystem/certified-operators-preprod
7+
- prod: https://github.com/redhat-openshift-ecosystem/certified-operators
8+
- nonprod: https://github.com/redhat-openshift-ecosystem/certified-operators-preprod
99
- Marketplace operators
10-
- prod: https://github.com/redhat-openshift-ecosystem/redhat-marketplace-operators
11-
- nonprod: https://github.com/redhat-openshift-ecosystem/redhat-marketplace-operators-preprod
10+
- prod: https://github.com/redhat-openshift-ecosystem/redhat-marketplace-operators
11+
- nonprod: https://github.com/redhat-openshift-ecosystem/redhat-marketplace-operators-preprod
1212
- Community OCP operators
13-
- prod: https://github.com/redhat-openshift-ecosystem/community-operators-prod
14-
- nonprod: https://github.com/redhat-openshift-ecosystem/community-operators-pipeline-preprod/
13+
- prod: https://github.com/redhat-openshift-ecosystem/community-operators-prod
14+
- nonprod: https://github.com/redhat-openshift-ecosystem/community-operators-pipeline-preprod/
1515

1616
Pre-production repositories are used for all pre-prod environments (stage, dev, qa). Each environment has a dedicated git branch. By selecting a target branch you can select an environment where the operator will be tested.
1717

1818
## OCP environments
19-
https://console-openshift-console.apps.pipelines-prod.ijdb.p1.openshiftapps.com/pipelines/ns/operator-pipeline-prod
20-
https://console-openshift-console.apps.pipelines-stage.0ce8.p1.openshiftapps.com/pipelines/ns/operator-pipeline-stage
19+
- https://console-openshift-console.apps.pipelines-prod.ijdb.p1.openshiftapps.com/pipelines/ns/operator-pipeline-prod
20+
- https://console-openshift-console.apps.pipelines-stage.0ce8.p1.openshiftapps.com/pipelines/ns/operator-pipeline-stage
2121

2222
## Pipelines
2323

@@ -29,8 +29,8 @@ Testing and certification of OpenShift operators from ISV and Community sources
2929
- **ISV Release pipeline** - The release pipeline distributes ISV operator to all index images supported by the operator bundle and make sure the new operator is visible on Red Hat Ecosystem catalog.
3030

3131
### Community pipelines
32-
- **Community Hosted pipeline** - Similarly as the ISV hosted pipeline, the community hosted pipeline verifies if a new operator bundle follows all pre-defined rules and passes all the community tests. The pipeline verifies that operator can be installed on a OCP cluster. A Preflight tools is used to execute a dynamic test suite
33-
- **Community Release pipeline** - The release pipeline distributes a community operators into OCP catalog.
32+
- **Hosted pipeline** - Similarly as the ISV hosted pipeline, the community hosted pipeline verifies if a new operator bundle follows all pre-defined rules and passes all the community tests. The pipeline verifies that operator can be installed on a OCP cluster. A Preflight tools is used to execute a dynamic test suite
33+
- **Release pipeline** - The release pipeline distributes a community operators into OCP catalog.
3434

3535
## Troubleshooting
3636

@@ -62,8 +62,6 @@ Based on which pipeline fails one of these command can be used to re-trigger it
6262

6363
- `/pipeline restart operator-hosted-pipeline`
6464
- `/pipeline restart operator-release-pipeline`
65-
- `/pipeline restart community-hosted-pipeline`
66-
- `/pipeline restart community-release-pipeline`
6765

6866
![re-trigger](img/re-trigger.png "Example of the re-trigger command.")
6967

docs/users/best-practices.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Operator Best Practices
2+
3+
Check the sections Best Practices for OLM and SDK projects to know more about its best practices and common recommendations, suggestions and conventions, see:
4+
5+
- [SDK best practices](https://sdk.operatorframework.io/docs/best-practices/)
6+
- [OLM best practices](https://olm.operatorframework.io/docs/best-practices/)
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Before submitting your Operator
2+
3+
> **Important:** "First off, thanks for taking the time to contribute your Operator!"
4+
5+
## A primer to Openshift Community Operators
6+
7+
This project collects Community Operators that work with OpenShift to be displayed in the embedded OperatorHub. If you are new to Operators, start [here](https://operatorframework.io/).
8+
9+
## Sign Your Work
10+
11+
The contribution process works off standard git _Pull Requests_. Every PR needs to be signed. The sign-off is a simple line at the end of the explanation for a commit. Your signature certifies that you wrote the patch or otherwise have the right to contribute the material. The rules are pretty simple if you can certify the below (from [developercertificate.org](https://developercertificate.org/)):
12+
13+
```
14+
Developer Certificate of Origin
15+
Version 1.1
16+
17+
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
18+
1 Letterman Drive
19+
Suite D4700
20+
San Francisco, CA, 94129
21+
22+
Everyone is permitted to copy and distribute verbatim copies of this
23+
license document, but changing it is not allowed.
24+
25+
26+
Developer's Certificate of Origin 1.1
27+
28+
By making a contribution to this project, I certify that:
29+
30+
(a) The contribution was created in whole or in part by me and I
31+
have the right to submit it under the open source license
32+
indicated in the file; or
33+
34+
(b) The contribution is based upon previous work that, to the best
35+
of my knowledge, is covered under an appropriate open source
36+
license and I have the right under that license to submit that
37+
work with modifications, whether created in whole or in part
38+
by me, under the same open source license (unless I am
39+
permitted to submit under a different license), as indicated
40+
in the file; or
41+
42+
(c) The contribution was provided directly to me by some other
43+
person who certified (a), (b) or (c) and I have not modified
44+
it.
45+
46+
(d) I understand and agree that this project and the contribution
47+
are public and that a record of the contribution (including all
48+
personal information I submit with it, including my sign-off) is
49+
maintained indefinitely and may be redistributed consistent with
50+
this project or the open source license(s) involved.
51+
```
52+
53+
Then you just add a line to every git commit message:
54+
55+
Signed-off-by: John Doe <[email protected]>
56+
57+
Use your real name (sorry, no pseudonyms or anonymous contributions.)
58+
59+
If you set your `user.name` and `user.email` git configs, you can sign your commit automatically with `git commit -s`.
60+
61+
Note: If your git config information is set properly then viewing the `git log` information for your commit will look something like this:
62+
63+
```
64+
Author: John Doe <[email protected]>
65+
Date: Mon Oct 21 12:23:17 2019 -0800
66+
67+
Update README
68+
69+
Signed-off-by: John Doe <[email protected]>
70+
```
71+
72+
Notice the `Author` and `Signed-off-by` lines **must match**.
73+
74+

docs/users/contributing-via-pr.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Submitting your Operator via Pull Requests (PR) in community operators project
2+
3+
## Overview
4+
To submit an operator one has to do these steps
5+
6+
1. Fork project `https://github.com/redhat-openshift-ecosystem/community-operators-prod`
7+
1. Make a pull request
8+
1. Place the operator in the target directory. [More info](./contributing-where-to.md)
9+
- operators
10+
1. Configure `ci.yaml` file. [More info](./operator-ci-yaml.md)
11+
- Setup reviewers
12+
- Operator versioning strategy
13+
1. Verify tests and fix problems, if possible
14+
1. Ask for help in the PR in case of problems
15+
16+
17+
## Pull request
18+
19+
When a pull request is created, a number of tests are executed via community hosted pipeline. One can see the results in the comment section of conversation tab.
20+
21+
![PR](../img/op_test_pr.png)
22+
23+
## You are done
24+
User is done when all tests are green. When the PR is merged, the community release pipeline will be triggered.
25+
26+
## Test results failed?
27+
When operator tests are failing, one can see a following picture
28+
29+
![Summary of test results when failing](../img/op_pr_tests_failed.png)
30+
31+
In case of failures, please have a look at the logs of specific tests. If an error is not clear to you, please ask in the PR. Maintainers will be happy to help you with it.
32+
33+
## Useful commands interacting with the pipeline
34+
You can post the following comment/command:
35+
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.

0 commit comments

Comments
 (0)