Only apply os/arch restriction to rancher repos#17352
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates OS compatibility handling so the default linux restriction is only applied to charts coming from official Rancher repos, preventing third-party charts without catalog.cattle.io/permits-os from being blocked on Windows clusters.
Changes:
- Adjusts
compatibleVersionsForto avoid defaulting tolinuxfor non-Rancher charts whenpermits-osis missing. - Introduces a shared
isRancherRepo(repo, chart)helper and applies it in chart install UX and version selection logic. - Adds unit tests for
isRancherRepoand the updatedcompatibleVersionsForbehavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
shell/store/catalog.js |
Updates OS filtering logic and adds isRancherRepo helper. |
shell/store/__tests__/catalog.test.ts |
Adds unit tests for repo detection and OS compatibility filtering. |
shell/pages/c/_cluster/apps/charts/install.vue |
Updates Windows-incompatible warning logic to use isRancherRepo. |
shell/mixins/chart.js |
Updates version disabling/labeling logic to only apply the Linux fallback for Rancher repos. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ts-os-restriction
momesgin
commented
Apr 23, 2026
momesgin
commented
Apr 23, 2026
richard-cox
reviewed
Apr 30, 2026
Member
richard-cox
left a comment
There was a problem hiding this comment.
The same process is happening in four places, can the logic be extracted to somewhere common?
added 2 commits
April 30, 2026 11:07
richard-cox
reviewed
May 18, 2026
Member
richard-cox
left a comment
There was a problem hiding this comment.
In terms of the last review comment
added 2 commits
May 19, 2026 20:36
richard-cox
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #11670
This PR updates the chart installation logic to only apply the default
linuxOS restriction if the chart originates from an official Rancher repository. This prevents external charts withoutcatalog.cattle.io/permits-osannotations from being incorrectly blocked from installation on Windows nodes.Occurred changes and/or fixed issues
.rancher.io.compatibleVersionsForto only fall back tolinuxwhen evaluating permitted OS if the chart is from an official Rancher repository.windowsIncompatiblelogic in the chart install page and chart mixin to use the new sharedisRancherRepohelper and only apply the fallback to official Rancher repositories.Technical notes summary
isRancherRepo(repo, chart)helper function inshell/store/catalog.jsto centralize the logic for detecting official Rancher repositories.isRancherRepohelper checks if the repository is natively identified as a Rancher source or if it's an airgapped repository (specifically, aClusterReponamedrancher-chartsorrancher-partner-charts). By verifyingCATALOG.CLUSTER_REPO, we ensure standard users cannot spoof official repositories within namespace-scoped repos.isRancherRepoandcompatibleVersionsForto ensure correct behavior across different repository types and OS constraints.Areas or cases that should be tested
catalog.cattle.io/permits-osannotation is permitted on clusters with Windows nodes and does not show the "Windows Incompatible" warning.rancher-chartsrepository URL is modified to an internal registry, Rancher charts are still correctly identified as official and default to Linux if no OS annotation is present.Areas which could experience regressions
Screenshot/Video
I've mocked the workerOs getter in order to test this:
shell/models/management.cattle.io.cluster.js:then I've added the permit os annotation
catalog.cattle.io/permits-osto my dummy chart's different versions to test different cases:version 0.1.0 > no annotation
version 0.2.0 >
catalog.cattle.io/permits-os: "linux"version 0.3.0 >
catalog.cattle.io/permits-os: "linux,windows"here's my repo's URL
https://momesgin.github.io/mo-charts/in case you need to use it.now let's compare before an after based on these mocked data,

BEFORE:
version 0.1.0
version 0.2.0:

version 0.3.0:

chart install/edit page after installation:

AFTER:

version 0.1.0
version 0.2.0:

version 0.3.0:

chart install/edit page after installation:

Note: For the linux only charts from Rancher repos we keep the behaviour as before.
Checklist
Admin,Standard UserandUser Base