Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
Fixes various issues in the docs. Mostly updates snippets to
reflect new fields from recent API changes.

Signed-off-by: Mikalai Radchuk <[email protected]>
  • Loading branch information
Mikalai Radchuk committed Nov 11, 2024
1 parent aaa0e00 commit 9d1e6a2
Show file tree
Hide file tree
Showing 12 changed files with 202 additions and 215 deletions.
2 changes: 1 addition & 1 deletion config/samples/catalogd_operatorcatalog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ spec:
type: Image
image:
ref: quay.io/operatorhubio/catalog:latest
pollInterval: 10m
pollIntervalMinutes: 10
8 changes: 4 additions & 4 deletions docs/concepts/crd-upgrade-safety.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ kind: ClusterExtension
metadata:
name: clusterextension-sample
spec:
namespace: default
serviceAccount:
name: argocd-installer
source:
sourceType: Catalog
catalog:
packageName: argocd-operator
version: 0.6.0
install:
namespace: default
serviceAccount:
name: argocd-installer
preflight:
crdUpgradeSafety:
disabled: true
enforcement: "None"
```
You cannot disable individual field validators. If you disable the CRD Upgrade Safety preflight check, all field validators are disabled.
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/upgrade-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ where setting the `upgradeConstraintPolicy` to:

OLM supports Semver to provide a simplified way for package authors to define compatible upgrades. According to the Semver standard, releases within a major version (e.g. `>=1.0.0 <2.0.0`) must be compatible. As a result, package authors can publish a new package version following the Semver specification, and OLM assumes compatibility. Package authors do not have to explicitly define upgrade edges in the catalog.

> [!NOTE]
> Currently, OLM 1.0 does not support automatic upgrades to the next major version. You must manually verify and perform major version upgrades. For more information about major version upgrades, see [Manually verified upgrades and downgrades](#manually-verified-upgrades-and-downgrades).
!!! note
Currently, OLM 1.0 does not support automatic upgrades to the next major version. You must manually verify and perform major version upgrades. For more information about major version upgrades, see [Manually verified upgrades and downgrades](#manually-verified-upgrades-and-downgrades).

### Upgrades within the major version zero

Expand Down
14 changes: 7 additions & 7 deletions docs/contribute/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

The following `make run` starts a [KIND](https://sigs.k8s.io/kind) cluster for you to get a local cluster for testing, see the manual install steps below for how to run against a remote cluster.

> [!NOTE]
> You will need a container runtime environment, like Docker, or experimentally, Podman, installed, to run Kind.
>
> If you are on MacOS, see [Special Setup for MacOS](#special-setup-for-macos).
!!! note
You will need a container runtime environment, like Docker, or experimentally, Podman, installed, to run Kind.

If you are on MacOS, see [Special Setup for MacOS](#special-setup-for-macos).

### Quickstart Installation

Expand All @@ -20,9 +20,9 @@ This will build a local container image of the operator-controller, create a new

### To Install Any Given Release

> [!CAUTION]
> Operator-Controller depends on [cert-manager](https://cert-manager.io/). Running the following command
> may affect an existing installation of cert-manager and cause cluster instability.
!!! warning
Operator-Controller depends on [cert-manager](https://cert-manager.io/). Running the following command
may affect an existing installation of cert-manager and cause cluster instability.

The latest version of Operator Controller can be installed with the following command:

Expand Down
14 changes: 7 additions & 7 deletions docs/getting-started/olmv1_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

The following script will install OLMv1 on a Kubernetes cluster. If you don't have one, you can deploy a Kubernetes cluster with [KIND](https://sigs.k8s.io/kind).

> [!CAUTION]
> Operator-Controller depends on [cert-manager](https://cert-manager.io/). Running the following command
> may affect an existing installation of cert-manager and cause cluster instability.
!!! warning
Operator-Controller depends on [cert-manager](https://cert-manager.io/). Running the following command
may affect an existing installation of cert-manager and cause cluster instability.

The latest version of Operator Controller can be installed with the following command:

Expand Down Expand Up @@ -44,7 +44,7 @@ spec:
type: Image
image:
ref: quay.io/operatorhubio/catalog:latest
pollInterval: 10m
pollIntervalMinutes: 10
EOF
```

