Skip to content

Commit f70dafd

Browse files
committed
Update extension upgrade tutorial doc
With the addition of the CRD Upgrade Safety preflight check, our existing example of upgrading argocd from 0.5.0 to 0.6.0 no longer serves as a good example. This commit changes the example to use an update from 0.2.0 to 0.2.1 which no longer fails the CRD Upgrade check, and also doesn't violate our restriction on automatic upgrades between minor versions with a major version of zero. Signed-off-by: Tayler Geiger <[email protected]>
1 parent 5445800 commit f70dafd

File tree

2 files changed

+24
-37
lines changed

2 files changed

+24
-37
lines changed

docs/getting-started/olmv1_getting_started.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,11 @@ kubectl apply -f https://raw.githubusercontent.com/operator-framework/operator-c
7373
To upgrade the installed extension, update the version field in the ClusterExtension resource. Note that
7474
there must be CRD compatibility between the versions being upgraded, and the target version must be
7575
compatible with OLM v1. More information on CRD upgrade safety can be found [here](../concepts/crd-upgrade-safety.md),
76-
compatible with OLM v1. More information on CRD upgrade safety can be found [here](../concepts/crd-upgrade-safety.md),
77-
and on the extension upgrade process [here](../tutorials/upgrade-extension.md).
76+
and more information on the extension upgrade process can be found [here](../tutorials/upgrade-extension.md).
7877

7978
```bash
8079
# Update to v0.11.0
81-
kubectl patch clusterextension argocd --type='merge' -p '{"spec": {"source": {"catalog": {"version": "0.11.0"}}}}'
80+
kubectl patch clusterextension argocd --type='merge' -p '{"spec": {"source": {"catalog": {"version": "0.2.1"}}}}'
8281
```
8382

8483
For information on the downgrade process, see [here](../tutorials/downgrade-extension.md).

docs/tutorials/upgrade-extension.md

