-
Notifications
You must be signed in to change notification settings - Fork 77
Update all version references for OpenShift 5.0 #920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,31 +2,31 @@ | |
| apiVersion: policy.open-cluster-management.io/v1 | ||
| kind: PolicyGenerator | ||
| metadata: | ||
| name: core-baseline-22 | ||
| name: core-baseline-5-0 | ||
| policyDefaults: | ||
| namespace: ztp-core-policies | ||
| policySets: [] | ||
| placement: | ||
| labelSelector: | ||
| matchLabels: | ||
| common: "core" | ||
| version: "4.22" | ||
| version: "5.0" | ||
| remediationAction: "inform" | ||
| policies: | ||
| # Base cluster configuration | ||
| - name: core-cluster-config-4.22 | ||
| - name: core-cluster-config-5-0 | ||
| policyAnnotations: | ||
| ran.openshift.io/ztp-deploy-wave: "1" | ||
| manifests: | ||
| - path: reference-crs/required/other/operator-hub.yaml | ||
| - path: reference-crs/required/other/catalog-source.yaml | ||
| patches: | ||
| - spec: | ||
| image: registry.redhat.io/redhat/redhat-operator-index:v4.22 | ||
| image: registry.redhat.io/redhat/redhat-operator-index:v5.0 | ||
| - path: reference-crs/required/scheduling/Scheduler.yaml | ||
|
|
||
| # Core cluster OLM operators | ||
| - name: core-operator-subs-4.22 | ||
| - name: core-operator-subs-5-0 | ||
| policyAnnotations: | ||
| ran.openshift.io/ztp-deploy-wave: "5" | ||
| manifests: | ||
|
|
@@ -41,7 +41,7 @@ policies: | |
| - kind: ClusterServiceVersion | ||
| namespace: openshift-logging | ||
| # Update with specific target version | ||
| name: cluster-logging.v6.5.0 | ||
| name: cluster-logging.v6.6.1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n -C 4 \
'ClusterLogSubscription\.yaml|cluster-logging\.v6\.6\.1|stable-6\.6|startingCSV|installPlanApproval' \
hack telco-coreRepository: openshift-kni/telco-reference Length of output: 19713 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- Cluster Logging references ---'
rg -n -C 8 \
'cluster-logging|ClusterLogSubscription|stable-6\.6|startingCSV|installPlanApproval|catalogSource|redhat-operators-disconnected' \
telco-core hack \
-g '*.yaml' -g '*.yml' -g '*.json' -g '*.md'
printf '%s\n' '--- Subscription source files ---'
for f in $(git ls-files | rg '(^|/)(ClusterLogSubscription\.yaml|.*catalog.*|.*Catalog.*)$'); do
printf '\n### %s\n' "$f"
cat -n "$f"
doneRepository: openshift-kni/telco-reference Length of output: 50385 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
python3 - <<'PY'
from pathlib import Path
import re
policy = Path("telco-core/configuration/core-baseline.yaml").read_text()
subscription = Path(
"telco-core/configuration/reference-crs/optional/logging/ClusterLogSubscription.yaml"
).read_text()
policy_csv = re.search(r"(?m)^\s+name:\s+(cluster-logging\.v[^\s]+)\s*$", policy)
channel = re.search(r'(?m)^\s+channel:\s*["\']?([^"\'\s]+)', subscription)
starting_csv = re.search(r"(?m)^\s+startingCSV:\s*(\S+)", subscription)
approval = re.search(r"(?m)^\s+installPlanApproval:\s*(\S+)", subscription)
print(f"policy_csv={policy_csv.group(1) if policy_csv else None}")
print(f"subscription_channel={channel.group(1) if channel else None}")
print(f"subscription_startingCSV={starting_csv.group(1) if starting_csv else None}")
print(f"subscription_installPlanApproval={approval.group(1) if approval else None}")
assert policy_csv and policy_csv.group(1) == "cluster-logging.v6.6.1"
assert channel and channel.group(1) == "stable-6.6"
assert approval and approval.group(1) == "Manual"
assert starting_csv is None or starting_csv.group(1) == policy_csv.group(1)
print("result=startingCSV is not pinned to the policy CSV")
PYRepository: openshift-kni/telco-reference Length of output: 354 🌐 Web query:
💡 Result: In Red Hat OpenShift, using a Subscription with a specified startingCSV and manual approval is a standard pattern for pinning an Operator to a specific version [1][2][3]. When you configure a Subscription with installPlanApproval: Manual and a defined startingCSV, the semantics and behavior are as follows: 1. Pinning Version: The startingCSV field explicitly tells the Operator Lifecycle Manager (OLM) which version (ClusterServiceVersion) of the Operator you intend to install from the selected channel [1][4][5]. 2. Manual Approval Required: Setting installPlanApproval to Manual ensures that OLM does not automatically perform upgrades [2][6][7]. Even if a later version of the Operator exists in the catalog within your selected channel, OLM will pause the process after creating an InstallPlan [1][8]. 3. Preventing Auto-Upgrade: By combining Manual approval with a specific startingCSV, you prevent OLM from automatically upgrading the Operator beyond the version you have declared [1][2][3]. If you did not set this to Manual, OLM would typically attempt to upgrade to the latest version available in the channel [1][5]. 4. Workflow: - Once the Subscription is created, OLM generates an InstallPlan object [4][5]. - The InstallPlan will remain in a pending state, and the Subscription status will reflect that it is waiting for approval [2][6]. - A cluster administrator or user with appropriate permissions must manually patch the InstallPlan object (setting spec.approved to true) to initiate the installation of the specific CSV [6][9]. - If a newer version is released in the channel later, OLM will generate a new InstallPlan, which will also require manual approval, thereby maintaining your control over version upgrades [2][8][6]. This combination is recommended when you need to control the lifecycle of an Operator precisely, ensure compatibility, or verify changes before an upgrade is applied [3]. Note that OLM v1.0 (currently in Tech Preview in some environments) introduces new mechanisms that replace these subscription-based manual strategies with more declarative version ranges [9]. Citations:
Pin the Cluster Logging CSV explicitly The Subscription uses 🤖 Prompt for AI Agents |
||
| conditions: | ||
| - type: Succeeded | ||
| status: "True" | ||
|
|
@@ -64,7 +64,7 @@ policies: | |
| patches: | ||
| - spec: | ||
| installPlanApproval: Manual | ||
| channel: stable-4.21 | ||
| channel: stable-5.0 | ||
| - path: reference-crs/required/networking/metallb/metallbNS.yaml | ||
| - path: reference-crs/required/networking/metallb/metallbOperGroup.yaml | ||
| - path: reference-crs/required/networking/metallb/metallbSubscription.yaml | ||
|
|
@@ -85,7 +85,7 @@ policies: | |
| installPlanApproval: Manual | ||
|
|
||
| # Operator configuration | ||
| - name: core-operator-config-4.22 | ||
| - name: core-operator-config-5-0 | ||
| policyAnnotations: | ||
| ran.openshift.io/ztp-deploy-wave: "6" | ||
| manifests: | ||
|
|
@@ -110,4 +110,4 @@ policies: | |
| - path: reference-crs/required/scheduling/sched.yaml | ||
| patches: | ||
| - spec: | ||
| imageSpec: registry.example.com/openshift4/noderesourcetopology-scheduler-rhel9:v4.22.0 | ||
| imageSpec: registry.example.com/openshift4/noderesourcetopology-scheduler-rhel9:v5.0.0 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,18 +2,18 @@ | |
| apiVersion: policy.open-cluster-management.io/v1 | ||
| kind: PolicyGenerator | ||
| metadata: | ||
| name: telco-core-upgrade-22 | ||
| name: telco-core-upgrade-5-0 | ||
| policyDefaults: | ||
| namespace: ztp-core-policies | ||
| policySets: [] | ||
| placement: | ||
| labelSelector: | ||
| matchLabels: | ||
| common: "core" | ||
| upgrade-version-4-22: "" | ||
| upgrade-version-5-0: "" | ||
|
Comment on lines
9
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
rg -n \
'upgrade-version(-4-22|-5-0)?|upgrade-version' \
telco-core telco-hub telco-ran \
--glob '*.yaml' \
--glob '*.yml'Repository: openshift-kni/telco-reference Length of output: 245 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- all repository references ---'
rg -n -i \
'upgrade-version|core-upgrade|labelSelector|matchLabels' \
. \
--glob '!vendor/**' \
--glob '!node_modules/**' \
--glob '!dist/**' \
--glob '!build/**' \
| head -n 300
printf '%s\n' '--- target configuration ---'
cat -n telco-core/configuration/core-upgrade.yaml
printf '%s\n' '--- candidate cluster and automation files ---'
git ls-files | rg -i 'cluster|upgrade|automation|hub|ran|core' | head -n 300Repository: openshift-kni/telco-reference Length of output: 41259 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- cluster example labels ---'
rg -n -C 5 \
'metadata:|labels:|common:|upgrade-version|ClusterInstance' \
telco-core/install/example-standard-clusterinstance.yaml \
telco-core/configuration/README.md \
telco-core/install/README.md
printf '%s\n' '--- related upgrade selectors ---'
cat -n telco-core/configuration/core-upgrade-precache.yaml
cat -n telco-core/configuration/core-upgrade-finish.yaml
cat -n telco-core/configuration/core-baseline.yaml
cat -n telco-core/configuration/core-overlay.yaml | sed -n '1,35p'
printf '%s\n' '--- exact label references, including hidden files ---'
grep -RInE \
--exclude-dir=.git \
--exclude-dir=node_modules \
--exclude-dir=dist \
--exclude-dir=build \
'upgrade-version(-4-22|-5-0)?' \
. || trueRepository: openshift-kni/telco-reference Length of output: 19325 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- documented upgrade flow ---'
sed -n '70,120p' telco-core/configuration/README.md
sed -n '150,225p' telco-core/configuration/README.md
sed -n '225,285p' telco-core/configuration/README.md
printf '%s\n' '--- ClusterInstance label documentation ---'
rg -n -C 8 \
'extraLabels|ManagedCluster|upgrade label|upgrade-version|label' \
telco-core/install/README.md \
telco-core/install/example-standard-clusterinstance.yaml \
telco-core/configuration/README.mdRepository: openshift-kni/telco-reference Length of output: 23273 Add 🤖 Prompt for AI Agents |
||
| remediationAction: "inform" | ||
| policies: | ||
| - name: core-upgrade-prep-22 | ||
| - name: core-upgrade-prep-5-0 | ||
| policyAnnotations: | ||
| # Updates to the catalogsource take a few seconds to propagate | ||
| # to the status. The soak seconds gives time for that | ||
|
|
@@ -24,7 +24,7 @@ policies: | |
| - path: reference-crs/required/other/catalog-source.yaml | ||
| patches: | ||
| - spec: | ||
| image: registry.redhat.io/redhat/redhat-operator-index:v4.22 | ||
| image: registry.redhat.io/redhat/redhat-operator-index:v5.0 | ||
| - status: | ||
| connectionState: | ||
| lastObservedState: READY | ||
|
|
@@ -53,22 +53,22 @@ policies: | |
| # Adjust as needed based on spare capacity, cluster design, and application requirements | ||
| maxUnavailable: 100% | ||
| paused: true | ||
| - name: core-upgrade-ocp-22 | ||
| - name: core-upgrade-ocp-5-0 | ||
| manifests: | ||
| - path: reference-crs/optional/other/ClusterVersion.yaml | ||
| patches: | ||
| - spec: | ||
| channel: stable-4.22 | ||
| channel: stable-5.0 | ||
| desiredUpdate: | ||
| # Replace version, image and status below with desired version | ||
| version: 4.22.0 | ||
| version: 5.0.0 | ||
| image: quay.io/openshift-release-dev/ocp-release@sha256:<TBD> | ||
| force: true | ||
| - status: | ||
| history: | ||
| - version: 4.22.0 | ||
| - version: 5.0.0 | ||
| state: "Completed" | ||
| - name: core-upgrade-olm-22 | ||
| - name: core-upgrade-olm-5-0 | ||
|
Comment on lines
+56
to
+71
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
if rg -n '<TBD>' telco-core/configuration/core-upgrade.yaml; then
echo "Unresolved release image placeholder found"
exit 1
fiRepository: openshift-kni/telco-reference Length of output: 289 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- candidate files ---'
git ls-files | rg '(^|/)(\.github/workflows|scripts|hack|Makefile|telco-core|README|docs|.*ya?ml$)' | head -300
printf '%s\n' '--- references to the policy and placeholder ---'
rg -n -C 3 --hidden -g '!.git' \
'core-upgrade\.yaml|<TBD>|desiredUpdate:|ocp-release@sha256|PolicyGenerator|policy.*apply|apply.*policy' .Repository: openshift-kni/telco-reference Length of output: 24203 🏁 Script executed: #!/usr/bin/env bash
set -u
printf '%s\n' '--- configuration Makefile ---'
cat -n telco-core/configuration/Makefile
printf '%s\n' '--- configuration README references ---'
rg -n -C 5 '<TBD>|core-upgrade|PolicyGenerator|generate|apply|upgrade|image' \
telco-core/configuration/README.md telco-core/README.md || true
printf '%s\n' '--- pipeline references ---'
rg -n -C 8 'core-upgrade|PolicyGenerator|generate|apply|kustomize|configuration|manifest|image|TBD' \
.tekton .github Makefile telco-core/install telco-core/configuration --glob '*.yaml' --glob '*.yml' --glob 'Makefile' --glob '*.sh' || trueRepository: openshift-kni/telco-reference Length of output: 50386 🏁 Script executed: #!/usr/bin/env bash
set -u
printf '%s\n' '--- configuration Makefile ---'
sed -n '1,240p' telco-core/configuration/Makefile
printf '%s\n' '--- configuration README ---'
sed -n '1,260p' telco-core/configuration/README.md
printf '%s\n' '--- exact placeholder occurrences ---'
rg -n -F '<TBD>' --hidden -g '!.git' . || true
printf '%s\n' '--- exact policy references ---'
rg -n -F 'core-upgrade.yaml' --hidden -g '!.git' . || true
rg -n -F 'ocp-release@sha256' --hidden -g '!.git' . || trueRepository: openshift-kni/telco-reference Length of output: 13371 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- version update guide ---'
sed -n '150,215p' VERSION_UPDATE_GUIDE.md
printf '%s\n' '--- core upgrade context ---'
sed -n '48,75p' telco-core/configuration/core-upgrade.yaml
printf '%s\n' '--- focused placeholder/documentation check ---'
python3 - <<'PY'
from pathlib import Path
policy = Path("telco-core/configuration/core-upgrade.yaml").read_text()
guide = Path("VERSION_UPDATE_GUIDE.md").read_text()
readme = Path("telco-core/configuration/README.md").read_text()
print("core-upgrade contains <TBD>:", "<TBD>" in policy)
print("guide mentions core-upgrade:", "core-upgrade.yaml" in guide)
for token in ("<TBD>", "digest", "sha256", "replace", "actual"):
print(f"guide mentions {token!r}:", token.lower() in guide.lower())
print("README documents substitution:", any(
word in readme.lower() for word in ("substitut", "replace", "patch")
))
PYRepository: openshift-kni/telco-reference Length of output: 4772 Replace the OCP release image digest before applying the policy.
🤖 Prompt for AI Agents |
||
| policyAnnotations: | ||
| # Ensure that status for OLM created operators has time to propagate | ||
| ran.openshift.io/soak-seconds: "60" | ||
|
|
@@ -77,7 +77,7 @@ policies: | |
| patches: | ||
| - metadata: | ||
| annotations: | ||
| noop-for-triggering-noncompliance: "22" | ||
| noop-for-triggering-noncompliance: "5-0" | ||
| - status: | ||
| state: AtLatestKnown | ||
| - path: reference-crs/required/networking/sriov/SriovSubscription.yaml | ||
|
|
@@ -87,7 +87,7 @@ policies: | |
| - path: reference-crs/required/storage/odf-external/odfSubscription.yaml | ||
| patches: | ||
| - spec: | ||
| channel: stable-4.21 | ||
| channel: stable-5.0 | ||
| - status: | ||
| state: AtLatestKnown | ||
| - path: reference-crs/required/networking/NMStateSubscription.yaml | ||
|
|
@@ -106,7 +106,7 @@ policies: | |
| # Ensure that all subscriptions are at the latest known, including | ||
| # subscriptions automatically created by OLM on behalf of higher | ||
| # level operators. | ||
| - name: core-upgrade-validate-22 | ||
| - name: core-upgrade-validate-5-0 | ||
| policyAnnotations: | ||
| # Ensure that propagation to OLM created operators has time to propagate | ||
| ran.openshift.io/soak-seconds: "30" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: openshift-kni/telco-reference
Length of output: 241
🏁 Script executed:
Repository: openshift-kni/telco-reference
Length of output: 26059
🏁 Script executed:
Repository: openshift-kni/telco-reference
Length of output: 21862
🏁 Script executed:
Repository: openshift-kni/telco-reference
Length of output: 5815
🏁 Script executed:
Repository: openshift-kni/telco-reference
Length of output: 292
Pin the NROP schema source to a validated commit.
mainis mutable, and the generator replaces it with nonexistentrelease-5.0. Pin the source tod7c439060293ae897642854b418d3c651c041f6eor another commit validated against the 5.0 payload, and update the generator to preserve the pin.🤖 Prompt for AI Agents