Expand Down Expand Up @@ -78,7 +78,7 @@ and on the extension upgrade process [here](../tutorials/upgrade-extension.md).

```bash
# Update to v0.11.0
kubectl patch clusterextension argocd --type='merge' -p '{"spec": {"source": {"content-management": {"version": "0.11.0"}}}}'
kubectl patch clusterextension argocd --type='merge' -p '{"spec": {"source": {"catalog": {"version": "0.11.0"}}}}'

```

Expand Down Expand Up @@ -106,10 +106,10 @@ kubectl delete namespace argocd

```bash
# Delete installer service account cluster roles
kubectl delete clusterrole argocd-installer-clusterrole && kubectl delete clusterrole argocd-rbac-clusterrole
kubectl delete clusterrole argocd-installer-clusterrole && kubectl delete clusterrole argocd-installer-rbac-clusterrole
```

```bash
# Delete installer service account cluster role bindings
kuebctl delete clusterrolebinding argocd-installer-binding && kubectl delete clusterrolebinding argocd-rbac-binding
kubectl delete clusterrolebinding argocd-installer-binding && kubectl delete clusterrolebinding argocd-installer-rbac-binding
```
30 changes: 10 additions & 20 deletions docs/howto/catalog-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,61 +12,51 @@ curl -k https://localhost:8443/catalogs/operatorhubio/api/v1/all | <query>

## Package queries

Available packages in a catalog
:
Available packages in a catalog:
``` terminal
jq -s '.[] | select( .schema == "olm.package")'
```

Packages that support `AllNamespaces` install mode and do not use webhooks

:
Packages that support `AllNamespaces` install mode and do not use webhooks:
``` terminal
jq -c 'select(.schema == "olm.bundle") | {"package":.package, "version":.properties[] | select(.type == "olm.bundle.object").value.data | @base64d | fromjson | select(.kind == "ClusterServiceVersion" and (.spec.installModes[] | select(.type == "AllNamespaces" and .supported == true) != null) and .spec.webhookdefinitions == null).spec.version}'
```

Package metadata
:
Package metadata:
``` terminal
jq -s '.[] | select( .schema == "olm.package") | select( .name == "<package_name>")'
```

Catalog blobs in a package
:
Catalog blobs in a package:
``` terminal
jq -s '.[] | select( .package == "<package_name>")'
```

## Channel queries

Channels in a package
:
Channels in a package:
``` terminal
jq -s '.[] | select( .schema == "olm.channel" ) | select( .package == "<package_name>") | .name'
```

Versions in a channel
:
Versions in a channel:
``` terminal
jq -s '.[] | select( .package == "<package_name>" ) | select( .schema == "olm.channel" ) | select( .name == "<channel_name>" ) | .entries | .[] | .name'
```

Latest version in a channel and upgrade path
:
``` terminal
Latest version in a channel and upgrade path:
``` terminal
jq -s '.[] | select( .schema == "olm.channel" ) | select ( .name == "<channel>") | select( .package == "<package_name>")'
```

## Bundle queries

Bundles in a package
:
Bundles in a package:
``` terminal
jq -s '.[] | select( .schema == "olm.bundle" ) | select( .package == "<package_name>") | .name'
```

Bundle dependencies and available APIs
:
Bundle dependencies and available APIs:
``` terminal
jq -s '.[] | select( .schema == "olm.bundle" ) | select ( .name == "<bundle_name>") | select( .package == "<package_name>")'
```
61 changes: 30 additions & 31 deletions docs/tutorials/add-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,33 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
apiVersion: olm.operatorframework.io/v1alpha1
kind: ClusterCatalog
metadata:
name: operatorhubio
name: <catalog_name>
spec:
source:
type: Image
image:
ref: <catalog_image>
pollInterval: <poll_interval_duration>
pollIntervalMinutes: <poll_interval_duration>
```
`catalog_name`
: Specifies the image reference for the catalog you want to install, such as `quay.io/operatorhubio/catalog:latest`.

