Repository navigation
[Backport release-1.6] fix(tenant): skip Cilium policies on isp-hosted without Cilium - #5080
Merged
Merged
Conversation
The isp-hosted variants install no CNI of their own, so on a host without Cilium the cilium.io/v2 kinds do not exist and the tenant install fails, taking the root tenant and everything that depends on cozystack-basics down with it. The policies now render on isp-hosted only when the host serves both Cilium policy kinds. On every other variant Cozystack installs Cilium itself, so they keep rendering unconditionally: a CRD that is missing at render time there fails the install loudly instead of leaving the tenant without network isolation, because helm-controller does not re-render a release when only API discovery changes. On isp-hosted without Cilium the tenant gets no network isolation from Cozystack; isolating tenants is then up to the host's CNI. release-1.6 has no shared-central tracing templates, so their hunks, the tenant.tracingCentralEgress helper beside the new one and the tracing cases of the test suite are left out. cozy-lib on this branch fails on an absent _cluster, as the rest of the chart already does, so the no-_cluster case runs with an empty _cluster instead. Assisted-by: LLM Signed-off-by: Aleksei Sviridkin <[email protected]> (cherry picked from commit 3b5af9d) Signed-off-by: Myasnikov Daniil <[email protected]>
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
myasnikovdaniil
marked this pull request as ready for review
October 23, 2026 15:00
Merged
1 of 11 tasks
myasnikovdaniil
added a commit
that referenced
this pull request
Oct 30, 2026
…vive uninjected values (#5141) ## What this PR does Backport of #3647 to release-1.6. Since #5080 (backport of #4710) `tenant.ciliumPolicies` calls `cozy-lib.bundle-name`, and on release-1.6 that helper still does `index .Values._cluster "bundle-name"`, which fails with `index of untyped nil` when `_cluster` is not set. Tenant export-proxy suite (`tests/networkpolicy_vm_exportproxy_test.yaml`) sets no `_cluster`, so all four cases fail and unit tests are red on every PR against release-1.6, including batch #5089. #5080 set `_cluster: {}` only in its own suite, that's why it passed there. #3647 guards the map in every cozyconfig helper and adds cozy-lib-tests suite for injected and uninjected state. It applies cleanly, diff is identical to main. Checked locally (helm-unittest is not installed here, CI runs it): - export-proxy suite renders fail on current branch and pass with this change; - new cozyconfig suite passes, its uninjected case fails against old helpers; - all 34 charts using cozy-lib render the same before and after with realistic `_cluster` / `_namespace` (apart from generated passwords), only tenant chart with nothing injected changes, it doesn't fail in `networkpolicy.yaml` anymore. Plain `helm template` of tenant chart without `_cluster` still fails in `keycloakgroups.yaml`, main fixed it separately in #3636. Unit tests are not affected, suite renders only templates it names. ### Screenshots Not a UI change. ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: ### Release note ```release-note fix(cozy-lib): the cozyconfig helpers now return their documented empty defaults when the platform has not injected `_cluster` / `_namespace`, instead of aborting the render, so a chart using them can be rendered and unit-tested on its own ```
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.
What this PR does
Backport of #4710 to release-1.6.
_cluster: {}instead.Screenshots
Not a UI change.
Downstream repositories
Release note