Skip to content

Commit 2eb590a

Browse files
Merge pull request #654 from imiller0/version-update-infra
Version update infra
2 parents 4fa266a + ac4ad4a commit 2eb590a

41 files changed

Lines changed: 434 additions & 158 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Claude Code Guidance for OpenShift Telco RDS Repository
2+
3+
## Repository Overview
4+
5+
This repository contains reference design specifications (RDS) for OpenShift telco deployments across three configurations:
6+
7+
- **telco-hub**: Hub cluster configuration (ACM, GitOps, TALM, storage)
8+
- **telco-core**: Core/regional cluster configuration (networking, storage, scheduling)
9+
- **telco-ran**: RAN/edge cluster configuration (DU profile, low-latency workloads)
10+
11+
Each configuration maintains two parallel directory structures:
12+
- `reference-crs/` or `source-crs/`: Deployable manifests
13+
- `reference-crs-kube-compare/` or `kube-compare-reference/`: Template versions with variables for validation
14+
15+
## Version Updates
16+
17+
For detailed instructions on updating this repository for a new OpenShift release, see [VERSION_UPDATE_GUIDE.md](VERSION_UPDATE_GUIDE.md).
18+
19+
The guide covers:
20+
- Operator subscription updates across all three references
21+
- Policy generator version-specific naming conventions
22+
- ClusterInstance and AgentServiceConfig updates
23+
- Mirror registry configuration
24+
- Metadata documentation updates
25+
- Version numbering patterns for different operators
26+
- Common pitfalls and testing procedures
27+
28+
## Branch Strategy
29+
30+
- Main branch represents the **current development** release
31+
- Each major release gets its own reference configurations
32+
- Version numbers throughout the repository should be consistent
33+
- The repository name/branch determines the target OpenShift version
34+
35+
## Contact & Contributions
36+
37+
For questions about version updates or policy generators:
38+
- Check the telco-core/configuration/README.md for upgrade policy details
39+
- Check the telco-ran/configuration/argocd/README.md for GitOps/ZTP requirements
40+
- ACM version compatibility matrix is documented in telco-ran README

VERSION_UPDATE_GUIDE.md

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
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+
```

telco-core/configuration/core-baseline.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22
apiVersion: policy.open-cluster-management.io/v1
33
kind: PolicyGenerator
44
metadata:
5-
name: core-baseline-19
5+
name: core-baseline-22
66
policyDefaults:
77
namespace: ztp-core-policies
88
policySets: []
99
placement:
1010
clusterSelectors:
1111
common: "core"
12-
version: "4.20"
12+
version: "4.22"
1313
remediationAction: "inform"
1414
policies:
1515
# Base cluster configuration
16-
- name: core-cluster-config-4.20
16+
- name: core-cluster-config-4.22
1717
policyAnnotations:
1818
ran.openshift.io/ztp-deploy-wave: "1"
1919
manifests:
2020
- path: reference-crs/required/other/operator-hub.yaml
2121
- path: reference-crs/required/other/catalog-source.yaml
2222
patches:
2323
- spec:
24-
image: registry.redhat.io/redhat/redhat-operator-index:v4.20
24+
image: registry.redhat.io/redhat/redhat-operator-index:v4.22
2525
- path: reference-crs/required/scheduling/Scheduler.yaml
2626

2727
# Core cluster OLM operators
28-
- name: core-operator-subs-4.20
28+
- name: core-operator-subs-4.22
2929
policyAnnotations:
3030
ran.openshift.io/ztp-deploy-wave: "5"
3131
manifests:
@@ -40,7 +40,7 @@ policies:
4040
- kind: ClusterServiceVersion
4141
namespace: openshift-logging
4242
# Update with specific target version
43-
name: cluster-logging.v6.2.0
43+
name: cluster-logging.v6.5.0
4444
conditions:
4545
- type: Succeeded
4646
status: "True"
@@ -63,7 +63,7 @@ policies:
6363
patches:
6464
- spec:
6565
installPlanApproval: Manual
66-
channel: stable-4.20
66+
channel: stable-4.21
6767
- path: reference-crs/required/networking/metallb/metallbNS.yaml
6868
- path: reference-crs/required/networking/metallb/metallbOperGroup.yaml
6969
- path: reference-crs/required/networking/metallb/metallbSubscription.yaml
@@ -84,7 +84,7 @@ policies:
8484
installPlanApproval: Manual
8585

8686
# Operator configuration
87-
- name: core-operator-config-4.20
87+
- name: core-operator-config-4.22
8888
policyAnnotations:
8989
ran.openshift.io/ztp-deploy-wave: "7"
9090
manifests:
@@ -106,4 +106,4 @@ policies:
106106
- path: reference-crs/required/scheduling/sched.yaml
107107
patches:
108108
- spec:
109-
imageSpec: registry.example.com/openshift4/noderesourcetopology-scheduler-rhel9:v4.20.0
109+
imageSpec: registry.example.com/openshift4/noderesourcetopology-scheduler-rhel9:v4.22.0

telco-core/configuration/core-finish.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
apiVersion: policy.open-cluster-management.io/v1
33
kind: PolicyGenerator
44
metadata:
5-
name: core-customer-policies
5+
name: core-customer-policies-22
66
policyDefaults:
77
namespace: ztp-core-policies
88
policySets: []
99
placement:
1010
clusterSelectors:
1111
common: "core"
12-
version: "4.20"
12+
version: "4.22"
1313
remediationAction: "inform"
1414
policies:
1515
# unpause baseline configuration
16-
- name: custom-mcp-unpause
16+
- name: custom-mcp-unpause-22
1717
policyAnnotations:
1818
ran.openshift.io/ztp-deploy-wave: "200"
1919
manifests:
@@ -55,7 +55,7 @@ policies:
5555
- type: Updating
5656
status: "False"
5757

58-
- name: core-custom-mcp-set-maxavailable
58+
- name: core-custom-mcp-set-maxavailable-22
5959
policyAnnotations:
6060
ran.openshift.io/ztp-deploy-wave: "201"
6161
manifests:

0 commit comments

Comments
 (0)