docs: add OS_CLUSTER_VERSION to env.example and align dev docs#4670
docs: add OS_CLUSTER_VERSION to env.example and align dev docs#4670tuxerrante wants to merge 4 commits intomasterfrom
Conversation
Add OS_CLUSTER_VERSION=4.19.15 as default in env.example. Rename OCP_VERSION to OS_CLUSTER_VERSION in the admin/versions curl examples to match the env var used by hack/cluster tooling. Add "default": true to the version registration payloads.
|
@tuxerrante I've opened a new pull request, #4674, to work on those changes. Once the pull request is ready, I'll request review from you. |
The ensureDefaultVersionInCosmosdb function was missing Default: true when putting the default install stream version, causing it to not be recognized as the default version in local development mode. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Updates local development defaults and documentation so OpenShift version registration and cluster creation use a consistent environment variable (OS_CLUSTER_VERSION), and ensures newly registered versions can be marked as the default.
Changes:
- Add
OS_CLUSTER_VERSIONdefault example toenv.example. - Update dev-doc curl examples to use
OS_CLUSTER_VERSIONand include"default": truein version payloads. - Mark the locally seeded CosmosDB OpenShiftVersion as
Default: truewhen created by local-dev tooling.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pkg/util/version/const.go | Rewords the comment describing DefaultInstallStream as a local-dev fallback. |
| pkg/util/cluster/cluster.go | Seeds a default OpenShiftVersion document with Default: true in local dev mode. |
| env.example | Adds an example/default for OS_CLUSTER_VERSION. |
| docs/deploy-development-rp.md | Aligns version registration examples with OS_CLUSTER_VERSION and sets registered versions as default. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // DefaultInstallStream does not wrap data for production and INT which has moved to RP-Config. | ||
| // This default is left here ONLY for use by local development mode, | ||
| // until we can come up with a better solution. |
There was a problem hiding this comment.
The updated comment reads awkwardly and seems to invert the intended meaning ("does not wrap data"). This looks like it should explain that production/INT install stream data moved to RP-Config and this constant is only a local-dev fallback; please reword for clarity to avoid misleading future readers.
| // DefaultInstallStream does not wrap data for production and INT which has moved to RP-Config. | |
| // This default is left here ONLY for use by local development mode, | |
| // until we can come up with a better solution. | |
| // DefaultInstallStream is NOT used for production or INT; install stream data for those | |
| // environments is configured via RP-Config. This constant is kept only as a fallback for | |
| // local development mode until we can come up with a better solution. |
| export ARO_IMAGE=arointsvc.azurecr.io/aro:latest | ||
| export ARO_IMAGE=arointsvc.azurecr.io/aro:latest | ||
| export ARO_ENABLE_OUTBOUND_HTTP_LOGGING=false | ||
| # export OS_CLUSTER_VERSION="${OS_CLUSTER_VERSION:-4.19.15}" |
There was a problem hiding this comment.
OS_CLUSTER_VERSION is commented out, so sourcing env.example will not actually set a default cluster version. If the goal is for local dev tooling to pick up OS_CLUSTER_VERSION automatically, this should be an active export OS_CLUSTER_VERSION="${OS_CLUSTER_VERSION:-4.19.15}" (or otherwise document that users must uncomment it).
| InstallerPullspec: fmt.Sprintf("arointsvc.azurecr.io/aro-installer:release-%s", version.DefaultInstallStream.Version.MinorVersion()), | ||
| Enabled: true, | ||
| Default: true, | ||
| }, |
There was a problem hiding this comment.
Setting Default: true unconditionally can create multiple "default" OpenShift versions in CosmosDB if one already exists. The frontend cache logic treats this as a warning and will effectively pick whichever default is seen last, which can make "default version" selection non-deterministic. Consider checking whether any existing version is already marked default and only setting Default: true when no default exists (or explicitly clearing the previous default before creating a new one).
Summary
OS_CLUSTER_VERSION=4.19.15as a default inenv.example, so it's available for both cluster creation (hack/cluster) and version registration in CosmosDBOCP_VERSION→OS_CLUSTER_VERSIONin theadmin/versionscurl examples indocs/deploy-development-rp.mdto match the env var used by the Go tooling (pkg/util/cluster)"default": trueto the version registration curl payloads so the registered version is set as the default installable versionNotes
OCP_VERSIONin Makefile/CI (validate-roledef) is not renamed — it serves a different purpose (role definition validation, not cluster creation)Test plan
env.examplesources correctly andOS_CLUSTER_VERSIONis set