|
| 1 | +# OLM v1 Plugin |
| 2 | + |
| 3 | +Manage Kubernetes cluster extensions using Operator Lifecycle Manager v1 (operator-controller). |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +OLM v1 provides a simpler, more flexible approach to managing Kubernetes extensions including Operators, Helm charts, and other cluster extensions. This plugin helps you discover, install, upgrade, and manage extensions in your cluster. |
| 8 | + |
| 9 | +## Prerequisites |
| 10 | + |
| 11 | +- `kubectl` or `oc` CLI configured with cluster access |
| 12 | +- OLM v1 (operator-controller) installed in the cluster |
| 13 | +- Appropriate RBAC permissions for managing ClusterExtensions and ClusterCatalogs |
| 14 | + |
| 15 | +## Key Concepts |
| 16 | + |
| 17 | +- **ClusterCatalog**: A catalog of available extensions |
| 18 | +- **ClusterExtension**: An installed extension in the cluster |
| 19 | +- **Channels**: Release channels for extensions (stable, candidate, etc.) |
| 20 | +- **Version Constraints**: Semver-based version management |
| 21 | + |
| 22 | +## Commands |
| 23 | + |
| 24 | +### Catalog Management |
| 25 | + |
| 26 | +#### `/olmv1:catalog-add <catalog-name> <image-ref> [--poll-interval <duration>]` |
| 27 | +Add a new catalog source to the cluster. |
| 28 | + |
| 29 | +**Example:** |
| 30 | +```bash |
| 31 | +/olmv1:catalog-add operatorhubio quay.io/operatorhubio/catalog:latest |
| 32 | +/olmv1:catalog-add my-catalog registry.example.com/catalog:v1 --poll-interval 1h |
| 33 | +``` |
| 34 | + |
| 35 | +#### `/olmv1:catalog-list` |
| 36 | +List all available catalogs and their status. |
| 37 | + |
| 38 | +**Example:** |
| 39 | +```bash |
| 40 | +/olmv1:catalog-list |
| 41 | +``` |
| 42 | + |
| 43 | +### Extension Discovery |
| 44 | + |
| 45 | +#### `/olmv1:search <keyword> [--catalog <catalog-name>]` |
| 46 | +Search for available extensions across catalogs. |
| 47 | + |
| 48 | +**Example:** |
| 49 | +```bash |
| 50 | +/olmv1:search cert-manager |
| 51 | +/olmv1:search prometheus --catalog operatorhubio |
| 52 | +``` |
| 53 | + |
| 54 | +### Extension Installation |
| 55 | + |
| 56 | +#### `/olmv1:install <extension-name> [--version <version>] [--channel <channel>] [--catalog <catalog-name>] [--namespace <namespace>]` |
| 57 | +Install an extension with optional version or channel constraints. |
| 58 | + |
| 59 | +**Parameters:** |
| 60 | +- `extension-name`: Name of the extension to install (required) |
| 61 | +- `--version`: Specific version or version range (e.g., "1.14.5", ">=1.14.0 <1.15.0") |
| 62 | +- `--channel`: Channel to track (e.g., "stable", "candidate") |
| 63 | +- `--catalog`: Catalog source to use |
| 64 | +- `--namespace`: Target namespace for namespaced extensions |
| 65 | + |
| 66 | +**Examples:** |
| 67 | +```bash |
| 68 | +# Install latest from stable channel |
| 69 | +/olmv1:install cert-manager --channel stable |
| 70 | + |
| 71 | +# Install specific version |
| 72 | +/olmv1:install argocd-operator --version 0.11.0 |
| 73 | + |
| 74 | +# Install with version range |
| 75 | +/olmv1:install prometheus-operator --version ">=0.68.0 <0.69.0" |
| 76 | + |
| 77 | +# Install from specific catalog |
| 78 | +/olmv1:install my-extension --catalog my-catalog |
| 79 | +``` |
| 80 | + |
| 81 | +### Extension Management |
| 82 | + |
| 83 | +#### `/olmv1:list [--all-namespaces]` |
| 84 | +List all installed extensions with their status. |
| 85 | + |
| 86 | +**Example:** |
| 87 | +```bash |
| 88 | +/olmv1:list |
| 89 | +/olmv1:list --all-namespaces |
| 90 | +``` |
| 91 | + |
| 92 | +#### `/olmv1:status <extension-name>` |
| 93 | +Get detailed status and health information for an installed extension. |
| 94 | + |
| 95 | +**Shows:** |
| 96 | +- Installation status and conditions |
| 97 | +- Resolved version and channel |
| 98 | +- Associated resources (CRDs, deployments, services) |
| 99 | +- Recent events and issues |
| 100 | + |
| 101 | +**Example:** |
| 102 | +```bash |
| 103 | +/olmv1:status cert-manager |
| 104 | +``` |
| 105 | + |
| 106 | +### Extension Upgrades |
| 107 | + |
| 108 | +#### `/olmv1:upgrade <extension-name> [--version <version>] [--channel <channel>]` |
| 109 | +Upgrade an extension using different strategies. |
| 110 | + |
| 111 | +**Strategies:** |
| 112 | +- Channel-based: Track a specific channel for automatic updates |
| 113 | +- Version pinning: Upgrade to a specific version |
| 114 | +- Version range: Allow upgrades within a version range |
| 115 | +- Z-stream: Stay within the same minor version |
| 116 | + |
| 117 | +**Examples:** |
| 118 | +```bash |
| 119 | +# Upgrade to latest in stable channel |
| 120 | +/olmv1:upgrade cert-manager --channel stable |
| 121 | + |
| 122 | +# Upgrade to specific version |
| 123 | +/olmv1:upgrade argocd-operator --version 0.12.0 |
| 124 | + |
| 125 | +# Upgrade within version range (z-stream) |
| 126 | +/olmv1:upgrade prometheus-operator --version "~0.68.0" |
| 127 | +``` |
| 128 | + |
| 129 | +### Extension Removal |
| 130 | + |
| 131 | +#### `/olmv1:uninstall <extension-name>` |
| 132 | +Safely uninstall an extension from the cluster. |
| 133 | + |
| 134 | +**Example:** |
| 135 | +```bash |
| 136 | +/olmv1:uninstall cert-manager |
| 137 | +``` |
| 138 | + |
| 139 | +## Typical Workflows |
| 140 | + |
| 141 | +### Installing a New Extension |
| 142 | +```bash |
| 143 | +# 1. Search for the extension |
| 144 | +/olmv1:search cert-manager |
| 145 | + |
| 146 | +# 2. Install with desired version/channel |
| 147 | +/olmv1:install cert-manager --channel stable |
| 148 | + |
| 149 | +# 3. Verify installation |
| 150 | +/olmv1:status cert-manager |
| 151 | + |
| 152 | +# 4. List all installed extensions |
| 153 | +/olmv1:list |
| 154 | +``` |
| 155 | + |
| 156 | +### Managing Upgrades |
| 157 | +```bash |
| 158 | +# Check current status |
| 159 | +/olmv1:status my-extension |
| 160 | + |
| 161 | +# Upgrade to latest in channel |
| 162 | +/olmv1:upgrade my-extension --channel stable |
| 163 | + |
| 164 | +# Or pin to specific version |
| 165 | +/olmv1:upgrade my-extension --version 2.0.0 |
| 166 | + |
| 167 | +# Verify upgrade |
| 168 | +/olmv1:status my-extension |
| 169 | +``` |
| 170 | + |
| 171 | +### Troubleshooting |
| 172 | +```bash |
| 173 | +# Check extension status and conditions |
| 174 | +/olmv1:status <extension-name> |
| 175 | + |
| 176 | +# Check catalog availability |
| 177 | +/olmv1:catalog-list |
| 178 | + |
| 179 | +# View all extensions and their health |
| 180 | +/olmv1:list |
| 181 | +``` |
| 182 | + |
| 183 | +## Differences from OLM v0 |
| 184 | + |
| 185 | +- **Simpler API**: Uses ClusterExtension and ClusterCatalog instead of Subscription/CSV/InstallPlan |
| 186 | +- **Flexible versioning**: Supports semver ranges and version constraints |
| 187 | +- **Broader scope**: Manages any Kubernetes extension, not just Operators |
| 188 | +- **No automatic upgrades**: Explicit upgrade commands for better control |
| 189 | +- **GitOps friendly**: Declarative extension management |
| 190 | + |
| 191 | +## Troubleshooting |
| 192 | + |
| 193 | +Common issues and solutions: |
| 194 | + |
| 195 | +1. **Extension stuck in progressing state**: Check the status for detailed error messages |
| 196 | +2. **Catalog not available**: Verify catalog image and network connectivity |
| 197 | +3. **Version conflicts**: Use `/olmv1:status` to see resolved dependencies |
| 198 | +4. **RBAC issues**: Ensure proper cluster permissions for managing extensions |
| 199 | + |
| 200 | +## Resources |
| 201 | + |
| 202 | +- [OLM v1 Documentation](https://operator-framework.github.io/operator-controller/) |
| 203 | +- [OLM v1 GitHub Repository](https://github.com/operator-framework/operator-controller) |
| 204 | +- [Migration from OLM v0](https://operator-framework.github.io/operator-controller/concepts/olmv0-to-olmv1/) |
0 commit comments