Skip to content

Commit 9c394f1

Browse files
authored
Fix docs: "Getting Started" and "Tutorials" (#1443)
There were several intentional breaking changes in the API which are now included in v0.18.0 release. This commit mostly focuses on updating the documentation to reflect API changes. This includes making sure that snippets and example outputs match the current state of the project. Relevant PRs: * #1439 * #1434 Signed-off-by: Mikalai Radchuk <[email protected]>
1 parent 293cd7f commit 9c394f1

File tree

6 files changed

+179
-179
lines changed

6 files changed

+179
-179
lines changed

docs/getting-started/olmv1_getting_started.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ spec:
4444
type: Image
4545
image:
4646
ref: quay.io/operatorhubio/catalog:latest
47-
pollInterval: 10m
47+
pollIntervalMinutes: 10
4848
EOF
4949
```
5050

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

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

8584
For information on the downgrade process, see [here](../tutorials/downgrade-extension.md).
@@ -106,10 +105,10 @@ kubectl delete namespace argocd
106105

107106
```bash
108107
# Delete installer service account cluster roles
109-
kubectl delete clusterrole argocd-installer-clusterrole && kubectl delete clusterrole argocd-rbac-clusterrole
108+
kubectl delete clusterrole argocd-installer-clusterrole && kubectl delete clusterrole argocd-installer-rbac-clusterrole
110109
```
111110

112111
```bash
113112
# Delete installer service account cluster role bindings
114-
kuebctl delete clusterrolebinding argocd-installer-binding && kubectl delete clusterrolebinding argocd-rbac-binding
113+
kubectl delete clusterrolebinding argocd-installer-binding && kubectl delete clusterrolebinding argocd-installer-rbac-binding
115114
```

docs/tutorials/add-catalog.md

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -29,41 +29,39 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
2929
apiVersion: olm.operatorframework.io/v1
3030
kind: ClusterCatalog
3131
metadata:
32-
name: operatorhubio
32+
name: <catalog_name>
3333
spec:
3434
source:
3535
type: Image
3636
image:
3737
ref: <catalog_image>
38-
pollInterval: <poll_interval_duration>
38+
pollIntervalMinutes: <poll_interval_duration>
3939
```
4040
41-
`catalog_name`
41+
`catalog_image`
4242
: Specifies the image reference for the catalog you want to install, such as `quay.io/operatorhubio/catalog:latest`.
4343

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

5048
``` yaml title="Example `operatorhubio.yaml` CR"
5149
apiVersion: olm.operatorframework.io/v1
5250
kind: ClusterCatalog
5351
metadata:
54-
name: operatorhub
52+
name: operatorhubio
5553
spec:
5654
source:
5755
type: Image
5856
image:
5957
ref: quay.io/operatorhubio/catalog:latest
60-
pollInterval: 10m
58+
pollIntervalMinutes: 10
6159
```
6260
6361
2. Apply the ClusterCatalog CR:
6462
6563
``` terminal
66-
kubectl apply -f <clustercatalog_cr>.yaml
64+
kubectl apply -f operatorhubio.yaml
6765
```
6866

6967
``` text title="Example output"
@@ -81,8 +79,8 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
8179
```
8280

8381
``` terminal title="Example output"
84-
NAME LASTUNPACKED AGE
85-
operatorhubio 9m31s 9m55s
82+
NAME LASTUNPACKED SERVING AGE
83+
operatorhubio 18s True 27s
8684
```
8785

8886
* Check the status of your catalog:
@@ -99,40 +97,40 @@ This catalog is distributed as an image [quay.io/operatorhubio/catalog](https://
9997
API Version: olm.operatorframework.io/v1
10098
Kind: ClusterCatalog
10199
Metadata:
102-
Creation Timestamp: 2024-10-02T19:51:24Z
103-
Finalizers:
100+
Creation Timestamp: 2024-11-13T15:11:08Z
101+
Finalizers:
104102
olm.operatorframework.io/delete-server-cache
105-
Generation: 1
106-
Resource Version: 33321
107-
UID: 52894532-0646-41a5-8285-c7f48bba49e4
103+
Generation: 1
104+
Resource Version: 3069
105+
UID: 2c94ebf8-32ea-4a62-811a-c7098cd2d4db
108106
Spec:
109-
Priority: 0
107+
Availability Mode: Available
108+
Priority: 0
110109
Source:
111110
Image:
112-
Poll Interval: 10m0s
113-
Ref: quay.io/operatorhubio/catalog:latest
114-
Type: Image
111+
Poll Interval Minutes: 10
112+
Ref: quay.io/operatorhubio/catalog:latest
113+
Type: Image
115114
Status:
116115
Conditions:
117-
Last Transition Time: 2024-03-12T19:35:34Z
116+
Last Transition Time: 2024-11-13T15:11:19Z
118117
Message: Successfully unpacked and stored content from resolved source
119-
Observed Generation: 2
118+
Observed Generation: 1
120119
Reason: Succeeded
121-
Status: False
120+
Status: True
122121
Type: Progressing
123-
Last Transition Time: 2024-03-12T19:35:34Z
122+
Last Transition Time: 2024-11-13T15:11:19Z
124123
Message: Serving desired content from resolved source
125-
Observed Generation: 2
124+
Observed Generation: 1
126125
Reason: Available
127126
Status: True
128127
Type: Serving
129-
URLs:
130-
Base: https://catalogd-server.olmv1-system.svc/catalogs/operatorhubio
131-
Last Unpacked: 2024-03-12T19:35:34Z
128+
Last Unpacked: 2024-11-13T15:11:18Z
132129
Resolved Source:
133130
Image:
134-
Last Successful Poll Attempt: 2024-03-12T19:35:26Z
135-
Ref: quay.io/operatorhubio/catalog@sha256:dee29aaed76fd1c72b654b9bc8bebc4b48b34fd8d41ece880524dc0c3c1c55ec
136-
Type: Image
137-
Events: <none>
131+
Ref: quay.io/operatorhubio/catalog@sha256:3cd8fde1dfd4269467451c4b2c77d4196b427004f2eb82686376f28265655c1c
132+
Type: Image
133+
Urls:
134+
Base: https://catalogd-service.olmv1-system.svc/catalogs/operatorhubio
135+
Events: <none>
138136
```

docs/tutorials/downgrade-extension.md

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Custom Resource Definitions (CRDs) ensure that the resources used by the `Cluste
2626

2727
**Disable CRD Safety Check Configuration:**
2828

29-
Add the `crdUpgradeSafety` field and set its `policy` to `Disabled` in the `ClusterExtension` resource under the `preflight` section.
29+
Add the `crdUpgradeSafety` field and set its `enforcement` to `None` in the `ClusterExtension` resource. This configuration disables CRD safety checks during the downgrade process.
3030

3131
**Example:**
3232

@@ -36,29 +36,27 @@ kind: ClusterExtension
3636
metadata:
3737
name: example-extension
3838
spec:
39+
namespace: argocd
40+
serviceAccount:
41+
name: argocd-installer
3942
install:
4043
preflight:
4144
crdUpgradeSafety:
42-
policy: Disabled
43-
namespace: argocd
44-
serviceAccount:
45-
name: argocd-installer
45+
enforcement: None
4646
source:
4747
sourceType: Catalog
4848
catalog:
4949
packageName: argocd-operator
5050
version: 0.6.0
51-
upgradeConstraintPolicy: SelfCertified
5251
```
5352
5453
**Command Example:**
5554
5655
If you prefer using the command line, you can use `kubectl` to modify the upgrade CRD safety check configuration.
5756

5857
```bash
59-
kubectl patch clusterextension <extension_name> --patch '{"spec":{"install":{"preflight":{"crdUpgradeSafety":{"policy":"Disabled"}}}}}' --type=merge
58+
kubectl patch clusterextension example-extension --patch '{"spec":{"install":{"preflight":{"crdUpgradeSafety":{"enforcement":"None"}}}}}' --type=merge
6059
```
61-
Kubernetes will apply the updated configuration, disabling CRD safety checks during the downgrade process.
6260

6361
### 2. Ignoring Catalog Provided Upgrade Constraints
6462

@@ -76,24 +74,27 @@ kind: ClusterExtension
7674
metadata:
7775
name: example-extension
7876
spec:
77+
namespace: argocd
78+
serviceAccount:
79+
name: argocd-installer
80+
install:
81+
preflight:
82+
crdUpgradeSafety:
83+
enforcement: None
7984
source:
8085
sourceType: Catalog
8186
catalog:
8287
packageName: argocd-operator
8388
version: 0.6.0
8489
upgradeConstraintPolicy: SelfCertified
85-
install:
86-
namespace: argocd
87-
serviceAccount:
88-
name: argocd-installer
8990
```
9091

9192
**Command Example:**
9293

9394
If you prefer using the command line, you can use `kubectl` to modify the upgrade constraint policy.
9495

9596
```bash
96-
kubectl patch clusterextension <extension_name> --patch '{"spec":{"upgradeConstraintPolicy":"SelfCertified"}}' --type=merge
97+
kubectl patch clusterextension example-extension --patch '{"spec":{"source": {"catalog":{"upgradeConstraintPolicy":"SelfCertified"}}}}' --type=merge
9798
```
9899

99100
### 3. Executing the Downgrade
@@ -105,7 +106,7 @@ Once the CRD safety checks are disabled and upgrade constraints are set, you can
105106
Modify the `ClusterExtension` custom resource to specify the target version and adjust the upgrade constraints.
106107

107108
```bash
108-
kubectl edit clusterextension <extension_name>
109+
kubectl edit clusterextension example-extension
109110
```
110111

111112
2. **Update the Version:**
@@ -116,17 +117,21 @@ Once the CRD safety checks are disabled and upgrade constraints are set, you can
116117
apiVersion: olm.operatorframework.io/v1
117118
kind: ClusterExtension
118119
metadata:
119-
name: <extension_name>
120+
name: example-extension
120121
spec:
122+
namespace: argocd
123+
serviceAccount:
124+
name: argocd-installer
125+
install:
126+
preflight:
127+
crdUpgradeSafety:
128+
enforcement: None
121129
source:
122130
sourceType: Catalog
123131
catalog:
124-
packageName: <package_name>
132+
packageName: argocd-operator
125133
version: <target_version>
126-
install:
127-
namespace: <namespace>
128-
serviceAccount:
129-
name: <service_account>
134+
upgradeConstraintPolicy: SelfCertified
130135
```
131136

132137
`target_version`
@@ -145,7 +150,7 @@ After completing the downgrade, verify that the `ClusterExtension` is functionin
145150
1. **Check the Status of the ClusterExtension:**
146151

147152
```bash
148-
kubectl get clusterextension <extension_name> -o yaml
153+
kubectl get clusterextension example-extension -o yaml
149154
```
150155

151156
Ensure that the `status` reflects the target version and that there are no error messages.

0 commit comments

Comments
 (0)