Lines changed: 22 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ For information on downgrading an extension, see [Downgrade an Extension](downgr
1111

1212
## Prerequisites
1313

14-
* You have an extension installed
14+
* You have a ClusterExtension installed
1515
* The target version is compatible with OLM v1 (see [OLM v1 limitations](../project/olmv1_limitations.md))
16-
* CRD compatibility between the versions being upgraded or downgraded (see [CRD upgrade safety](../concepts/crd-upgrade-safety.md))
17-
* The installer service account's RBAC permissions are adequate for the target version (see [Minimal RBAC for Installer Service Account](../howto/derive-service-account.md))
16+
* Any changes to the CustomResourceDefinition in the new version meet compatibility requirements (see [CRD upgrade safety](../concepts/crd-upgrade-safety.md))
17+
* The installer ServiceAccount's RBAC permissions are adequate for the target version (see [Minimal RBAC for Installer Service Account](../howto/derive-service-account.md))
18+
* You are not attempting to upgrade between minor versions with a major version of zero (see [Upgrades within the major version zero](../concepts/upgrade-support.md#upgrades-within-the-major-version-zero))
1819

1920
For more detailed information see [Upgrade Support](../concepts/upgrade-support.md).
2021

2122
## Procedure
2223

23-
Suppose we have successfully created and installed v0.5.0 of the ArgoCD operator with the following `ClusterExtension`:
24+
Suppose we have successfully created and installed v0.2.0 of the ArgoCD operator with the following `ClusterExtension`:
2425

2526
``` yaml title="Example CR"
2627
apiVersion: olm.operatorframework.io/v1
@@ -35,7 +36,7 @@ spec:
3536
sourceType: Catalog
3637
catalog:
3738
packageName: argocd-operator
38-
version: 0.5.0
39+
version: 0.2.0
3940
```
4041
4142
* Update the version field in the ClusterExtension resource:
@@ -54,7 +55,7 @@ spec:
5455
sourceType: Catalog
5556
catalog:
5657
packageName: argocd-operator
57-
version: 0.6.0 # Update to version 0.6.0
58+
version: 0.2.1 # Update to version 0.2.1
5859
EOF
5960
```
6061

@@ -66,27 +67,14 @@ spec:
6667
Alternatively, you can use `kubectl patch` to update the version field:
6768

6869
``` terminal
69-
kubectl patch clusterextension <extension_name> --type='merge' -p '{"spec": {"source": {"catalog": {"version": "<target_version>"}}}}'
70-
```
71-
72-
`extension_name`
73-
: Specifies the name defined in the `metadata.name` field of the extension's CR.
74-
75-
`target_version`
76-
: Specifies the version to upgrade or downgrade to.
77-
78-
For example:
79-
``` terminal
80-
kubectl patch clusterextension argocd --type='merge' -p '{"spec": {"source": {"catalog": {"version": "0.6.0"}}}}'
70+
kubectl patch clusterextension argocd --type='merge' -p '{"spec": {"source": {"catalog": {"version": "0.2.1"}}}}'
8171
```
8272

8373
!!! success
8474
``` text title="Example output"
8575
clusterextension.olm.operatorframework.io/argocd patched
8676
```
8777

88-
### Verification
89-
9078
* Verify that the Kubernetes extension is updated:
9179

9280
``` terminal
@@ -100,15 +88,15 @@ spec:
10088
metadata:
10189
annotations:
10290
kubectl.kubernetes.io/last-applied-configuration: |
103-
{"apiVersion":"olm.operatorframework.io/v1","kind":"ClusterExtension","metadata":{"annotations":{},"name":"argocd"},"spec":{"namespace":"argocd","serviceAccount":{"name":"argocd-installer"},"source":{"catalog":{"packageName":"argocd-operator","version":"0.5.0"},"sourceType":"Catalog"}}}
104-
creationTimestamp: "2024-11-11T14:13:12Z"
91+
{"apiVersion":"olm.operatorframework.io/v1","kind":"ClusterExtension","metadata":{"annotations":{},"name":"argocd"},"spec":{"namespace":"argocd","serviceAccount":{"name":"argocd-installer"},"source":{"catalog":{"packageName":"argocd-operator","version":"0.2.1"},"sourceType":"Catalog"}}}
92+
creationTimestamp: "2024-11-15T19:29:34Z"
10593
finalizers:
10694
- olm.operatorframework.io/cleanup-unpack-cache
10795
- olm.operatorframework.io/cleanup-contentmanager-cache
10896
generation: 2
10997
name: argocd
110-
resourceVersion: "3289"
111-
uid: 20f12bf4-76eb-457d-bbac-d28416c18a30
98+
resourceVersion: "7274"
99+
uid: 9af8e5f8-ae3d-4231-b15c-e63c62619db7
112100
spec:
113101
namespace: argocd
114102
serviceAccount:
@@ -117,49 +105,49 @@ spec:
117105
catalog:
118106
packageName: argocd-operator
119107
upgradeConstraintPolicy: CatalogProvided
120-
version: 0.6.0
108+
version: 0.2.1
121109
sourceType: Catalog
122110
status:
123111
conditions:
124-
- lastTransitionTime: "2024-11-11T14:13:12Z"
112+
- lastTransitionTime: "2024-11-15T19:29:34Z"
125113
message: ""
126114
observedGeneration: 2
127115
reason: Deprecated
128116
status: "False"
129117
type: Deprecated
130-
- lastTransitionTime: "2024-11-11T14:13:12Z"
118+
- lastTransitionTime: "2024-11-15T19:29:34Z"
131119
message: ""
132120
observedGeneration: 2
133121
reason: Deprecated
134122
status: "False"
135123
type: PackageDeprecated
136-
- lastTransitionTime: "2024-11-11T14:13:12Z"
124+
- lastTransitionTime: "2024-11-15T19:29:34Z"
137125
message: ""
138126
observedGeneration: 2
139127
reason: Deprecated
140128
status: "False"
141129
type: ChannelDeprecated
142-
- lastTransitionTime: "2024-11-11T14:13:12Z"
130+
- lastTransitionTime: "2024-11-15T19:29:34Z"
143131
message: ""
144132
observedGeneration: 2
145133
reason: Deprecated
146134
status: "False"
147135
type: BundleDeprecated
148-
- lastTransitionTime: "2024-11-11T14:13:18Z"
149-
message: Installed bundle quay.io/operatorhubio/argocd-operator@sha256:d538c45a813b38ef0e44f40d279dc2653f97ca901fb660da5d7fe499d51ad3b3
136+
- lastTransitionTime: "2024-11-15T19:29:37Z"
137+
message: Installed bundle quay.io/operatorhubio/argocd-operator@sha256:e1cfacacf891fb243ded2bcd449a4f5c76f3230bf96a4de32734a87303e087c8
150138
successfully
151139
observedGeneration: 2
152140
reason: Succeeded
153141
status: "True"
154142
type: Installed
155-
- lastTransitionTime: "2024-11-11T14:13:19Z"
143+
- lastTransitionTime: "2024-11-15T19:29:37Z"
156144
message: desired state reached
157145
observedGeneration: 2
158146
reason: Succeeded
159147
status: "True"
160148
type: Progressing
161149
install:
162150
bundle:
163-
name: argocd-operator.v0.6.0
164-
version: 0.6.0
151+
name: argocd-operator.v0.2.1
152+
version: 0.2.1
165153
```

0 commit comments

Comments
 (0)