Skip to content

Commit

Permalink
Update extension upgrade tutorial doc
Browse files Browse the repository at this point in the history
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 0.

Signed-off-by: Tayler Geiger <[email protected]>
  • Loading branch information
trgeiger committed Nov 15, 2024
1 parent 5445800 commit 72d38af
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 21 deletions.
2 changes: 1 addition & 1 deletion config/samples/olm_v1_clusterextension.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,4 @@ spec:
sourceType: Catalog
catalog:
packageName: argocd-operator
version: 0.6.0
version: 0.2.0
27 changes: 7 additions & 20 deletions docs/tutorials/upgrade-extension.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ For information on downgrading an extension, see [Downgrade an Extension](downgr

## Prerequisites

* You have an extension installed
* You have a ClusterExtension installed
* The target version is compatible with OLM v1 (see [OLM v1 limitations](../project/olmv1_limitations.md))
* CRD compatibility between the versions being upgraded or downgraded (see [CRD upgrade safety](../concepts/crd-upgrade-safety.md))
* 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))
* Any changes to the CustomResourceDefinition in the new version meet compatibility requirements (see [CRD upgrade safety](../concepts/crd-upgrade-safety.md))
* The installer ServiceAccount's RBAC permissions are adequate for the target version (see [Minimal RBAC for Installer Service Account](../howto/derive-service-account.md))

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

## Procedure

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

``` yaml title="Example CR"
apiVersion: olm.operatorframework.io/v1
Expand All @@ -35,7 +35,7 @@ spec:
sourceType: Catalog
catalog:
packageName: argocd-operator
version: 0.5.0
version: 0.2.0
```
* Update the version field in the ClusterExtension resource:
Expand All @@ -54,7 +54,7 @@ spec:
sourceType: Catalog
catalog:
packageName: argocd-operator
version: 0.6.0 # Update to version 0.6.0
version: 0.2.1 # Update to version 0.2.1
EOF
```

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

``` terminal
kubectl patch clusterextension <extension_name> --type='merge' -p '{"spec": {"source": {"catalog": {"version": "<target_version>"}}}}'
```

`extension_name`
: Specifies the name defined in the `metadata.name` field of the extension's CR.

`target_version`
: Specifies the version to upgrade or downgrade to.

For example:
``` terminal
kubectl patch clusterextension argocd --type='merge' -p '{"spec": {"source": {"catalog": {"version": "0.6.0"}}}}'
kubectl patch clusterextension argocd --type='merge' -p '{"spec": {"source": {"catalog": {"version": "0.2.1"}}}}'
```

!!! success
``` text title="Example output"
clusterextension.olm.operatorframework.io/argocd patched
```

### Verification

* Verify that the Kubernetes extension is updated:

``` terminal
Expand Down

0 comments on commit 72d38af

Please sign in to comment.