`poll_interval_duration`
: Specifies the interval for polling the remote registry for newer image digests.
The default value is `24h`.
Valid units include seconds (`s`), minutes (`m`), and hours (`h`).
To disable polling, set a zero value, such as `0s`.
: Specifies the number of minutes for polling the remote registry for newer image digests.
This field is optional. To disable polling, unset the field.

``` yaml title="Example `operatorhubio.yaml` CR"
apiVersion: olm.operatorframework.io/v1alpha1
kind: ClusterCatalog
metadata:
name: operatorhub
name: operatorhubio
spec:
source:
type: Image
image:
ref: quay.io/operatorhubio/catalog:latest
pollInterval: 10m
pollIntervalMinutes: 10
```
2. Apply the ClusterCatalog CR:
Expand All @@ -81,8 +79,8 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
```

``` terminal title="Example output"
NAME LASTUNPACKED AGE
operatorhubio 9m31s 9m55s
NAME LASTUNPACKED SERVING AGE
operatorhubio 18s True 27s
```

* Check the status of your catalog:
Expand All @@ -99,40 +97,41 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
API Version: olm.operatorframework.io/v1alpha1
Kind: ClusterCatalog
Metadata:
Creation Timestamp: 2024-10-02T19:51:24Z
Finalizers:
Creation Timestamp: 2024-11-11T13:19:12Z
Finalizers:
olm.operatorframework.io/delete-server-cache
Generation: 1
Resource Version: 33321
UID: 52894532-0646-41a5-8285-c7f48bba49e4
Generation: 1
Resource Version: 2143
UID: 2cebaf11-7a5c-4813-bef3-58ac2e373057
Spec:
Priority: 0
Availability Mode: Available
Priority: 0
Source:
Image:
Poll Interval: 10m0s
Ref: quay.io/operatorhubio/catalog:latest
Type: Image
Poll Interval Minutes: 10
Ref: quay.io/operatorhubio/catalog:latest
Type: Image
Status:
Conditions:
Last Transition Time: 2024-03-12T19:35:34Z
Last Transition Time: 2024-11-11T13:19:21Z
Message: Successfully unpacked and stored content from resolved source
Observed Generation: 2
Observed Generation: 1
Reason: Succeeded
Status: False
Status: True
Type: Progressing
Last Transition Time: 2024-03-12T19:35:34Z
Last Transition Time: 2024-11-11T13:19:21Z
Message: Serving desired content from resolved source
Observed Generation: 2
Observed Generation: 1
Reason: Available
Status: True
Type: Serving
URLs:
Base: https://catalogd-server.olmv1-system.svc/catalogs/operatorhubio
Last Unpacked: 2024-03-12T19:35:34Z
Last Unpacked: 2024-11-11T13:19:21Z
Resolved Source:
Image:
Last Successful Poll Attempt: 2024-03-12T19:35:26Z
Ref: quay.io/operatorhubio/catalog@sha256:dee29aaed76fd1c72b654b9bc8bebc4b48b34fd8d41ece880524dc0c3c1c55ec
Type: Image
Events: <none>
Ref: quay.io/operatorhubio/catalog@sha256:025cb23665449d8974102dda042c2e25bd3cb9138791971748f48d57c90a21d8
Type: Image
Urls:
Base: https://catalogd-service.olmv1-system.svc/catalogs/operatorhubio
Events: <none>
```
Loading

0 comments on commit 9d1e6a2

Please sign in to comment.