Skip to content

Commit

Permalink
content: Add newline between text and [links, code blocks]. Add trail…
Browse files Browse the repository at this point in the history
…ing newlines. Remove unneeded newlines.
  • Loading branch information
timflannagan committed Feb 9, 2021
1 parent 16efa9a commit fe981bd
Show file tree
Hide file tree
Showing 27 changed files with 53 additions and 53 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,5 @@ Any changes will be included in real time.
## Useful resources
* [Docsy user guide](wherever it goes): All about Docsy, including how it manages navigation, look and feel, and multi-language support.
* [Hugo documentation](https://gohugo.io/documentation/): Comprehensive reference for Hugo.
* [Docsy user guide](https://www.docsy.dev/docs/): All about Docsy, including how it manages navigation, look and feel, and multi-language support.
* [Hugo documentation](https://gohugo.io/documentation/): Comprehensive reference for Hugo.
1 change: 0 additions & 1 deletion content/en/docs/Concepts/crds/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ weight: 2
description: >
A list of [CustomResourceDefinitions](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/) defined by OLM.
---

1 change: 0 additions & 1 deletion content/en/docs/Concepts/crds/clusterserviceversion.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,3 @@ spec:
version: v1alpha1
kind: Other
```
8 changes: 7 additions & 1 deletion content/en/docs/Concepts/crds/operatorgroup.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ An OperatorGroup is an OLM resource that provides rudimentary multitenant config
## Membership

An operator defined by CSV `csv-a` is said to be a _member_ of `OperatorGroup` `op-a` in namespace `ns-a` if both of the following hold:

* `op-a` is the only `OperatorGroup` in `ns-a`
* `csv-a`'s `InstallMode`s support `op-a`'s target namespace set

Expand All @@ -25,6 +26,7 @@ If there exists more than one `OperatorGroup` in a single namespace, any CSV cre
### InstallModes and Supported OperatorGroups

An `InstallMode` consists of an `InstallModeType` field and a boolean `Supported` field. A CSV's spec can contain a set of `InstallModes` of four distinct `InstallModeTypes`:

* `OwnNamespace`: If supported, the operator can be a member of an `OperatorGroup` that selects its own namespace
* `SingleNamespace`: If supported, the operator can be a member of an `OperatorGroup` that selects one namespace
* `MultiNamespace`: If supported, the operator can be a member of an `OperatorGroup` that selects more than one namespace
Expand Down Expand Up @@ -85,6 +87,7 @@ The resolved set of selected namespaces is surfaced in an `OperatorGroup`'s `sta
## OperatorGroup CSV Annotations

Member CSVs of an `OperatorGroup` get the following annotations:

* `olm.operatorGroup=<group-name>`
* Contains the name of the `OperatorGroup`
* `olm.operatorGroupNamespace=<group-namespace>`
Expand Down Expand Up @@ -125,6 +128,7 @@ status:
## RBAC

When an `OperatorGroup` is created, 3 ClusterRoles each containing a single AggregationRule are generated:

* `<operatorgroup-name>-admin`
* ClusterRoleSelector set to match the `olm.opgroup.permissions/aggregate-to-admin: <operatorgroup-name>` label

Expand All @@ -135,6 +139,7 @@ When an `OperatorGroup` is created, 3 ClusterRoles each containing a single Aggr
* ClusterRoleSelector set to match the `olm.opgroup.permissions/aggregate-to-view: <operatorgroup-name>` label

When a CSV becomes an active member of an `OperatorGroup` and is not in a failed state with reason InterOperatorGroupOwnerConflict, the following RBAC resources are generated:

* For each provided API resource from a CRD:
* A `<kind.group-version-admin>` ClusterRole is generated with the `*` verb on `<group>` `<kind>` with aggregation labels `rbac.authorization.k8s.io/aggregate-to-admin: true` and `olm.opgroup.permissions/aggregate-to-admin: <operatorgroup-name>`
* A `<kind.group-version-edit>` ClusterRole is generated with the `create, update, patch, release` verbs on `<group>` `<kind>` with aggregation labels `rbac.authorization.k8s.io/aggregate-to-edit: true` and `olm.opgroup.permissions/aggregate-to-edit: <operatorgroup-name>`
Expand Down Expand Up @@ -190,6 +195,7 @@ spec:
### Rules for Intersection

Each time an active member CSV syncs, OLM queries the cluster for the set of _intersecting provided APIs_ between the CSV's `OperatorGroup` and all others. OLM then checks if that set __is the empty set__:

* If __true__ and the CSV's provided APIs __are a subset__ of the `OperatorGroup`'s:
* Continue transitioning
* If __true__ and the CSV's provided APIs __are not a subset__ of the `OperatorGroup`'s:
Expand All @@ -209,10 +215,10 @@ Each time an active member CSV syncs, OLM queries the cluster for the set of _in
* Replace the `OperatorGroup`'s `olm.providedAPIs` annotation with the difference between itself and the CSV's provided APIs

> Note: Failure states caused by `OperatorGroup`s are non-terminal.

> Note: When checking intersection rules, an `OperatorGroup`'s namespace is always included as part of its selected target namespaces.

Each time an `OperatorGroup` syncs:

* The set of provided APIs from active member CSV's is calculated from the cluster (ignoring [copied CSVs](#copied-csvs))
* The cluster set is compared to `olm.providedAPIs`:
* If `olm.providedAPIs` contains any extraneous provided APIs:
Expand Down
4 changes: 1 addition & 3 deletions content/en/docs/Concepts/olm-architecture/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Each of these Operators are responsible for managing the CRDs that are the basis

**_Table 1. CRDs managed by OLM and Catalog Operators_**


| Resource | Short Name | Owner | Description |
|-----------------------|-------------|---------|---------------------------------------|
| ClusterServiceVersion | **csv** | OLM | Application metadata: name, version, icon, required resources, installation, etc. |
Expand Down Expand Up @@ -72,9 +71,8 @@ Users can also create an InstallPlan resource directly, containing the names of
* Watches for resolved InstallPlans and creates all of the discovered resources for it (if approved by a user or automatically).
* Watches for CatalogSources and Subscriptions and creates InstallPlans based on them.


## Catalog Registry

The Catalog Registry stores CSVs and CRDs for creation in a cluster and stores metadata about packages and channels.

A _package manifest_ is an entry in the Catalog Registry that associates a package identity with sets of CSVs. Within a package, channels point to a particular CSV. Because CSVs explicitly reference the CSV that they replace, a package manifest provides the Catalog Operator all of the information that is required to update a CSV to the latest version in a channel, stepping through each intermediate version.
A _package manifest_ is an entry in the Catalog Registry that associates a package identity with sets of CSVs. Within a package, channels point to a particular CSV. Because CSVs explicitly reference the CSV that they replace, a package manifest provides the Catalog Operator all of the information that is required to update a CSV to the latest version in a channel, stepping through each intermediate version.
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ graph TD;
v(BarOperator) --> |Provides|vs(Kind: Bar<br/>apiVersion: bargroup.io/bar/v1alpha1);
s(BazOperator) --> |Provides|ss(Kind: Baz<br />apiVersion: bazgroup.io/baz/v1alpha1)
v--> |Requires|ec;

classDef foo fill:#8addf2,stroke:#333,stroke-width:4px;
classDef bar fill:#ffcc26,stroke:#333,stroke-width:4px;
classDef baz fill:#ff7452,stroke:#333,stroke-width:4px;

class e,ec foo;
class v,vs bar;
class s,ss baz;

linkStyle default fill:none,stroke-width:2px;
{{</mermaid>}}

Expand Down Expand Up @@ -104,26 +104,26 @@ spec:
priority: 100
```

`CatalogSource` has a `priority` field, which is used by the resolver to know how to prefer options for a dependency.
`CatalogSource` has a `priority` field, which is used by the resolver to know how to prefer options for a dependency.

There are two rules that govern catalog preference:

- Options in higher-priority catalogs are preferred to options in lower-priority catalogs
- Options in the same catalog as the depender are preferred to any other catalogs.
- Options in higher-priority catalogs are preferred to options in lower-priority catalogs
- Options in the same catalog as the depender are preferred to any other catalogs.

#### Example - Same catalog preferred to all others

{{<mermaid>}}
graph TD
subgraph Catalog A - Priority 0
e(FooOperator<br /><br />Provides: Foo)
e(FooOperator<br /><br />Provides: Foo)
v(BarOperator<br /><br />Provides: Bar<br />Requires: Foo)
end

subgraph Catalog B - Priority 50
e2(FooOperatorAlt<br /><br />Provides: Foo)
e2(FooOperatorAlt<br /><br />Provides: Foo)
end

classDef foo fill:#8addf2,stroke:#333,stroke-width:4px;
classDef fooSelected fill:#8addf2,stroke:green,stroke-width:4px;
classDef bar fill:#ffcc26,stroke:#333,stroke-width:4px;
Expand All @@ -132,7 +132,7 @@ graph TD
class e fooSelected;
class e2 foo;
class v,vs bar;

linkStyle default fill:none,stroke-width:2px;
{{</mermaid>}}

Expand Down Expand Up @@ -163,7 +163,7 @@ graph TD
class e3 fooSelected;
class e2 foo;
class v,vs bar;

linkStyle default fill:none,stroke-width:2px;
{{</mermaid>}}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

---
title: "Operator Registry"
weight: 3
---

## What is Operator-Registry?

[Operator Registry](https://github.com/operator-framework/operator-registry) runs in a Kubernetes cluster to provide operator catalog data to [Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager).

<pre></pre>
Expand All @@ -26,7 +25,8 @@ And libraries:
* `pkg/containertools` - providing an interface to interact with and shell out to common container tooling binaries (if installed on the environment)

## Why do I want Operator Registry?
Operator registry allows you to package your operator in a defined format and make it available for OLM so that it can install your operator in a

Operator registry allows you to package your operator in a defined format and make it available for OLM so that it can install your operator in a
kubernetes cluster.
<pre></pre>
You can find all the releases of operator-registry in the [github release page](https://github.com/operator-framework/operator-registry/releases)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ opm index add --bundles quay.io/my-container-registry-namespace/my-manifest-bund
<pre></pre>
For more detail on using `opm` to generate index images, take a look at the [documentation](https://github.com/operator-framework/operator-registry/blob/master/docs/design/opm-tooling.md).
<pre></pre>

## Where should I go next?

* [Use the catalog of operators locally](/docs/concepts/olm-architecture/operator-registry/using-a-catalog-locally): Test your catalog locally
* [Using a Catalog with OLM](/docs/concepts/olm-architecture/operator-registry/using-catalog-with-olm): Make your operator available for OLM in a cluster


Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Once you have a database file, eg sqlite.db, you can serve the database locally
```bash
./bin/registry-server -d sqlite.db -p <port number to serve on (default "50051")>
```

[grpcurl](https://github.com/fullstorydev/grpcurl) is a useful tool for interacting with the example catalog server.

```sh
Expand All @@ -36,6 +37,7 @@ ListPackages
```sh
grpcurl -plaintext localhost:50051 api.Registry/ListPackages
```

```json
{
"name": "etcd"
Expand All @@ -48,6 +50,7 @@ grpcurl -plaintext localhost:50051 api.Registry/ListPackages
```sh
grpcurl -plaintext -d '{"name":"etcd"}' localhost:50051 api.Registry/GetPackage
```

```json
{
"name": "etcd",
Expand All @@ -65,6 +68,7 @@ grpcurl -plaintext -d '{"name":"etcd"}' localhost:50051 api.Registry/GetPackage
$ grpcurl localhost:50051 describe api.Registry.GetBundleForChannel
api.Registry.GetBundleForChannel is a method:
```

```json
{
"name": "GetBundleForChannel",
Expand All @@ -79,6 +83,7 @@ api.Registry.GetBundleForChannel is a method:
$ grpcurl localhost:50051 describe api.GetBundleInChannelRequest
api.GetBundleInChannelRequest is a message:
```

```json
{
"name": "GetBundleInChannelRequest",
Expand Down Expand Up @@ -113,6 +118,7 @@ api.GetBundleInChannelRequest is a message:
```sh
grpcurl -plaintext -d '{"pkgName":"etcd","channelName":"alpha"}' localhost:50051 api.Registry/GetBundleForChannel
```

```json
{
"csvName": "etcdoperator.v0.9.2",
Expand All @@ -124,4 +130,4 @@ grpcurl -plaintext -d '{"pkgName":"etcd","channelName":"alpha"}' localhost:50051
"{\"apiVersion\":\"apiextensions.k8s.io/v1beta1\",\"kind\":\"CustomResourceDefinition\",\"metadata\":{\"name\":\"etcdrestores.etcd.database.coreos.com\"},\"spec\":{\"group\":\"etcd.database.coreos.com\",\"names\":{\"kind\":\"EtcdRestore\",\"listKind\":\"EtcdRestoreList\",\"plural\":\"etcdrestores\",\"singular\":\"etcdrestore\"},\"scope\":\"Namespaced\",\"version\":\"v1beta2\"}}"
]
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ spec:
name: etcd
source: example-manifests
sourceNamespace: default
```
```
1 change: 0 additions & 1 deletion content/en/docs/Glossary/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,3 @@ description: >
### Update Graph

**Definition**: An upgrade graph links versions of [CSV](/docs/concepts/crds/clusterserviceversion) together, similar to the upgrade graph of any other packaged software. Operators can be installed sequentially, or certain versions can be skipped. The update graph is expected to grow only at the head with newer versions being added.

3 changes: 0 additions & 3 deletions content/en/docs/Tasks/Troubleshooting/_index.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@

---
title: "Troubleshooting"
linkTitle: "Troubleshooting"
description: >
Tips and tricks for troubleshooting unexpected behavior when installing and managing operators with OLM.
---


## Prereqs

Some of the commands listed in this section assume that you have [yq](https://github.com/mikefarah/yq) installed on your system. While `yq` is not required, it is a useful tool when parsing yaml. You can install `yq` by following the [official installation steps](https://github.com/mikefarah/yq#install).

2 changes: 1 addition & 1 deletion content/en/docs/Tasks/Troubleshooting/catalogsource.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ If the operator is present, check if the version you want is available:

### My CatalogSource cannot pull images from a private registry

If you are attempting to pull images from a private registry, make sure to specify a secret key in the `CatalogSource.Spec.Secrets` field.
If you are attempting to pull images from a private registry, make sure to specify a secret key in the `CatalogSource.Spec.Secrets` field.
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ The `CSV` is failing to install because it does not support the [OperatorGroup](

#### Messages Ending with "field is immutable"

The `CSV` is failing because its install strategy changes some immutable field of an existing `Deployment`. This usually happens on upgrade, after an operator author publishes a new version of the operator containing such a change. In this case, the issue can be resolved by publishing a new version of the operator that uses a different `Deployment` name, which will cause OLM to generate a completely new `Deployment` instead of attempting to patch any existing one.
The `CSV` is failing because its install strategy changes some immutable field of an existing `Deployment`. This usually happens on upgrade, after an operator author publishes a new version of the operator containing such a change. In this case, the issue can be resolved by publishing a new version of the operator that uses a different `Deployment` name, which will cause OLM to generate a completely new `Deployment` instead of attempting to patch any existing one.
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ packageserver-5c76df75bb-mq4qd 1/1 Running 0 5m26s

$ kubectl -n olm logs olm-operator-6999db5767-5r5zs
...
```
```
2 changes: 1 addition & 1 deletion content/en/docs/Tasks/Troubleshooting/subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ If the `Status` block does not provide enough information, check the [Catalog op

### Why does a single failing subscription cause all subscriptions in a namespace to fail?

Each Subscription in a namespace acts as a part of a set of operators for the namespace - think of a Subscription as an entry in a python `requirements.txt`. If OLM is unable to resolve part of the set, it knows that resolving the entire set will fail, so it will bail out of the installation of operators for that particular namespace. Subscriptions are separate objects but within a namespace they are all synced and resolved together.
Each Subscription in a namespace acts as a part of a set of operators for the namespace - think of a Subscription as an entry in a python `requirements.txt`. If OLM is unable to resolve part of the set, it knows that resolving the entire set will fail, so it will bail out of the installation of operators for that particular namespace. Subscriptions are separate objects but within a namespace they are all synced and resolved together.
3 changes: 0 additions & 3 deletions content/en/docs/Tasks/_index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@

---
title: "Core Tasks"
linkTitle: "Core Tasks"
weight: 2
description: >
Configuring and installing operators with OLM
---


1 change: 0 additions & 1 deletion content/en/docs/Tasks/creating-operator-manifests.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ TODO: link to SDK csv generation

Please see the documentation for [advanced operator configuration]() which includes additional suggestions for further integration with OLM.


```
This is the final element on the page and there should be no margin below this.
```
3 changes: 1 addition & 2 deletions content/en/docs/Tasks/install-operator-with-olm.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ $ kubectl apply og.yaml
Then, create a subscription for the operator:

```bash
$ cat sub.yaml
apiVersion: operators.coreos.com/v1alpha1
Expand All @@ -81,7 +80,7 @@ spec:
$ kubectl apply -f sub.yaml
subscription.operators.coreos.com/sub-to-my-operator created
```
```

Since the `approval` is `Manual`, we need to manually go in and approve the `InstallPlan`

Expand Down
4 changes: 3 additions & 1 deletion content/en/docs/Tasks/list-operators-available-to-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ Once you've packaged your operator and made it part of catalog, you can see it a
### Using the PackageManifest API

The `PackageManifest` API when queried, will return the union of globally available as well as namespaced available operators, from the namespace you're querying in.

```bash
kubectl get packagemanifest -n <namespace>
```

The list of available operators will be displayed as an output of those above commands:

```bash
$ kubectl get packagemanifest
NAME CATALOG AGE
Expand All @@ -28,4 +30,4 @@ etcd Community Operators 26m
postgres-operator Community Operators 26m
prometheus Community Operators 26m
wildfly Community Operators 26m
```
```
2 changes: 1 addition & 1 deletion content/en/docs/Tasks/make-operator-part-of-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ docker build -t example-registry:latest -f registry-Dockerfile .
docker push example-registry:latest
```

Your catalog is published and we are ready to use it on your cluster.
Your catalog is published and we are ready to use it on your cluster.
3 changes: 3 additions & 0 deletions content/en/docs/Tasks/uninstall-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The cluster admin should first understand which types (CRDs and APIServices) are
OLM uses the subscription resource to convey a user's intent to subscribe to the latest version of an operator. If the operator was installed with Automatic Updates (spec.Approval: `Automatic`), OLM will reinstall a new version of the operator even if the operator's CSV was deleted earlier. In effect, you must tell OLM that you do not want new versions of the operator to be installed by deleting the subscription associated with the operator.

You can list existing `Subscription` in a specific namespace with the following `kubectl` command:

```bash
$ kubectl get subscription -n <namespace>
# Example output
Expand All @@ -29,6 +30,7 @@ foo-sub foo foo-ca
> Note: The name of the operator installed by the subscription is available under the `Package` column.
The `Subscription` can be deleted by running this command:

```bash
kubectl delete subscription <subscription-name> -n <namespace>
```
Expand All @@ -55,6 +57,7 @@ kubectl delete clusterserviceversion <csv-name> -n <namespace>
### Combine steps 2 and 3

Alternatively, you can delete both `Subscription` and its `CSV` using a sequence of commands:

```bash
CSV=kubectl delete subscription <subscription-name> -n <namespace> -o json | jq '.status.installedCSV'
kubectl delete subscription <subscription-name> -n <namespace>
Expand Down
Loading

0 comments on commit fe981bd

Please sign in to comment.