|
| 1 | +# OpenShift Version Update Guide |
| 2 | + |
| 3 | +This guide provides step-by-step instructions for updating the telco RDS repository for a new OpenShift release. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +When updating this repository for a new OpenShift version (e.g., 4.22 → 4.23), follow this comprehensive checklist. Each section below details specific files and changes required across the three reference configurations (telco-hub, telco-core, telco-ran). |
| 8 | + |
| 9 | +## Update Checklist |
| 10 | + |
| 11 | +### 1. Operator Subscriptions |
| 12 | + |
| 13 | +Update operator channel versions in subscription files across all three configurations: |
| 14 | + |
| 15 | +**Standard operators** (align with OpenShift version): |
| 16 | +- Update to match OpenShift version |
| 17 | + - Channel format: `4.X` (e.g., `4.22` → `4.23`) |
| 18 | + - Files: `telco-core/configuration/reference-crs/required/scheduling/NROPSubscription.yaml` and kube-compare variant |
| 19 | + |
| 20 | +**Operators with custom numbering**: |
| 21 | +- **Cluster Logging Operator**: Update to latest stable |
| 22 | + - Channel format: `stable-X.Y` (e.g., `stable-6.4` → `stable-6.5`) |
| 23 | + |
| 24 | +- **GitOps Operator**: Update to latest compatible version |
| 25 | + - Channel format: `gitops-X.Y` (e.g., `gitops-1.19` → `gitops-1.20`) |
| 26 | + - Files: `telco-hub/configuration/reference-crs/required/gitops/gitopsSubscription.yaml` |
| 27 | + - Also: `telco-ran/configuration/argocd/deployment/openshift-gitops-operator.yaml` |
| 28 | + |
| 29 | +- **ACM (Advanced Cluster Management)**: Update to latest |
| 30 | + - ACM version is OCP version minus 5. OCP version `4.22` → ACM version `2.17` |
| 31 | + - Channel format: `release-X.Y` (e.g., `release-2.17` → `release-2.18`) |
| 32 | + - Multi Cluster Engine (MCE) is delivered with ACM. The MCE version is ACM minus 5: ACM version `2.17` → MCE version `2.12` |
| 33 | + - Also update ACM and MCE versions in mirror registry config (see below) |
| 34 | + |
| 35 | +- **ODF (OpenShift Data Foundation)**: **Special case!** |
| 36 | + - ODF releases 2-4 weeks **after** OpenShift GA |
| 37 | + - Ask if the ODF version should align with OCP or use the prior, N-1, version |
| 38 | + - Initially update to N-1 version (e.g., for OCP 4.23, use ODF `stable-4.22`) |
| 39 | + - Update to matching version after ODF release |
| 40 | + - Channel format: `stable-X.Y` |
| 41 | + - Files: Multiple locations in telco-hub and telco-core |
| 42 | + - **Also update ALL ODF sub-operators** in mirror registry config (see below) |
| 43 | + |
| 44 | +**Remember**: Update both `reference-crs/` AND `reference-crs-kube-compare/` (or `source-crs/` and `kube-compare-reference/`) versions! |
| 45 | + |
| 46 | +### 2. Policy Generator Files |
| 47 | + |
| 48 | +Policy generators define ACM policies and must be updated with version-specific names and selectors. Each reference has different policy generator files to update. |
| 49 | + |
| 50 | +**What to change**: |
| 51 | +The policy names in each PolicyGenerator have a version suffix which MUST match the OpenShift version. For example with OpenShift version 4.23 the policy name is `example-policy-23`. |
| 52 | +```yaml |
| 53 | +# PolicyGenerator metadata name |
| 54 | +metadata: |
| 55 | + name: core-baseline-19 # → core-baseline-23 |
| 56 | + # OR |
| 57 | + name: core-overlay-22 # → core-overlay-23 |
| 58 | + |
| 59 | +# Version selector |
| 60 | +placement: |
| 61 | + clusterSelectors: |
| 62 | + version: "4.22" # → "4.23" |
| 63 | + |
| 64 | +# Policy names (use new version number) |
| 65 | +policies: |
| 66 | + - name: core-cluster-config-4.19 # → core-cluster-config-4.23 |
| 67 | + - name: core-operator-subs-4.22 # → core-operator-subs-4.23 |
| 68 | + |
| 69 | +# Operator index images |
| 70 | +patches: |
| 71 | + - spec: |
| 72 | + image: registry.redhat.io/redhat/redhat-operator-index:v4.22 # → v4.23 |
| 73 | +``` |
| 74 | +
|
| 75 | +- Update PolicyGenerator patches for Subscription `channel: <value>` |
| 76 | +- Update PolicyGenerator patches for pullspec images with versioned tags |
| 77 | +- Update PolicyGenerator placement specifications which use version |
| 78 | +- Policy generator policy names MUST use version numbers which match the OpenShift version number (e.g., `core-cluster-config-4.23`) |
| 79 | + |
| 80 | +### 3. Image references |
| 81 | +The reference configuration includes image pullspecs in several places which use version specific tags for the image. These must be updated. These pullspecs may be in the reference-crs or in PolicyGenerator patches. Common places where image tags are used include: |
| 82 | +- CatalogSource images -- Update both the reference-cr and the PolicyGenerator overlay patch to align with the OpenShift version |
| 83 | +- Numa Resources Operator (NROP) -- Update image spec in the Scheduler (sched.yaml) and PolicyGenerator overlay patch to align with the OpenShift version |
| 84 | +- Upgrade policy -- Update the version and image pull spec in the PolicyGenerator overlay patch to align with the OpenShift version |
| 85 | +- The telco-hub reference includes a plugins Policy CR with image pullspec references which must be updated to the correct versions. The ztp-site-generate image aligns with OpenShift. The multicluster-operator image aligns with MCE. |
| 86 | + |
| 87 | +### 4. ACM AgentServiceConfig |
| 88 | + |
| 89 | +Add new OpenShift version osImages entries and remove the oldest version to maintain only 3 versions: |
| 90 | + |
| 91 | +**Files**: |
| 92 | +- `telco-hub/configuration/reference-crs/required/acm/acmAgentServiceConfig.yaml` |
| 93 | +- `telco-hub/configuration/reference-crs-kube-compare/default_value.yaml` |
| 94 | +- `telco-hub/configuration/example-overlays-config/acm/options-agentserviceconfig-patch.yaml` |
| 95 | + |
| 96 | +**Important**: Keep only the **3 most recent versions** (current + 2 previous) in osImages. |
| 97 | + |
| 98 | +**For 4.22 → 4.23 update**: |
| 99 | +1. Remove 4.20 entries |
| 100 | +2. Add 4.23 entries |
| 101 | +3. Result: Keep only 4.21, 4.22, 4.23 |
| 102 | + |
| 103 | +**Add new entry**: |
| 104 | +```yaml |
| 105 | +osImages: |
| 106 | + # ... existing 4.21, 4.22 entries ... |
| 107 | + - cpuArchitecture: "x86_64" |
| 108 | + openshiftVersion: "4.23" |
| 109 | + rootFSUrl: https://mirror.example.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.23/latest/rhcos-live-rootfs.x86_64.img |
| 110 | + url: https://mirror.example.com/pub/openshift-v4/x86_64/dependencies/rhcos/4.23/latest/rhcos-live-iso.x86_64.iso |
| 111 | + version: "9.6.YYYYMMDD-0" # Replace YYYYMMDD with the RHCOS build date from the image metadata |
| 112 | +``` |
| 113 | + |
| 114 | +**To find the RHCOS version**: Download the `.iso.sha256` file from the same RHCOS directory and extract the version from the filename or check the release metadata file (`commitmeta.json`) in the RHCOS release directory. |
| 115 | + |
| 116 | +**Note**: The kube-compare variant uses templating and doesn't require manual entry removal - it renders from the actual config. |
| 117 | + |
| 118 | +### 5. Mirror Registry Configuration |
| 119 | + |
| 120 | +**File**: `telco-hub/install/mirror-registry/imageset-config.yaml` |
| 121 | + |
| 122 | +The versions of each component in the mirror configuration must be updated. These versions must align with the changes made in corresponding Subscription updates. |
| 123 | +- Mirroring versions MUST match the Subscription versions for each operator |
| 124 | +- The additional images MUST include the images specified in the Hub reference plugins Policy |
| 125 | + |
| 126 | +### 6. Installation Examples (ClusterInstance) |
| 127 | + |
| 128 | +Find all ClusterInstance CRs (`kind: ClusterInstance`) and update clusterImageSetNameRef to align with the OpenShift version: |
| 129 | + |
| 130 | +**telco-core**: |
| 131 | +- `telco-core/install/example-standard-clusterinstace.yaml` |
| 132 | + |
| 133 | +**telco-ran**: |
| 134 | +- `telco-ran/configuration/argocd/example/clusterinstance/example-sno.yaml` |
| 135 | +- `telco-ran/configuration/argocd/example/clusterinstance/example-3node.yaml` |
| 136 | +- `telco-ran/configuration/argocd/example/clusterinstance/example-standard.yaml` |
| 137 | + |
| 138 | +Change: `clusterImageSetNameRef: "openshift-4.22"` → `"openshift-4.23"` |
| 139 | + |
| 140 | + |
| 141 | +### 7. Other locations |
| 142 | +Other versioning information to be reviewed and updated |
| 143 | +- Annotations added in PolicyGenerator overlay patches to trigger non-compliance, eg `noop-for-triggering-noncompliance: "22"` |
| 144 | +- Descriptive text in metadata.yaml, eg `This reference was designed for OpenShift 4.22` |
| 145 | +- URL locations in metadata.yaml -- Review all URLs for version number and update |
| 146 | +- OperatorStatus reference-crs and PolicyGenerator overlay patches. Review ClusterServiceVersion fields for version update. |
| 147 | +- The telco-core reference subscription validator `telco-core/configuration/reference-crs/custom-manifests/subscription-validator.yaml` must be updated: `ztp-validated: "4.22"` → `"4.23"` |
| 148 | + |
| 149 | + |
| 150 | +## Version Numbering Patterns |
| 151 | + |
| 152 | +Understanding different operator versioning schemes: |
| 153 | + |
| 154 | +| Operator | Format | Example | Aligns With | |
| 155 | +|----------|--------|---------|-------------| |
| 156 | +| OpenShift Platform | `4.X` | `4.22`, `4.23` | Release number | |
| 157 | +| NROP | `4.X` | `4.22`, `4.23` | OpenShift version | |
| 158 | +| ODF | `stable-4.X` | `stable-4.22` | OpenShift version (with delay) | |
| 159 | +| Cluster Logging | `stable-X.Y` | `stable-6.4` | Independent versioning | |
| 160 | +| GitOps | `gitops-X.Y` | `gitops-1.19` | Independent versioning | |
| 161 | +| ACM | `release-X.Y` | `release-2.17` (for OCP 4.22) | Independent versioning | |
| 162 | +| MCE | `stable-X.Y` | `stable-2.12` (for OCP 4.22) | Aligns with ACM version | |
| 163 | +| TALM, MetalLB, SR-IOV | `stable` | `stable` | Rolling channel | |
| 164 | + |
| 165 | +## Common Pitfalls |
| 166 | + |
| 167 | +1. **Forgetting kube-compare variants**: Always update both the reference-crs AND kube-compare versions of files |
| 168 | +2. **ODF timing**: Don't update ODF to matching version immediately - wait for ODF GA (2-4 weeks after OpenShift) |
| 169 | +3. **PolicyGenerator names**: Update both the PolicyGenerator CR name (metadata.name) AND the policy names within it |
| 170 | +4. **Upgrade policy**: The `core-upgrade.yaml` represents upgrading TO the new version, so use the target version number |
| 171 | +5. **All ODF operators**: There are 13+ ODF-related operators in imageset-config.yaml - update them all to be aligned with ODF |
| 172 | +6. **Image tags**: Update version tags in image references found in PolicyGenerator and reference CRs. |
| 173 | +7. **README files**: Don't update version references in README.md files (they're documentation/examples) |
| 174 | +8. **Deprecated files**: Don't update any version references in files in `deprecated` directories |
| 175 | +9. **Tekton files**: Don't update any version references in the `.tekton` directory |
| 176 | +10. **Dockerfile**: Don't update any version references in `Dockerfile` files |
| 177 | + |
| 178 | + |
| 179 | +## File Search Patterns |
| 180 | + |
| 181 | +When updating versions, search for these patterns: |
| 182 | + |
| 183 | +```bash |
| 184 | +# Find operator subscription files |
| 185 | +grep -r "^kind: Subscription" --include="*.yaml" telco-* |
| 186 | +
|
| 187 | +# Find policy generator files |
| 188 | +grep -r "^kind: PolicyGenerator" --include="*.yaml" telco-* |
| 189 | +
|
| 190 | +# Find version-specific references |
| 191 | +grep -r "4\.[12][0-9]\|stable-4\.[12][0-9]" --include="*.yaml" telco-* |
| 192 | +
|
| 193 | +# Find ClusterInstance examples |
| 194 | +grep -r "^kind: ClusterInstance" |
| 195 | +``` |
| 196 | + |
| 197 | +## Testing After Updates |
| 198 | + |
| 199 | +1. Verify no stale version references remain: |
| 200 | + ```bash |
| 201 | + grep -r "4\.22" --include="*.yaml" telco-* | grep -v "README" |
| 202 | + ``` |
| 203 | + |
| 204 | +2. Check all subscription channels were updated: |
| 205 | + ```bash |
| 206 | + grep -r "channel:" --include="*.yaml" telco-*/configuration |
| 207 | + ``` |
| 208 | + |
| 209 | +3. Check all images were updated: |
| 210 | + ```bash |
| 211 | + grep -r "image:" --include="*.yaml" telco-*/configuration |
| 212 | + ``` |
| 213 | + |
| 214 | +4. Ensure policy generator names are consistent: |
| 215 | + ```bash |
| 216 | + grep "name: core-.*-4.23" telco-core/configuration/*.yaml |
| 217 | + ``` |
| 218 | + |
| 219 | +## Commit Message Template |
| 220 | + |
| 221 | +``` |
| 222 | +Update all version references for OpenShift 4.23 |
| 223 | +- ACM: 2.18 |
| 224 | +- MCE: 2.13 |
| 225 | +- GitOps Operator: 1.20 |
| 226 | +- Cluster Logging Operator: 6.5 |
| 227 | +- ODF: 4.22 |
| 228 | + |
| 229 | +- Update policy generators and configurations |
| 230 | +- Update ClusterInstance examples to openshift-4.23 |
| 231 | +- Update day-2 operator subscriptions and catalog source images |
| 232 | +- Update subscription validator annotation |
| 233 | +- Update mirror registry |
| 234 | +- Update documentation: metadata.yaml URLs from 4.22 to 4.23 |
| 235 | +``` |
0 commit comments