Commit Graph
659 Commits
Author SHA1 Message Date
Aleksei Sviridkin 9314becb72 fix(ci): push the stable chart once, so a re-run keeps cozy-installer:X.Y.Z (#5486)
## What this PR does

Since #5169 finalize publishes the release page last, so a run that
fails in `Publish draft release` gets re-run after the chart is already
pushed. The re-run packaged and pushed the chart again, and `helm
package` doesn't give the same bytes twice (I packaged the same tree
twice with different file times and got two digests), so
`cozy-installer:X.Y.Z` moved to another digest.

Now the chart step pushes only when `cozy-installer:X.Y.Z` is not in the
registry yet. `cozy-installer:latest` still follows the latest decision
on every run.

The test runs the step against stub skopeo, helm and yq: first run
pushes once, re-run pushes nothing, older patch leaves latest alone,
failed push fails the step.

Lines get this in own PRs: #5487 (release-1.7) and #5488 (release-1.6).

### 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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
fix(ci): a re-run of finalize no longer pushes the stable cozy-installer chart again, so cozy-installer:X.Y.Z keeps the digest of its first push
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Chores**
* Stable installer chart versions are preserved once published.
Re-running a release will not replace an existing version; correcting a
published chart requires removing it from the registry before rerunning.
* If a version is missing, the release can publish it. Registry lookup
or publishing errors stop the release. When configured, the `latest` tag
is updated even if the versioned chart already exists.
* **Documentation**
* Clarified the policy for publishing stable chart versions and handling
existing charts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-27 17:56:34 +03:00
Myasnikov Daniil e99a15dbee fix(ci): push the stable chart once, so a re-run keeps cozy-installer:X.Y.Z
Since finalize publishes the release page last, a run that fails in
Publish draft release is re-run after the chart is already pushed. The
re-run packaged and pushed the chart again, and helm package does not
give the same bytes twice (two packagings of the same tree with
different file times give two digests), so cozy-installer:X.Y.Z moved
to another digest.

The chart step now pushes only when the registry answers that cozy-
installer:X.Y.Z is missing, read as manifest_digest in hack/promote-
retag.sh reads it; any other lookup error fails the step instead of
being taken for a missing tag. cozy-installer:latest still follows the
latest decision on every run.

A bats test runs the step against stub skopeo, helm and yq: the first
run pushes once, a re-run pushes nothing, an older patch leaves latest
alone, a failed push fails the step, and a failed lookup fails it
without packaging or pushing.

Fixes: e1472e58de ("fix(ci): publish the release only after the stable images and chart exist")
Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-27 13:51:28 +00:00
Aleksei Sviridkin ed22d251c8 feat(api): add EndpointAttachment to attach addresses to app endpoints (#4324)
## What this PR does

Implements `EndpointAttachment` (`local.sdn.cozystack.io/v1alpha1`,
namespaced) from the design proposal in
[cozystack/community#45](https://github.com/cozystack/community/pull/45):
a tenant-created resource that attaches one external address to one
tenant-facing Service of one managed application. It is the Network
load-balancing path (a dedicated address per attachment), complementary
to SNI exposure through the tenant Gateway, and it implements the
`loadBalancer` union member only. Nothing in it routes by hostname,
touches TLS, or reads chart values.

Two commits. The first updates address-controller and metallb-iad to
v0.3.0: the class's provisioner now reports, in
`IPAddressClass.status.loadBalancerClass` with an `Accepted` condition
for the class's generation, the `loadBalancerClass` a Service consuming
its claims must carry, and the MetalLB driver writes that status. The
second adds `EndpointAttachment`, which sets that class on every Service
and FloatingIP it renders and renders nothing new until the class is
accepted (`ClassNotAccepted`); a Service or FloatingIP already published
is kept if the class later loses acceptance. The FloatingIP retarget
check needs cozyplane v0.1.5 or later, which stamps
`metadata.generation` and `status.observedGeneration`.
[#5389](https://github.com/cozystack/cozystack/pull/5389) moves the
cozyplane pin to v0.1.5, and this PR merges after it; on an older
cozyplane both fields read 0 and the check passes as before.

**API** (`api/localsdn/v1alpha1/endpointattachment_types.go`, CRD
generated into the cozystack-controller chart). The kind lives in
`local.sdn.cozystack.io`, the CRD-served half of the sdn family the
address substrate and cozyplane already share, so stock `ResourceQuota`
counts still work. `spec` is required at the resource root, since
removing it would otherwise skip every rule nested inside it.
`spec.applicationRef` (group/kind/name, group defaulting to
`apps.cozystack.io`), `spec.endpoint.serviceName`, and
`spec.loadBalancer` with `className` | `claimName` (exclusive),
`family`, `ports`, `method` (`WholeIP` | `PortList`), `allowICMP`. CEL
freezes the address-identity fields (`applicationRef`, `className`,
`claimName`, `family`) and the member selection, requires exactly one
union member (written as a list so a `gateway` member can be added
without restructuring), and holds the static shape rules (`PortList`
needs `ports`, `allowICMP` is `PortList`-only). Everything cross-object
or dynamic is a condition. `status.phase` is a projection of the
`Resolved` and `Provisioned` conditions.

**Controller** (`internal/controller/endpointattachment`), one reconcile
in four steps:

1. Resolve. The application's HelmRelease is found by the three lineage
labels; the attachment gets a non-controller owner reference to it by
UID and the lineage labels stamped on itself. The endpoint Service must
carry the lineage triple matching `applicationRef` and
`internal.cozystack.io/tenantresource: "true"`; lineage alone is refused
(`EndpointLineageMismatch` / `EndpointNotTenantFacing`), as is a Service
rendered by another attachment, and a LoadBalancer Service a tenant
Kubernetes cluster's cloud-controller-manager creates for a Service
inside that cluster: it carries the cluster's lineage and the marker,
and is told apart by the `cluster.x-k8s.io/tenant-service-name` label
that controller writes. A same-name recreated application (different
HelmRelease UID) is reported as `ApplicationIncarnationChanged`, the
Service is withdrawn, and the owner reference is never rewritten.
2. Claim. `claimName` references an existing `IPAddressClaim` and writes
nothing to it; otherwise a claim is minted with `generateName` under the
attachment's controller reference. The substrate kinds are read as
unstructured, so the controller carries no module or CRD dependency on
it and reports `ClaimPending` where it is not installed.
`loadBalancerClass` is read from the claim's resolved `IPAddressClass`
status before the Service is created, only once the class's `Accepted`
condition is True for its current generation, and left empty when the
class reports the cluster default. The Service's `ipFamilyPolicy` and
`ipFamilies` follow the claim's family (`SingleStack` for IPv4 or IPv6,
`RequireDualStack` for Dual) and are reconciled on existing Services; a
primary family that differs, which the apiserver never changes, and a
create the cluster refuses are both reported as `RenderFailed`. An
address whose `IPAddress.status.associatedTo` names another live Service
gives `ClaimInUse` and withdraws this attachment's own Service, so two
attachments that both rendered before either association was recorded
leave one Service asking for the claim. A `family` conflicting with a
referenced claim gives `FamilyConflict`.
3. Render. One `type: LoadBalancer` Service via `generateName` (a prefix
derived from the attachment name and bounded to what the apiserver
accepts for a Service, which also bounds the minted claim's), identified
by controller owner reference only (a Service with the ownership label
and no reference is ignored, never adopted). It mirrors the endpoint's
selector and ports (or the `ports` subset; synthesized ports when the
endpoint has only the sentinel port), carries the
`local.sdn.cozystack.io/ip-address-claim` annotation,
`externalTrafficPolicy: Local`, and `allocateLoadBalancerNodePorts:
false` unless the platform says otherwise. It copies no labels or
annotations from the endpoint. An endpoint with no selector
(hand-managed endpoints) is refused with `NothingToPublish`, and the VM
placeholder is recognised by its shape (headless, only port 65535)
rather than by the port alone. When the cache shows no owned Service,
the controller rechecks through the API reader before creating one, and
collapses duplicates to the oldest. Re-mirroring is event-driven through
watches on Services, EndpointSlices, HelmReleases and, where served at
startup, the claim kind.
4. Report. `status.addresses` mirrors the claim's bound addresses (a
list), `status.serviceName` and `status.claimName` name the objects, and
`Provisioned=True` asserts address and Service wiring only; its message
says so, since reachability additionally depends on the CNI's policy
objects.

**VM datapath modes.** `method` renders the cozy-proxy Service contract
exactly (the `service.kubernetes.io/service-proxy-name: cozy-proxy`
label, `networking.cozystack.io/wholeIP`,
`networking.cozystack.io/allowICMP`, the sentinel port for whole-IP
without ports) and adds nothing beside it. Rendering is gated on a
platform declaration, not CNI detection: the controller flag
`--cozy-proxy-contract-implemented` is threaded from the system bundle,
which sets it exactly when it emits the cozy-proxy Package; without it a
method-bearing attachment renders no Service and reports
`DatapathContractUnavailable`, because a load balancer would still
attract the address while every proxy skipped the Service. Exclusivity
is keyed on the backend pod and counts every delegated Service in either
mode (attachments, chart Services rendered with `external: true`,
hand-made ones): a delegation no attachment renders (a chart Service
with `external: true`, or a hand-made one) always wins, since nothing
would ever withdraw it; between attachments the oldest wins, ties by
name. The loser reports `BackendAlreadyDelegated` and renders nothing
rather than fighting for the slot. cozy-proxy v0.4.0 programs IPv4 only
(one IPv4 nftables table, every address through `To4()`), so a method
attachment off a VPC with an `IPv6` or `Dual` claim renders no Service
and reports `FamilyUnsupportedByDatapath`; the cozyplane path still
serves IPv6 through the FloatingIP. `WholeIP` on an endpoint with more
than one ready backend keeps its Service and claim but selects nothing
(`MultipleBackends`), so a rolling update or live migration passes
through held-but-dark and recovers without churning the address.

**VMs in a VPC.** On a cozyplane VPC the VM's only interface is in the
VPC, so the launcher pod address a cozy-proxy Service maps to never
reaches it. When a backend pod carries the VM chart's
`sdn.cozystack.io/vpc` annotation and the cluster serves cozyplane's
`FloatingIP`, a `WholeIP` attachment owns a FloatingIP in its namespace
(`vpcRef` from the annotation, `target` from the
`sdn.cozystack.io/vpc-ip` address cozyplane's CNI stamps,
`addressClaimName` the attachment's claim) instead of a Service, and
`Provisioned` mirrors the FloatingIP's readiness. FloatingIP is read as
unstructured and only where served, so there is no dependency on the
cozyplane PR. Refusals there: `PortList` (`MethodUnsupportedInVPC`), a
`Dual` claim, since a FloatingIP wears one address
(`DualStackUnsupportedInVPC`), a VPC in another namespace
(`VPCNotInNamespace`), several distinct VPC addresses or a mix of VPC
and non-VPC pods (`MultipleBackends`, claim held), no VPC address
stamped yet (`WaitingForVPCAddress`), and a VPC backend where FloatingIP
is not served (`DatapathContractUnavailable`, no Service). A live
migration's two launcher pods share the VPC address and stay one
binding; a stopped VM keeps its FloatingIP. Since only a backend pod
says whether a VM is in a VPC, a `method` attachment that has published
nothing yet waits for one (`WaitingForBackend`), so an attachment
created before its VM starts never pins the claim to a cozy-proxy
Service first. On the kube-ovn VPC the VM keeps its pod-network
interface and joins VPC subnets through extra interfaces, so the
cozy-proxy path is unchanged there.

**Detach semantics.** An endpoint Service that disappears withdraws the
rendered Service, keeps the claim (minted or referenced), and reports
`Detached`; the same claim is reused when the endpoint returns. Deleting
an attachment collects its Service and its minted claim; a referenced
claim is untouched.

**Wiring.** The controller is registered in `cmd/cozystack-controller`
behind two flags (`--cozy-proxy-contract-implemented`,
`--endpoint-attachment-allocate-node-ports`), the chart exposes them as
`cozystackController.endpointAttachments.*`, the platform system bundle
derives both (cozy-proxy emitted, Hetzner RobotLB enabled), the
controller ClusterRole gains Service writes, the `endpointattachments`
kind, `ipaddressclaims` create/delete and `sdn.cozystack.io`
`floatingips` writes, and the tenant ClusterRoles get
`endpointattachments` beside `securitygroups` (full in
`cozy:tenant:base`, read in `cozy:tenant:view:base`, write in
`cozy:tenant:admin:base`).

**Tests.** `crdcel_test.go` compiles the shipped CRD and pins the create
and update admission matrix. `reconciler_test.go` (fake client) covers
the resolve/deny matrix over both label families, mirroring and port
subsetting, the minted-claim path, the two proof sequences (a
labelled-but-unowned Service is ignored and a same-name recreated
application is not re-acquired; a reserved claim holds across detachment
and moves to a different application), detach/reattach, the
sentinel-port rule, the capability gate, both modes, held-but-dark on
multiple backends, pod-keyed exclusivity, the substrate-absent path and
the family conflict. Admission tests also validate from the resource
root (removing or restoring `spec`). The reconciler tests cover a Dual
claim that is provisioned only once the Service carries both addresses,
and attachment names up to 253 characters, with dots or a leading digit,
on both address-selection paths. `floatingip_test.go` covers the
cozyplane path: the FloatingIP's spec and readiness mirroring, the claim
worn by its own Service not counting as in use, switching from and back
to a cozy-proxy Service, a kube-ovn-shaped backend keeping the Service,
each refusal, live migration, a stopped VM, re-pointing in place, detach
and name bounds. Chart unit tests pin the platform declaration on every
bundle variant, slim opt-in included, and the FloatingIP RBAC rule.
`hack/e2e-chainsaw/endpointattachment` carries the postgres hold/move
sequence, GC, the lineage refusal of an attachment pointing at another
application's Service, and the VM mode Test (re-scoped to a single
delegated Service per VM, since current cozy-proxy's rule installer
keeps one 1:1 slot per pod). It is registered: `hack/select-install.sh`
maps it to `cozystack.address-controller` and `cozystack.metallb-iad`,
with Postgres, VMInstance, VMDisk and cozy-proxy as its runtime
requirements, and `hack/select-e2e.sh` maps both substrate packages back
to it, since no other suite installs them. The e2e install enables both
packages, and `hack/e2e-post-install-prep.sh` creates the default
`IPAddressClass` on a dedicated, non-auto-assigning MetalLB pool
whenever metallb-iad is installed.
`hack/e2e-chainsaw/endpointattachment-vpc` covers the cozyplane
FloatingIP path (whole-IP published through a FloatingIP, `PortList` and
`Dual` refused) and stays parked as `chainsaw-test.yaml.disabled`,
because no e2e lane installs the cozyplane networking variant.

**Upgrade.** Additive: a new CRD, a new reconciler, new RBAC rules, no
migration. The system bundle now always passes the cozystack-controller
component an `endpointAttachments` values block, so the first upgrade
rolls the controller once with the new flags; the flags change nothing
until `EndpointAttachment` objects exist, and no existing object is
modified.

**Docs.** The user guide is on the website, in
[cozystack/website#825](https://github.com/cozystack/website/pull/825):
the resource, which Services can be attached, the lifecycle, the
conditions' exact meaning, the VM modes and the cozyplane path, and the
TLS posture (attaching a database does not turn its TLS on). It is a
cross-package guide, so under the documentation placement rules it lives
there rather than in `docs/`.

**Not in this PR, deliberately.** The `gateway` union member (a reserved
name; the CRD ships without it and nothing references it). A certSAN
write-back for the managed Kubernetes API. Discovery-engine address
write-back. The address-preserving migration from `external: true`. An
authoritative exclusivity gate inside cozy-proxy (the attachment-side
refusal is advisory); that wants an issue in cozystack/cozy-proxy.

### Screenshots

Not a UI change.

### Downstream repositories

`ApplicationDefinition.spec.services` now also decides which Services
tenants can attach an address to, which the trigger map routes to the
website's ApplicationDefinition page:
[cozystack/website#825](https://github.com/cozystack/website/pull/825)
documents that, and carries the user guide. Nothing else matched: the
cozy-proxy runtime contract is consumed with the same three literal
strings and nothing is renamed; the new CRD travels as opaque JSON in
the terraform provider; no platform `values.yaml` key, variant, asset or
node prerequisite changed. An issue in cozy-proxy for an authoritative
one-delegation-per-pod gate is worth a human decision rather than a
speculative filing.

- [ ] No downstream repository is affected by this change
- [x] [cozystack/website](https://github.com/cozystack/website) -
follow-up: https://github.com/cozystack/website/pull/825
- [ ]
[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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
feat(api): add EndpointAttachment (local.sdn.cozystack.io/v1alpha1), a tenant resource that attaches an external address, minted from an IPAddressClass or bound from a reserved IPAddressClaim, to one tenant-facing Service of a managed application by rendering an additive LoadBalancer Service that mirrors it; VM whole-IP and port-list modes render the cozy-proxy contract where the platform deploys it.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Added endpoint attachments to publish eligible application and VM
endpoints through dedicated load balancer addresses, with whole-IP or
selected-port exposure and IPv4, IPv6, or dual-stack support.
* Attachments can use a reserved address or request one through a
configured address class. Status shows endpoint resolution,
provisioning, assigned addresses, and attachment state.
* Tenant access now includes managing and inspecting endpoint
attachments. Whole-IP VM exposure is limited to one delegated backend,
and VPC support depends on the available network datapath.

* **Documentation**
* Added guidance on eligible endpoints, address lifecycle, status, and
exposure considerations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-27 15:56:24 +03:00
Aleksei Sviridkin 8641ebbf63 fix(ci): publish the release only after the stable images and chart exist (#5169)
## What this PR does

Finalize undrafted the release before retagging the rc images and
pushing the cozy-installer chart, so release page announced version
whose images and chart still returned `manifest unknown` (7m47s on
v1.7.0:
https://github.com/cozystack/cozystack/actions/runs/40864518300). Failed
retag or chart push also left public release that re-run couldn't
repair, because re-run looks for draft and finds none.

Now draft lookup and `make_latest` decision are in own step `Resolve
draft release`, before any registry write. Retag, chart and `Publish
draft release` take the decision from its outputs, and publish goes
last. Missing draft fails before anything is pushed, failed retag or
chart leaves the draft for re-run. Body selection, orphaned draft
repair, `prerelease` and restoring `latest` after older patch are
unchanged.

Deciding `latest` before the retag opens a window of minutes where two
release PRs merged close together both decide they are newest, and the
older line ends up with `latest` on release page, image `:latest` and
`cozy-installer:latest`. So finalize runs one release at a time:
job-level concurrency group built from the job's own `if:` (other closed
PRs never join it), `cancel-in-progress: false` and `queue: max`, so
third merged release waits instead of cancelling the pending one.

Docs and comments in `tags.yaml` and `promote-rc.yaml` that said release
is already public when finalize pushes the stable tag now say when it is
published. Release checklist no longer says to undraft by hand when
draft lookup fails.

Closed-PR workflow runs from base branch, so supported lines get this in
own PRs: #5480 (release-1.7) and #5481 (release-1.6).

Tests: contract tests pin step order, that nothing publishes after
failed registry step (no `continue-on-error`, no `if:` on publish,
registry steps skip only for prerelease) and the concurrency group.
Behaviour tests run both github-script steps under node against stubbed
API (missing draft, orphaned draft, older patch after newer minor, all
shipped changelog tags). Every new test fails against the old workflow,
I also checked them against mutated copies of it.

### 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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
fix(ci): finalize publishes the release page last, after the stable image tags and the cozy-installer chart exist, and finalizes one release at a time, so a release is no longer public while its images return manifest unknown
```
2026-11-27 15:33:44 +03:00
Aleksei Sviridkin f342bd4765 feat(api): add installation defaults for new applications (#5107)
## What this PR does

This PR adds installation defaults for applications: administrator sets
`applicationDefaults` in the platform values, and every application
created after that starts from them. Design is in [the proposal in
cozystack/community](https://github.com/cozystack/community/pull/116),
related to [the worker defaults
issue](https://github.com/cozystack/cozystack/issues/3950).

The value is keyed by ApplicationDefinition plural (for example
`postgreses`) and the platform chart renders it into the
`cozystack-application-defaults` ConfigMap in `cozy-system`. The
aggregated API merges the entry for the kind under the submitted spec on
create, apply-create and dry-run create, and saves the result in
HelmRelease values. The order is user values, installation defaults,
then developer defaults from the chart schema. Update never applies
defaults, so changing the value leaves existing applications alone.

The merge goes into objects that declare `properties` and replaces
everything else whole: arrays, dictionaries with `additionalProperties`,
free-form objects, objects that also take arbitrary keys and objects
marked `x-kubernetes-map-type: atomic`. So a node pool that sets its own
`registryMirrors` gets no platform mirror entries. Explicit empty values
from the user (`{}`, `[]`, `false`, `0`, `""`) win over the installation
value.

An entry is checked against the application's OpenAPI schema before it
is merged. An object that the merge completes is checked as a partial
one, so `required` and `minProperties` are not enforced on it and its
`oneOf` is not evaluated (CEL rules are not evaluated at all). Whatever
is stored whole is checked whole: array rows, dictionary values,
free-form and atomic objects. Without that, an entry like a RabbitMQ
vhost without `roles` was accepted and stored, and the chart refused to
render it.

A missing ConfigMap means no defaults and gives no warning. An
unreadable ConfigMap, invalid JSON, a bad entry or an unreadable schema
does not block the create: defaults are skipped and the response carries
a Warning (dry-run too). The generic checks cover the whole map, so one
entry that is not an object, or a reserved top-level field in any entry,
turns defaults off for every application until it is fixed, while a bad
entry of one application only affects that application. The ConfigMap is
read through a cache limited to that one object, startup waits up to 30
s for it to sync and a create waits up to 5 s for the read, then both go
on without defaults.

Some objects take exactly one of their children and the chart refuses
two: the worker image of a node pool (`osImage.builtin` or
`osImage.factory`), a vm-disk `source`, the `oidc.customConfig` of a
kubernetes cluster and of a monitoring stack (`config` or `secretRef`).
A default for one child merged into an application that chose another
built that spec. These carry the atomic marker now, so the merge
replaces them whole, and `values.yaml` tells catalog authors to do the
same in their own schemas. The chart guide (`docs/agents/overview.md`)
says when the marker fits and when it does not. The `osImage` change is
the same hunk as in #5192.

The dashboard order page sends one dry-run create when it opens and
starts the form and YAML from the returned spec, so the browser reads no
ConfigMap and merges nothing. If the preview fails, or gets no answer in
8 s, the form opens with a notice and Retry, and Deploy still works.
After a failed preview a dropdown stays empty instead of selecting the
cluster default option, so the API applies the platform default to the
omitted field. A cleared text field leaves its key out, a dropdown None
and a sensitive field are written as `""`. While the server owns
defaults the form does not fill schema defaults on its own.

Not in this PR: defaults on update, re-rendering existing applications
when the value changes, defaults for HelmReleases that controllers
create directly, validation when the ConfigMap is saved, previews on
every edit in the dashboard.

### Merge order

#5190 and #5191 are merged and this branch is rebased on main. #5192 is
open and has the same `osImage` marker hunk, so whichever of the two
lands second needs one more `make generate` after a rebase.

### Known limits

- The dashboard does not show the API Warning.
- `null` for a field that has a developer default is saved as `null`
through kubectl or Terraform, but the dashboard form shows the developer
default.
- A number in an integer-or-string field is rejected by the form (same
on main), so quantities in an entry have to be quoted, `cpu: "2"`.
`values.yaml` says so.
- After a failed preview the form still requires a field that has no
schema default, even if an entry would supply it. Typing the value or
switching to YAML gets around it.
- The marker only fits a choice between alternatives that each stand
complete. I went through the application charts and rendered every
refusal I found that involves two or more fields, and most are not that.
A pair that has to be set together (`resources.cpu` with
`resources.memory`, `tls.enabled` with `tls.disableNonTLSListeners` in
rabbitmq) is completed field by field today, and an atomic object would
drop the default half. An object that also holds independent fields an
admin would default (`backup` in clickhouse, mariadb, mongodb and
postgres, `volume` in seaweedfs) would lose them. Relations between two
objects or two top-level fields (`cloudflareProxy` with `proxyProtocol`
in the ingress, most of postgres, the kubernetes addons) cannot carry a
marker. In all of these a default for one field plus the user's value
for another can make the chart refuse the render after the create went
through. Catching that needs the relations declared as rules in the
schema and the merged spec checked against them, and the API does not
evaluate such rules on a user spec yet (#2657), so it is a separate
change. A few relations depend on a lookup into the cluster and I could
not render them offline.
- Clearing an optional text or number field in the order form leaves its
key out, so the default comes back. A dropdown set to None, a sensitive
field and a dictionary value send an empty string and win. The form
keeps its old meaning of clearing a field, same as on main. To override
a default with an empty value, set it in the YAML tab (`""`, `0`).
Switching from the YAML tab back to the form fills an empty dropdown
with its default option again, a None included, so such a value has to
be deployed from the YAML tab
(https://github.com/cozystack/cozystack/issues/5473).
- An entry that cannot be parsed (invalid JSON, a reserved `_` key)
turns defaults off for every kind, not only its own, and the Warning on
each create names the problem. I did not split it per entry: the failure
is loud, the fix is in one place, and splitting touches the parse and
cache path for a case only a typo causes.
- An atomic object also drops a default for a field nested inside an
alternative when the user sets another field of that alternative. A
default for `osImage.factory.imageFactoryURL` does not survive a pool
that sets `osImage.factory.version`, and the boot disk then comes from
the public factory. `talos.imageFactoryURL` is the knob the chart falls
back to, it is not atomic, and defaults for it keep working.
- A schema that declares a typed property only inside an `allOf` or
`anyOf` branch, under a root that takes arbitrary keys, is checked as
partial. No schema in the tree looks like that.
- An object inside an `allOf`, `anyOf` or `oneOf` branch is closed to
unknown keys even when the property it constrains is declared as a
dictionary, so a valid entry for such a schema is refused and the create
goes on with a Warning
(https://github.com/cozystack/cozystack/issues/5474). No schema in the
tree looks like that either.
- The preview uses the placeholder name `preview`, so it fails when the
tenant already has an application of that kind with this name, and the
form opens with the notice.
- The cache wiring in `pkg/apiserver/apiserver.go` has no unit test, the
cache itself has.

### Verification

- `make unit-tests` on this head with `LC_ALL=C`, exit code 0 (a kafka
bats test on main depends on the locale).
- `tsc` and `eslint` in the console are clean.
- For the checks below I broke the code on purpose and saw the matching
test fail, except the `arrayMinItems` flag of the server form, I could
not make it matter.
- A run on a test cluster with v1.7.0 is in the comment below. It was on
an earlier revision, the stored-whole checks, the extra markers and the
cleared-field change came after and are covered by unit tests only.
- Not run: `make test-controllers`.
- The merge cases asked in review are fixtures of
`TestInstallationDefaultsMergeContract` now: a field set inside the
alternative a user chose of an atomic object, the same object without
the marker, an atomic object nested in one that merges, and an explicit
`null` over an installation object. The whole table is in the proposal
addendum, https://github.com/cozystack/community/pull/146.

Checked cases:

- user values `{}`, `[]`, `false`, `0`, `""` are kept, and a node pool
with its own `registryMirrors` gets none from the platform
- an object with both `properties` and a dictionary, or with preserved
unknown fields, is replaced whole
- empty and `null` `spec` on create
- update after create, apply-update and a field removed on update keep
stored values
- a broken entry for another application, or an application with no
entry and no readable schema, does not touch this create
- missing ConfigMap gives no defaults and no warning, invalid JSON,
unreadable ConfigMap and a cache that did not sync give a Warning and
the create goes on
- partial entry: `required`, `minProperties` and object `oneOf` are
skipped on an object the merge completes, while unknown fields, wrong
types, scalar `oneOf` and array items are still checked
- array rows, dictionary values, free-form and atomic objects are
checked whole, also when the constraint sits in an `allOf` or `anyOf`
branch next to the property, and in these shapes an accepted entry
merges into a spec that the application's own schema accepts
- every ApplicationDefinition in the tree accepts an entry built from
its own developer defaults
- an object that lists properties without `type: object` is checked as
an object, so an unknown field in it is refused
- a pool with `osImage.factory`, a disk with another `source`, a cluster
with `oidc.customConfig.secretRef` and a monitoring stack with
`oidc.customConfig.config` do not get the other child from the platform,
on their real schemas
- a node pool that sets `resources.cpu` still gets `resources.memory`
from an entry, so the marker does not take away the field-by-field
completion of pairs
- dashboard: a user with no tenant does not wait on the spinner,
switching tenant keeps what was typed, a preview answer that arrives
after the tenant changed is dropped, a non-object answer counts as a
failed preview, Retry sends the current draft
- dashboard: after a failed preview dropdowns in a field, an array row
and a dictionary value stay empty, and edits made in YAML come back into
the form
- `required` inside array rows and dictionary values stays in force when
the server owns defaults, and an emptied sensitive field stays `""`

### Screenshots

Not captured yet.

### Downstream repositories

This PR changes `packages/core/platform/values.yaml`. The docs for the
new key are in https://github.com/cozystack/website/pull/828, and the
proposal addendum with the merge cases and two decision records is in
https://github.com/cozystack/community/pull/146. The Terraform provider
may be reached too: it has its own defaults for some sizing fields
(storage class, disk size), so installation defaults would not apply to
those, while the Talos block fields are left out when unset and do get
them. I read the schema, not the expand code.

- [ ] No downstream repository is affected by this change
- [x] [cozystack/website](https://github.com/cozystack/website) -
follow-up: https://github.com/cozystack/website/pull/828
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up: to check, provider defaults vs installation defaults
- [ ]
[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:
- [x] [cozystack/community](https://github.com/cozystack/community) -
follow-up: https://github.com/cozystack/community/pull/146

### Release note

```release-note
feat(api): add the `applicationDefaults` platform value, installation defaults are applied to new applications under user values, existing applications keep their saved settings, and the dashboard order form starts from the same defaults.
```
2026-11-27 15:18:14 +03:00
Myasnikov Daniil e1472e58de fix(ci): publish the release only after the stable images and chart exist
Finalize undrafted the release before it retagged the images and
published the cozy-installer chart, so for the length of the retag the
release page announced a version whose images and chart returned
manifest unknown. The retag took 80-95 seconds on the 1.6.x patches and
several minutes on v1.7.0. A failure in either step also left a public
release that a re-run could not repair, because the re-run looked for a
draft and found none.

Move the draft lookup and the latest decision into their own step that
runs before any registry write, hand the decision to the retag, the
chart and the release page as step outputs, and undraft last. A missing
draft now fails while no stable name exists, and a failed retag leaves
the draft in place for a re-run. The comments and docs that took the
release to be public by the time finalize pushes the stable tag now say
when it is published.

Deciding latest before the retag opens minutes in which two release PRs
merged close together would both decide they are the newest, leaving
latest on the older line on the page, the image aliases and the chart.
Finalize therefore runs one release at a time, in a concurrency group
that only release PRs join and that queues every merged release rather
than cancelling the one waiting.

The finalize bats suites run both github-script steps under node against
a stubbed API: a missing draft, an orphaned draft, an older patch after
a newer minor, and every shipped changelog's tag. A contract test fails
on a registry step allowed to fail, a publish step that runs after a
failure, a `latest` that moves without the decision, or finalize runs
that may overlap.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-27 10:25:01 +00:00
Myasnikov Daniil 74ac18e042 feat(apps): mark objects whose children exclude each other atomic
The worker image of a node pool takes one of builtin and factory, a
vm-disk source one of disk, http, image and upload, and the oidc
customConfig of a kubernetes cluster and of a monitoring stack one of
config and secretRef, and each chart refuses a spec that sets two. An
installation default for one child merged into an application that
chose another built exactly that spec, and nothing warned at create
time. The x-kubernetes-map-type: atomic marker makes the defaults
merge replace the object whole. Nothing else reads it, so existing
applications render as before.

The marker stays off objects whose fields must be set together or sit
beside independent fields, where replacing the object whole would drop
a default the user did not mean to override. The chart guide says when
to use it and when not to.

The tests run the merge against the four real schemas, and one more
pins that a pair like resources cpu and memory still merges field by
field.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-27 07:39:01 +00:00
Timofei Larkin 9f00135618 feat(api): add EndpointAttachment to attach addresses to app endpoints
A managed application's tenant-facing Services are its endpoints, and
the only way to publish one externally has been the chart boolean
`external`, which publishes one chart-chosen endpoint on one address
from no particular pool through five different render paths.
EndpointAttachment attaches one address, minted from an IPAddressClass
or bound from a reserved IPAddressClaim, to one tenant-facing Service by
rendering an additive LoadBalancer Service that mirrors the endpoint's
selector and ports. The mechanism therefore needs no per-engine render
knowledge and never touches the application's own objects, and a
reserved address survives every attachment and moves between
applications. The Service carries the loadBalancerClass the claim's
class reports in status, so it reaches the load balancer that owns the
class's pool; since a Service's loadBalancerClass is immutable, nothing
new is rendered before the class's provisioner accepts the class for its
current generation. The rendered Service asks for the claim's IP
families, since one left to the cluster's primary family cannot be
assigned an address of the other.

The endpoint check requires both the lineage labels and the
tenantresource marker: lineage alone also covers operator-internal
Services. A LoadBalancer Service a tenant Kubernetes cluster's
cloud-controller-manager creates carries the cluster's labels and the
marker too, so the cluster.x-k8s.io/tenant-service-name label it writes
excludes it. Identity is by owner reference throughout, so a Service
carrying the ownership label without the reference is never adopted,
and a same-name recreated application does not inherit the previous
incarnation's attachments.

The VM datapath modes render the cozy-proxy Service contract unchanged
and are gated on a platform declaration rather than CNI detection: a
proxy skips a Service delegated to a name it does not claim while the
load balancer still attracts the address. Exclusivity is keyed on the
backend pod in both modes because cozy-proxy's egress map holds one
address per pod, and holds IPv4 only, so a method attachment off a VPC
refuses an IPv6 or Dual claim. A delegation no attachment renders, such
as a chart Service with external: true, always takes the pod, since
nothing would ever withdraw it; between attachments the oldest wins. A
whole-IP attachment with several ready backends keeps its address dark
instead of picking one.

A cozyplane VPC changes that for whole-IP: the VM's only interface is
in the VPC, so the launcher pod address a cozy-proxy Service maps to
never reaches it. Where a backend pod carries the VM chart's
sdn.cozystack.io/vpc annotation and the cluster serves cozyplane's
FloatingIP, the attachment owns a FloatingIP on the VM's VPC address
wearing its claim instead, and mirrors its readiness once its status
is for its current generation: a re-pointed FloatingIP keeps the old
target's status until cozyplane observes the change. FloatingIP is
read as unstructured and used only when served, so the controller
keeps no dependency on cozyplane. A live migration's two launcher pods
share the VM's VPC address and count as one target, and a stopped VM
keeps its binding rather than flipping to a cozy-proxy Service. Only
a backend pod says whether a VM is in a VPC, so a method attachment
that has published nothing yet waits for one; otherwise an attachment
created before its VM starts would pin the claim to a cozy-proxy
Service first.
PortList is refused there: a FloatingIP binds every port and cozy-proxy
cannot reach the VPC address. So is a Dual claim, since a FloatingIP
wears one address. The kube-ovn VPC keeps the pod-network
interface and adds VPC subnets as secondary interfaces, so the
cozy-proxy path still delivers to the VM there.

The e2e suite is the only one that needs the address substrate, so it
owns both of its optional packages in test selection: the e2e install
enables them, a selection that leaves the suite out disables them, and
post-install prep gives the sandbox a default IPAddressClass on a pool
MetalLB does not auto-assign from. The cozyplane VPC suite stays
parked, because no e2e lane installs that networking variant.

The kind lives in local.sdn.cozystack.io, the CRD-served half of the
sdn family the address substrate and cozyplane share, so stock
ResourceQuota counts keep working.

Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2026-11-27 08:33:56 +01:00
cozystack-ci[bot] 5d012b83bd docs: add changelog for v1.7.2
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-27 07:25:31 +00:00
Aleksei Sviridkin 9af6594342 fix(apps): stop granting tenants core Secrets through dashboard resource maps (#5410)
## What this PR does

Every app chart renders a `<release>-dashboard-resources` Role bound to
the tenant's use, admin and super-admin groups and to the tenant
ServiceAccounts. These started as the kubeapps resource map and became
real grants in #1067. The console moved to `tenantsecrets`, but the
bindings stayed. So a tenant subject can read the named Secrets straight
from the API server and skip the `-rd` allowlist. For a bucket with no
users, which is the default, `resourceNames` renders empty and the Role
grants every Secret in the namespace. I checked that on a live cluster:
the rendered Role lets a `use` subject get and list all Secrets in the
tenant namespace.

Closes #3613.

Nothing reads these Roles any more. Services, ingresses and
workloadmonitors are already granted namespace-wide by the `cozy:tenant`
ClusterRoles, and every Secret tenants need is in the kind's
`secrets.include`, served through `tenantsecrets`.

- Remove the Roles and RoleBindings from every chart under
`packages/apps` and `packages/extra`, except foundationdb. The qdrant
and vm-instance WorkloadMonitors that lived in the same file move to
`workloadmonitor.yaml`. computeplane keeps `withholdAdminKubeconfig` for
one more release: the new kubernetes chart ignores it, but it covers the
window in which the old chart is still served.
- Keep the foundationdb resource map and its Role, with a TODO to remove
them once Cozystack can serve application ConfigMaps to tenants. They
are the only way a tenant reads `<release>-config`, the ConfigMap with
the cluster file, and they grant ConfigMaps only, no Secrets. The map
now lists only that ConfigMap, the one entry the console's ConfigMaps
tab reads, and the foundationdb README says how to read the cluster
file.
- Point the postgres, mariadb, mongodb and kubernetes docs at `kubectl
get tenantsecret`, as redis and rabbitmq already do.
- Add `hack/check-tenant-secret-grants.bats`. It renders every chart and
fails if any binds a tenant subject to a Role that grants core Secrets.
On current main it flags 18 charts, bucket included.

One deliberate loss: with OIDC, the `view` tier no longer reads the
`kubeconfig-<namespace>` Secret of the info module. The old Role granted
it from `view` up, while `tenantsecrets` is granted from `use` up, and
giving `view` `tenantsecrets` would show it every tenant credential. The
kubeconfig holds no credential (the API address, the public CA and an
`oidc-login` call), so `view` users can build it from the docs until
`tenantsecrets` can serve such Secrets to `view`.

No objects carry `helm.sh/resource-policy: keep`, so Helm deletes them
on upgrade and no migration is needed.

### Screenshots

N/A, no UI changes.

### Downstream repositories

- [ ] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up: needed, pages that tell tenants to `kubectl get secret` for
app credentials or kubeconfigs should say `tenantsecret`
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up: needs a check, any data source that reads app Secrets with
a tenant identity
- [ ]
[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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
fix(apps): Tenants no longer get direct read access to application Secrets through the per-application dashboard Roles. Those Roles are removed; read credentials with `kubectl get tenantsecret` instead of `kubectl get secret`. This closes a case where a bucket without users let tenant members read every Secret in the namespace.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Updates**
* Kubernetes credential retrieval instructions now use `tenantsecret`
resources.
* **New Features**
* Added workload monitoring resources for Qdrant and virtual machine
instances.
* **Removed**
  * The application details page no longer includes a ConfigMaps tab.
* Dashboard access to selected application and infrastructure resources
is no longer provided through chart-defined permissions.
* FoundationDB dashboard resource-map checks are no longer part of the
end-to-end test.
* **Tests**
* Added checks to detect tenant access grants to Kubernetes Secrets
across rendered charts.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-27 05:58:21 +03:00
Aleksei Sviridkin fba9fa8278 docs(release): add the v1.7.0 release notes (#5163)
## What this PR does

This PR adds `docs/releasenotes/v1.7.0.md`, short hand-written release
notes used as v1.7.0 release body. File is the same as in
[e4a9d43](https://github.com/cozystack/cozystack/commit/e4a9d433ae03a64508126589a364db279291b53a)
on `release-1.7.0-rc.3` plus one sentence that links the [v1.7 upgrade
guide](https://cozystack.io/docs/v1.7/operations/cluster/upgrade-to-v1.7/).

Full v1.7.0 changelog is about 260 KB, GitHub doesn't accept that much
as release description, so release body is this file instead (about 10
KB): what has to be known before upgrading with each item linked to the
full changelog, and contributors list.

It needs to be on main because `update-releasenotes.yaml` runs on pushes
to main and reads files from main. Since
[#5142](https://github.com/cozystack/cozystack/pull/5142) the sync takes
`docs/releasenotes/<tag>.md` over the changelog and also runs when that
file changes, so a later edit of these notes reaches the release page.

This PR should be merged only after v1.7 documentation is published on
the website, before that the new link returns 404. Merging it makes
`update-releasenotes.yaml` update the v1.7.0 release body from main.

`docs/changelogs/v1.7.0.md` is not part of this PR, `tags.yaml` ports it
to main from the stable tag with its own changelog PR, so main gets the
version that shipped.

No backport to `release-1.7` - release line gets this file through
`release-1.7.0-rc.3` staging branch, where it already is, without the
upgrade guide sentence. The link exists only in this copy.

### 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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
NONE
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Added Cozystack v1.7.0 release notes covering release highlights,
upgrade prerequisites, breaking changes, affected configurations and
resources, required upgrade actions, and reported migration or rollout
effects.
* Included contributor acknowledgements and a link to the full
changelog.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-26 13:26:02 +03:00
myasnikovdaniil bfc9aec823 docs(release): add changelog for v1.7.0 (#5162)
This PR adds the changelog for release `v1.7.0`.

✅ Changelog has been automatically generated in
`docs/changelogs/v1.7.0.md`.
2026-11-26 15:23:26 +05:00
Andrei Kvapil 6ed0541eb2 fix(apps): stop granting tenants core Secrets through dashboard resource maps
Every app chart rendered a <release>-dashboard-resources Role and a
RoleBinding to the tenant's groups and ServiceAccounts. The Roles began
in 2024 as a resource map that the kubeapps dashboard read to list an
application's objects, and had no bindings. When the tenant roles lost
the core wildcard, the maps were bound so kubeapps kept working, and
they became real grants. The console that replaced kubeapps reads
Secrets through core.cozystack.io/tenantsecrets, which cozystack-api
serves with its own identity and only for what the ApplicationDefinition
admits, yet the bindings stayed.

So any tenant subject at the bound level could read the named Secrets
directly through the API server, bypassing the -rd allowlist: database
credentials, the kubernetes admin kubeconfig, Grafana's admin password.
A bucket with no users rendered an empty resourceNames list, which RBAC
reads as every Secret in the namespace.

Nothing reads these Roles' Secret rules any more. Services, ingresses
and workloadmonitors are already granted namespace-wide by the
cozy:tenant ClusterRoles, and the Secrets tenants need are all in
secrets.include. Remove the Roles and RoleBindings from every chart
except foundationdb. The qdrant and vm-instance WorkloadMonitors that
shared the file move to workloadmonitor.yaml.

foundationdb keeps its resource map and Role: they are the only way a
tenant reads <release>-config, the ConfigMap with the cluster file,
since no cozy:tenant role grants ConfigMaps and tenantsecrets serves
only Secrets. They grant ConfigMaps and no Secrets, and the map now
lists only that ConfigMap, the one entry the console reads. They go
once Cozystack can serve application ConfigMaps to tenants.

The new kubernetes chart ignores computeplane's
withholdAdminKubeconfig pin, but it stays for one more release: until
the ExternalArtifact catches up, the previous kubernetes chart would
otherwise render its admin kubeconfig rule again.

None of these objects carries helm.sh/resource-policy: keep, so Helm
deletes them on upgrade and no migration is needed.

A new bats check renders every chart under packages/apps and
packages/extra and fails if any binds a tenant subject to a Role that
grants core Secrets. The suites and e2e steps that pinned the Roles'
rules are removed with them. The charts that needed cluster state only
to render the Roles now render offline, so they leave the release-size
check's NO_OFFLINE_RENDER list.

Assisted-by: LLM
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-26 10:52:28 +01:00
Timofei Larkin 94c79925f8 feat(api): add the credentials API with mint and revoke subresources (#4921)
## What this PR does

Tenants read application passwords from Secrets today, and a leaked
password can't be taken back. This PR adds the platform side of the user
secrets API design (cozystack/community#137, ADR 0002): a password comes
out once from a mint, the next mint replaces it, and a revoke kills it.
The engines are converted in the PRs stacked on top, starting with
Postgres in #4922.

How it works:

- A kind's chart renders one `CredentialTemplate`
(`cozystack.io/v1alpha1`) per account: the username, the stored format
(`scram-sha-256`, `mysql-native`, `sha256` or `plaintext`), labels for
the account Secret, and an optional `valuesPath` for an operator that
reads no Secret.
- cozystack-controller keeps the account Secret `<template>.account`. It
seeds it on a release the API marked for seeding, adopts an unowned
Secret with the same username, leaves a foreign one alone with a
`SecretConflict` condition, and mirrors the record (origin, time, actor,
history) into the template status. For a `valuesPath` template it
maintains an optional `valuesFrom` entry on the release.
- `core.cozystack.io/v1alpha1` serves `credentials` as a read-only view
of the templates, plus `mint` and `revoke` subresources. A mint checks
the caller's `resourceVersion` precondition against the mirrored status,
builds the whole Secret and writes it in one request, or answers 409. It
never reads the Secret back. One API request writes one object; the
best-effort Event is the only extra write.
- The Application API marks a new release for seeding, keeps the account
`valuesFrom` entries when it rewrites a release, and refuses to delete a
suspended release that still has accounts, since Flux would skip its
uninstall.
- The dashboard gets a Credentials tab on the application page. It lists
accounts with origin and history; an administrator can mint or revoke,
and a viewer sees no buttons.

The application charts are untouched here: a kind starts using this only
when its chart renders templates. The `CredentialFormat` webhooks that
ADR 0002 describes are not in this PR, so `format.name` accepts only the
four built-in names for now.

### Screenshots

<img width="1440" height="900" alt="01-admin-tab"
src="https://github.com/user-attachments/assets/8c48086c-8f6c-4908-82c1-40e9078afe57"
/>

<img width="1440" height="900" alt="02-mint-dialog"
src="https://github.com/user-attachments/assets/802b2963-3f57-4c0b-ab84-f74bad28c343"
/>

<img width="1440" height="900" alt="03-mint-result"
src="https://github.com/user-attachments/assets/0e9ae3cc-7a3c-4daf-9a09-d4abf53bf70b"
/>

<img width="1440" height="900" alt="04-viewer-tab"
src="https://github.com/user-attachments/assets/10e940f2-4ceb-469d-a0f9-6c9d20a62919"
/>

### Downstream repositories

- [ ] No downstream repository is affected by this change
- [ ] [cozystack/website](https://github.com/cozystack/website) -
follow-up: needed, cozystack/website#753 should document the
`Credential` mint/revoke flow and the dashboard tab
- [ ]
[cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack)
- follow-up: needed later, a way to mint from Terraform; nothing breaks
in this PR alone
- [ ]
[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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up: none, the design is cozystack/community#137

### Release note

```release-note
feat(api): Add the credentials API. Applications that support it expose their accounts as `credentials.core.cozystack.io`; an administrator mints a password once with the `mint` subresource, and `revoke` invalidates it without issuing a new one. The dashboard shows a Credentials tab for such applications. No application uses it in this release on its own; see the per-engine changes.
```
2026-11-26 12:37:20 +03:00
Aleksei Sviridkin 74e103d6f2 ci(workflows): run push and schedule workflows only in cozystack/cozystack (#5186)
## What this PR does

GitHub runs no CI in a security advisory's temporary private fork, and
merging from the advisory skips branch protection, so an embargoed fix
currently reaches `main` with nothing having run on it. This PR prepares
the repository for verifying such a fix in a separate private copy of
the repository (an embargo mirror), and documents that process.

- Every job of a workflow that a push or a schedule starts now runs only
in `cozystack/cozystack`. A mirror receives all workflow files on each
sync, and without the guard it would build, publish, prune and cut
releases from that copy on every sync and cron tick. Workflows that also
run on `pull_request` keep running on pull requests, which is what the
mirror is for. Every job carries the guard rather than only the root
jobs, because a job whose condition calls a status function such as
`!cancelled()` runs even when the job it needs was skipped.
- `hack/workflow-repo-guard.bats` holds every current and future push or
schedule workflow to that guard, accepting it only as the leading
conjunct so nothing ORed after it can reopen the job.
- `docs/security/incident-response.md` describes the verification flow:
sync the mirror on demand, open the fix PR inside it, record the green
run in the advisory, then merge from the advisory. It also records why
the mirror must not hold the public registry credentials: pull request
CI pushes every image and the packages artifact (the full chart tree) to
a registry that is anonymously readable, tag listing included, so a run
there would publish the fix before the release.

Behaviour in `cozystack/cozystack` is unchanged: the guard is true
there, and each existing condition is kept intact inside the new
conjunction. Contributor forks with Actions enabled stop running these
workflows too.

Out of scope, as a follow-up: letting pull request CI push to a private
registry and pull from it in the E2E cluster, so the mirror can run the
E2E suite and not only planning, pre-commit and the unit tests.

Verification:

- `hack/workflow-repo-guard.bats` was red before the workflow changes
(30 unguarded jobs) and is green after; removing the guard from
`tags.yaml` `rc-e2e`, dropping the pull request clause from
`zizmor.yml`, or adding an unguarded scheduled workflow each turns it
red.
- Every changed workflow is identical to `main` once job `if` fields are
removed (`yq 'del(.jobs[].if)'`).
- `zizmor --offline` reports no findings; `actionlint` reports the same
findings on the changed files as on `main`.
- `hack/stitch-multiarch_test.bats` pinned the exact `if` of two
`tags.yaml` jobs and is updated to the guarded form.

### 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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

The trigger map entry that touches this diff is `cozystack/ccp` for
`tags.yaml`: its `package-bump` skill describes the release pipeline of
`cozystack/cozystack`, which this PR does not change.

### Release note

```release-note
ci(workflows): push- and schedule-triggered workflows run only in cozystack/cozystack, so a private mirror used to verify embargoed security fixes does not build, publish or release from its copy.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **CI**
* Scheduled, release, and maintenance workflows now run only in the
canonical repository. Pull-request checks continue to run where
configured.
* Build, validation, and security workflows now follow
repository-specific run conditions.

* **Documentation**
* Updated incident-response guidance with steps for verifying fixes in a
private advisory mirror, including CI limitations, check requirements,
and credential restrictions.

* **Tests**
* Added workflow checks to verify repository guards and event-specific
conditions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-26 11:09:54 +03:00
Alexey Artamonov 6115d2d6ad docs(security): describe verifying an embargoed fix in a private mirror
GitHub runs no CI in an advisory's temporary private fork, and merging
from the advisory skips branch protection, so a security fix reached
main with nothing having run on it. The incident-response process now
records where the fix is verified instead, how the mirror is kept in
step with the public branches, and why the mirror must never hold the
public registry credentials: pull request CI pushes the full chart
tree to an anonymously readable registry, which would publish the fix
before the release.

Without those credentials a mirror run of any code change is red at
the registry login, so the process names the jobs that must pass
instead of asking for a green run. It records the main commit the run
was based on and asks for a rerun when main has moved before the merge,
because a change elsewhere on main can break the fix without a merge
conflict. It also records what a sync still starts: a release line
carries the workflows it was cut with, so pushing one runs its build
there, and a tag cut before the guard runs tags.yaml unguarded, which
is why tags are never synced.

Signed-off-by: Alexey Artamonov <aleksei.artamonov@aenix.io>
Assisted-by: LLM
2026-11-25 17:35:33 +03:00
Timofei Larkin d0c0134eb8 docs(operations): describe the audit trail of credential issuance
Attribution of a mint or a revoke comes from the kube-apiserver audit
log, which records the caller and the subresource but never the body of
a request it proxies to an aggregated API, so the password shown once
cannot land in it. A distribution that ships no audit policy records
nothing and loses attribution silently, so the page gives a policy for
it, says where fluent-bit expects the log, how to find an issuance in
VictoriaLogs, and how to ship the log to a SIEM.

Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
2026-11-25 10:41:01 +01:00
Timofei LarkinandYan Bondarenko 16da53637e feat(kubernetes): give each new cluster an etcd of its own
A tenant Kubernetes cluster could only start once an ancestor Tenant had
an etcd module turned on, which nobody creating a cluster may do, and
every cluster below that tenant then shared one etcd, one CA and one
disk. Anything that orders clusters on a tenant's behalf had to flip the
tenant's etcd on first.

A new cluster now renders its own EtcdCluster and DataStore, from the
cozy-lib shapes the etcd chart uses, and is created and deleted with
them. The awaiting-etcd state goes, since a datastore always exists.

An existing cluster stays on the DataStore its live KamajiControlPlane
names, and renders what it rendered before. Changing that name starts a
Kamaji datastore migration, which freezes the tenant's writes and leaves
every worker kubelet needing a restart, so no upgrade may do it.
_namespace.etcd cannot decide this: tenant-root publishes one to every
tenant whether or not an etcd runs behind it.

On uninstall, Kamaji's datastore finalizer drops the tenant's role,
prefix and user from an etcd this release deletes next, and it never
completes while that etcd is down. The pre-delete hook therefore removes
it from a TenantControlPlane on the cluster's own DataStore that
outlives the wait, and deletes the etcd's PKI, which cert-manager issues
without an owner. If the finalizer stays on, or the TenantControlPlane
cannot be read, the hook fails before the PKI goes, so the uninstall is
retried with the etcd still in place. A TenantControlPlane on a shared
DataStore is left to Kamaji as before.

A Cilium deny policy keeps the rest of the tenant namespace, ancestor
tenants and off-cluster sources off the etcd ports; the Kubernetes
backup strategy's dump Job carries the label it admits. The tenant
etcd's scrape now selects its own members by instance, because every
member etcd-operator runs carries app.kubernetes.io/name: etcd. The
platform waits for etcd-operator before offering the application.

The defrag job both charts share pulls its image through the configured
registry, pinned by digest to the multi-architecture index, so a
mirrored installation does not depend on ghcr.io for it.

Tested with helm-unittest on both the own and the shared branch, the
pre-delete hook's bats suite run against a stub kubectl for both, and a
render of an existing cluster that matches main byte for byte.
The guest e2e runs the defrag CronJob once, and probes the etcd client
port from a labelled Pod, an unlabelled one and one in tenant-root.

Co-authored-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
Assisted-by: LLM
Signed-off-by: Yan Bondarenko <202671653+yankawai@users.noreply.github.com>
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2026-11-24 09:04:49 +01:00
Timofei Larkin 5daa04ea6e feat(networking): cozyplane eBPF CNI + cozyplane-kpr networking variant (drops Cilium) (#3149)
## What this PR does

Adds an **opt-in** `bundles.system.networkingVariant: "cozyplane"` for
the `isp-full` (Talos) bundle: it replaces kube-ovn, Cilium and
kube-proxy with the [cozyplane](https://github.com/lllamnyp/cozyplane)
eBPF CNI, its aggregated `sdn.cozystack.io` API server, and the
`cozyplane-kpr` socket-LB kube-proxy replacement. The default
`kubeovn-cilium` path renders identically to main; the selector is
refused outright on every other bundle variant (slim variants included),
where it would half-apply.

Components: three wrapper charts around cozyplane's upstream charts —
the CNI (`packages/system/cozyplane`), the kube-proxy replacement
(`cozyplane-kpr`) and the aggregated apiserver with its
etcd-operator-managed, PVC-backed etcd (`cozyplane-apiserver`) — plus
the Cilium policy CRDs shipped inert so stock charts install
(`cozyplane-cilium-crds`), a `cozystackAPI.serveSDN` toggle in
cozystack-api, and the platform wiring. The wiring threads the
platform's `networking.podCIDR`/`serviceCIDR` (and `clusterDNS`, the
service network's address plus 10 when unset) into the cozyplane
component, drops the packages that assume the replaced stack
(kubeovn-webhook/-plunger, multus, securitygroup-controller, the
virtualprivatecloud app), refuses the default `cilium` gateway class and
`networking.encryption.enabled` on the variant, and turns off sdn
serving in cozystack-api.

Bootstrap ordering: the CNI installs first with the kube API as its only
dependency and ships only the LOCAL group's CRDs
(`local.sdn.cozystack.io`, underlay IPAM); the tenant kinds (VPC, Port,
SecurityGroup, …) have **no CRDs** and are served only by the aggregated
apiserver, which installs later behind cert-manager, etcd-operator and
storage. Until it lands, `sdn.cozystack.io` is simply not served; there
is no takeover. On Talos the agent and kpr bootstrap against KubePrism,
since with no kube-proxy the `kubernetes.default` ClusterIP is unserved
until kpr itself runs.

Each cozyplane package follows the umbrella pattern: the upstream chart
is vendored verbatim under `charts/<name>` by `make update` from a ref
pinned in the wrapper's Makefile, and everything Cozystack-specific
lives in the wrapper — the Talos overlays, the apiserver's etcd storage
class and replica count, and two ClusterRoles that carry cozyplane's own
tenant roles into the `cozy:tenant` tiers by aggregation, so the list of
tenant kinds stays upstream's to maintain. Image pins are the digests
upstream pins for that ref, with multi-arch legs verified there. The
wrappers carry helm-unittest suites pinning the platform contract, the
egress args the platform threads included, and the platform suite covers
the variant's package set, the guards and the CIDR threading.

The variant is experimental: it has no e2e lane yet and is not for
production clusters, which the operator-facing values comment says.
**CiliumNetworkPolicy objects apply but are not enforced on this
variant** — tenant network isolation on the default network, the Cilium
host firewall and the platform components' own Cilium policies (several
of them `ingressDeny` rules native NetworkPolicy cannot express) are not
in effect, as stated in the values comment, the networking source and
the threat model; rebuilding them on what cozyplane does enforce (native
NetworkPolicy, its operator-only HostFirewall) is a follow-up.
cozystack-api's SecurityGroup (a restricted interface over
CiliumNetworkPolicy) is not served on the variant; cozyplane's own
SecurityGroup is the first-class tenant instrument for traffic inside
and across VPCs. The tenant-facing VPC application lands in #4508,
stacked on this PR.

### Screenshots

Not a UI change.

### Downstream repositories

The trigger map fires for cozystack/website (a new platform variant and
new `platform.values` keys); cozystack/website#815 documents both. It
arguably fires for terraform-provider-cozystack too (the SecurityGroup
spec differs per variant); that box is left unticked so a human decides.

- [ ] No downstream repository is affected by this change
- [x] [cozystack/website](https://github.com/cozystack/website) -
follow-up: cozystack/website#815
- [ ]
[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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
feat(platform): opt-in networkingVariant "cozyplane" for the Talos bundle — replaces kube-ovn, Cilium and kube-proxy with the cozyplane eBPF CNI, its aggregated sdn.cozystack.io API server and a socket-LB kube-proxy replacement; CiliumNetworkPolicy objects are not enforced on this variant
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Added an opt-in Cozyplane networking variant with cluster DNS
configuration, CNI, and service routing.
* Added a Cozyplane API service for tenant networking resources, with
tenant edit and view permissions.
  * Added control over whether the existing SDN API is served.
* Gateway configurations using an unavailable class are now rejected
with guidance.
* **Important Limitations**
* Cozyplane does not enforce existing Cilium network policies or
platform Cilium rules. Tenant traffic isolation may require native
NetworkPolicies; some platform rules require operator-managed
HostFirewall policies.
* Cozyplane networking does not support encryption or the default Cilium
Gateway class, and requires pod and service CIDRs.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-23 09:31:43 +00:00
Aleksei Sviridkin 10bd82cc58 docs(release): make changelog check B find changed image build files (#4952)
## What this PR does

Check B of the changelog pre-publish verification in `docs/release.md`
lists changed image build files with `git diff --name-only $PREV..$NEW
-- 'images/*/Dockerfile'`. That pathspec never matches anything: there
is no `images/` directory at the repository root, since image build
files live under `packages/*/*/images/`. The check therefore printed
nothing on every release and passed without looking at anything. It also
skipped `Containerfile`, which first-party images such as
`otelcol-tracing` and the dashboard `console` use.

This PR changes the pathspec to `'*Dockerfile' '*Containerfile'`, which
matches both file names at any depth. I checked it in a scratch
repository: the old pathspec returned no files for a changed Dockerfile
and Containerfile, and the new one returned both. Every Dockerfile and
Containerfile currently in the repository lives under
`packages/*/*/images/`, so the broader pathspec does not pick up files
from vendored charts.

Closes #4892 

### Screenshots

N/A: documentation-only change, no UI impact.

### 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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
docs(release): make changelog verification check B find changed image build files by matching Dockerfile and Containerfile at any depth
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Chores**
* Pre-publish verification now checks for changes to Dockerfiles and
Containerfiles throughout the release range, including files outside
image-specific directories. This expands the container build-file
changes covered by release checks; previously, verification was limited
to Dockerfiles in image directories.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-23 04:41:57 +03:00
Marian Koreniuk cfb5119c0b feat(build): attach a provenance attestation beside the SBOM (#5043)
## What this PR does

Follow-up to #4997 (merged as d32092ac9), rebased onto `main` at that
merge: one commit `57db352ed`. The second half of what was agreed there:
beside the SBOM, each release image gets a SLSA provenance statement
from BuildKit, in the same attestation manifest.

Refs #4759, #3278

`SBOM=1` in `hack/common-envs.mk` now passes `--attest
type=provenance,mode=min` with the SBOM attest, in place of
`--provenance=false`; a build without `SBOM=1` keeps
`--provenance=false` as before. BuildKit writes both predicates into the
one attestation manifest per platform, so the index shape
`hack/stitch-multiarch.sh` and `hack/verify-multiarch.sh` read after
#4997 is unchanged, and a signature over the index covers the provenance
as it covers the SBOM. `mode=min` records the build times, the build
platform, the frontend and the BuildKit version and leaves out the build
arguments and the secrets, which `mode=max` would write in, so it can
ride every release image. `docker buildx imagetools inspect
<image>@<digest> --format '{{ json .Provenance }}'` prints it;
`docs/release.md` says so.

### How it was checked

- `hack/common-envs_test.bats`: the `SBOM=1` test now also holds that
`--attest type=provenance,mode=min` is passed, that `--provenance=false`
is not, that neither `mode=max` nor `--provenance=true` appears, and
that the default build still passes `--provenance=false` and no
`--attest`. `make -n` of `packages/system/cozystack-controller` shows
exactly that in both modes. `hack/stitch-multiarch_test.bats` is green:
the attestation manifest count per platform does not change.
- A real build, by @myasnikovdaniil on a local registry: amd64 and arm64
built with the flags from `common-envs.mk`, stitched,
`verify-multiarch.sh` passes, the index has four manifests (two images,
two attestation manifests with SBOM and provenance each), `.Provenance`
reads for both platforms, and a `--build-arg` value is in `mode=max` and
not in `mode=min`.
- Rebased on `main` at d32092ac9: `hack/common-envs_test.bats` and
`hack/stitch-multiarch_test.bats` 34/34.
- Not checked: the provenance predicate on a release runner. The first
alpha after the merge shows it.

### Decisions for the release owners

- `mode=min` rather than `mode=max`: the Dockerfiles take `--build-arg`
values a reader of a public attestation should not see by default. If a
package's arguments are all public, `max` is one word away.
- `docs/security/self-assessment.md` still says build provenance is
disabled (`--provenance=false`). It stays until the first alpha shows
provenance on a release image, as #4997 holds its SBOM row.
- PR, main and nightly builds stay without provenance, as they stay
without an SBOM: nothing reads it there, and the default docker driver
cannot attach it.

### Screenshots

<!-- REQUIRED for UI changes: attach screenshots or screen recordings
demonstrating
the visual impact of your changes. PRs with UI changes without
screenshots will not be merged. -->

### 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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

I walked the trigger map against the diff. `hack/common-envs.mk` changes
the flags one variable expands to and no target, variable name or file
that ccp's skills anchor on; nothing else is touched.

### Release note

```release-note
feat(build): every release image built with `SBOM=1` also carries a SLSA provenance statement (BuildKit `mode=min`: build times, platform, frontend and BuildKit version, no build arguments or secrets) in the same attestation manifest as its SBOM, readable with `docker buildx imagetools inspect <image>@<digest> --format '{{ json .Provenance }}'`.
```



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
* Container builds with SBOM generation enabled now include both an SPDX
software bill of materials and a minimal SLSA provenance attestation.
  * Provenance attestations remain disabled when SBOM generation is off.

* **Documentation**
* Updated the container image security guide with details on provenance
contents and how to inspect the attestation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-20 10:32:33 +01:00
Timofei Larkin d15fb0fc35 docs(platform): mark the cozyplane variant experimental
Once merged the variant is one value away, and the values comment is
what an operator reads before choosing it, so it now says the variant
has no e2e coverage and is not for production. The threat model's note
also lists what the variant leaves unenforced beyond tenant isolation:
the platform components' own Cilium policies, several of them
ingressDeny rules that native NetworkPolicy cannot express.

Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2026-11-19 12:04:17 +01:00
Timofei Larkin f0d1a802f0 feat(platform): cozyplane networking variant
An opt-in bundles.system.networkingVariant for the isp-full (Talos)
bundle: "cozyplane" swaps kube-ovn, Cilium and kube-proxy for the
cozyplane eBPF CNI, its aggregated sdn.cozystack.io apiserver and the
cozyplane-kpr socket-LB proxy. The default "kubeovn-cilium" renders
identically to main.

The variant drops the packages that assume the replaced stack —
kubeovn-webhook/-plunger, multus, securitygroup-controller, the
virtualprivatecloud app — and turns off sdn aggregation in
cozystack-api, since cozyplane owns the group. The selector is
validated before any branch is taken: accepted off isp-full it would
half-apply, stripping the kube-ovn control plane and the sdn
APIService while the Cilium networking package keeps running; and the
default "cilium" gateway class is refused on cozyplane, where nothing
serves it. The platform's networking.podCIDR and serviceCIDR (and
clusterDNS, derived from the service CIDR when not set explicitly) are
threaded into the cozyplane component, so the egress masquerade and
the VPC gateways' internal denies match the cluster rather than the
chart defaults.

CiliumNetworkPolicy objects apply but are not enforced on this
variant; the values comment, the networking source and the threat
model say so, and the threat model records the SecurityGroup split:
cozyplane's is a first-class tenant instrument for traffic inside and
across VPCs, not cozystack-api's projection onto CiliumNetworkPolicy.
Tenant isolation rebuilt on native NetworkPolicy + HostFirewall is a
follow-up.

Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2026-11-19 12:04:16 +01:00
Aleksei Sviridkin d88322197f chore(deps): roll up Renovate updates and raise dependencies to latest stable (#4869)
## What this PR does

One PR instead of separate Renovate PRs. Go modules, Dockerfile base
images and GitHub Actions move to newer versions that build and pass the
tests. Where a newer version is known to break something, it stays
behind, and `.github/renovate.json` holds it with the reason in the rule
description.

The tests come first, in their own commits:

- `make go-unit-tests` runs the Go tests under `pkg/` and `cmd/`, except
the backport-batch suite, which keeps its own target. The apiserver
serializer and fuzz tests, the generated OpenAPI and applyconfiguration
suites, the apis packages and the controller, operator and
observability-proxy commands did not run in CI before.
- The apps API surface that apiserver libraries shape is pinned:
server-side apply, content negotiation, Table output on watch, the
served OpenAPI v2 and v3 documents, and building the server without
etcd. Two answers look wrong and are pinned as they are today: applies
from different field managers never conflict (#4857), and protobuf is
refused with 406 even when the client offers JSON as a fallback (#5297).
- New tests cover the kubeovn webhook patch, the token proxy session
cookie and the mount-utils behaviour the kubevirt CSI node service
relies on.
- `hack/image-smoke.bats` checks the tools the CSI, LINSTOR, multus,
Harbor and redis-backup images take from their base images or build
stages, and that the kubevirt CSI node plugin and its sidecars need no
more than x86-64-v2. Each PR build job runs it against the images it
pushed; forks and the unit lane run no container.

The tests found two bugs:

- The kubeovn webhook dereferenced a nil pointer on an admission review
without a request, so the caller got a dropped connection instead of a
400.
- The token proxy cookie refresh never fired: securecookie decodes the
session times as int64 and the refresh looked for float64, so the
`--cookie-refresh=1h` the chart sets did nothing. A refreshed cookie
keeps the token's expiry. A session too large to encode now shows an
error at sign-in and leaves the current cookie alone on refresh.

What moved:

- GitHub Actions to their Node 24 majors. The flux action stays on the
tag of the Flux CLI it installs. The release job's checkout no longer
persists credentials, so its staging branch push uses the App token.
- Go 1.27.2 for the toolchain and builders. Builds that reproduce an
upstream release keep the Go upstream uses: Harbor, cilium-operator,
SeaweedFS and the chainsaw stage of the e2e sandbox.
- controller-runtime v0.25.2, gateway-api v1.6.3 on the minor of the
installed v1.6.1 CRDs, cel-go v0.30.0, grpc v1.84.0, etcd v3.7.2,
cert-manager v1.21.2, kubevirt csi-driver f10ae94 on Kubernetes v0.37.1.
- Node 24 for the dashboard console.

Held back, each with its reason in the Renovate rule:

- cel-go stays below v0.31: the old repository has no tags past v0.30.0,
and v0.32 moves to cel.dev/cel-go, which k8s.io/apiserver does not
import.
- kube-openapi stays on the commit its dependencies require, and
structured-merge-diff stays on v6, because k8s.io/apimachinery v0.37
does not compile against v7.
- The Flux API modules stay on the Flux v2.8 line the platform installs.
- gomodules.xyz/jsonpatch stays on v2, which controller-runtime's
admission.Patched takes.
- jwx stays on v3: v4 removes jwk.Cache, which the token proxy's JWKS
refresh is built on.
- kubevirt.io/api and the CDI API stay where upstream csi-driver builds.
- The kubevirt CSI driver image stays on AlmaLinux 9, because AlmaLinux
10 builds its amd64 userland for x86-64-v3.
- shadowbox stays on node 18, which outline-server declares in its
engines.
- The e2e sandbox stays on Ubuntu 24.04. 26.04 ships uutils coreutils,
whose `date` costs about 4x per call, and the test harness forks it per
traced line, which adds about ten minutes to the install phase.
- clastix/kubectl stays on v1.32 for the cleanup hooks, within kubectl's
one-minor skew.

The cert-manager Go module (v1.21.2) is one minor ahead of the installed
chart (v1.20.2). The Certificate objects the gateway controller writes
serialize the same either way.

`api/apps/v1alpha1` now requires Go 1.27.2, which applies to every
module that imports the published types.

The Linux run with Go 1.27.2 was done before the rebase onto current
main, and the rebased head has not been through it yet. There the five
modules built, vetted, tested and tidied cleanly, and the repository
unit, controller and envtest lane passed. `go test -race` passed in four
modules. In the root module it failed only on a pre-existing data race
in the workload monitor tests (#5296), which main has too. The image
smoke checks run in this PR's CI.

### Screenshots

No UI change.

### Downstream repositories

`api/apps/v1alpha1` moves to `go 1.27.2`, and
cozystack/terraform-provider-cozystack imports it, so that repository is
affected but needs no action. Its box stays empty for that reason, and
so does the "not affected" one.

- [ ] 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: none needed, because its Renovate raises the go directive
together with the pin bump and its CI takes Go from `go.mod`; the only
effect is that the provider's minimum Go becomes 1.27.2.
- [ ]
[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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
chore(deps): move the toolchain and builder images to Go 1.27.2 and raise Go modules, base images and GitHub Actions to newer working releases; the dashboard token proxy now refreshes its session cookie, and the kube-ovn webhook rejects an admission review without a request instead of dropping the connection.
```
2026-11-18 14:42:34 +03:00
Aleksei Sviridkin a3e60ec372 feat(kafka)!: run on Strimzi 1.2.0 and Kafka 4.x (#4900)
<!-- Thank you for making a contribution! Here are some tips for you:
- Use Conventional Commits for the PR title: `type(scope): description`
- Types: feat, fix, security (a fix that comes through a security
advisory), docs, style, refactor, perf, test, build, ci, chore
- Scopes are not an exhaustive list — pick the most specific scope for
the change and extend the list when a genuinely new area appears.
Examples:
- System components: dashboard, platform, operator, cilium, kube-ovn,
linstor, fluxcd, cluster-api
- Managed apps: postgres, mariadb, redis, kafka, clickhouse,
virtual-machine, kubernetes
- Development and maintenance: api, hack, tests, ci, docs, maintenance
- Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or
add a `BREAKING CHANGE:` footer
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Fixes merged to `main` reach the release lines the backport batch runs
for automatically, so do not open backport PRs by hand:
https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md
-->

## What this PR does

This upgrades the Kafka operator to Strimzi 1.2.0. Kafka 4.3 is the
application default, with 4.2 also available. Upgrades must pass through
Cozystack v1.7 and finish the ZooKeeper-to-KRaft migration first.

The upgrade now stops while any Kafka lacks KRaft evidence. Every Kafka
must report a nonempty `kafkaMetadataVersion` and the `KRaft` metadata
state. The API conversion deletes that state, so without it a Kafka
needs `Ready=True` or the `cozystack.io/kraft-verified` annotation,
which migration 61 writes on every Kafka it accepts before it stops the
operators. Any other explicit state blocks, and the error gives the
reason for each Kafka. On every variant, the platform chart refuses to
switch package sources while Strimzi still serves `v1beta2` and a Kafka
fails that check. On variants without the migration hook, it also
refuses while any Strimzi CRD still stores `v1beta2`, so
`/migrations/61` has to run first. Migration 61 checks the same evidence
again, including on repeat runs, and blocks unfinished broker-pool
drains. A manual change that bypasses the managed package source is
outside this check.

Existing Kafka 3.x applications move to v4.3. Kafka 4 no longer accepts
clients older than Kafka 2.1. Kafka 4 also rejects the topic settings
`message.format.version`, `message.downconversion.enable` and
`message.timestamp.difference.max.ms`, and a `segment.bytes` below 1 MiB
(1048576), which Kafka 3.x accepted down to 14 bytes. A Kafka 4 broker
whose log holds such a topic does not start. The chart now refuses to
render a topic that sets any of these. The platform upgrade refuses to
start while a Kafka application sets one, and migration 61 also checks
KafkaTopic resources, so topics created outside the chart are caught
too. A topic created through the Kafka admin API without a KafkaTopic is
not visible to these checks. Restoring a topic-metadata backup taken on
Kafka 3.x skips the three removed settings and raises a smaller
`segment.bytes` to 1 MiB, with a warning for each. In-place downgrades
are unsupported. The default 10-minute Helm timeout can leave a long
broker roll Failed until its retry succeeds.

The migration does not run automatically on every platform variant. Only
the `isp-*` variants run it automatically. On other variants, run
`/migrations/61` from the matching migrations image before upgrading, as
the Kafka README describes. This includes clusters that run no Kafka but
have the kafka-operator package, from the `paas` bundle or
`bundles.enabledPackages`. Their Strimzi CRDs still store `v1beta2` even
with no objects. The migration converts Strimzi resources and stored
Helm references to `v1`. It stamps platform version 62. Running it
manually also skips earlier migrations on a later move to an `isp-*`
variant. Before it stops the operators, migration 61 refuses objects
that the Strimzi 0.51 conversion tool would reject and names each one,
for example a Kafka with `.spec.kafka.resources` or with OAuth, Keycloak
or OPA settings. A failed conversion can leave the old operators stopped
until the migration succeeds and the operator release upgrades. The
failed conversion Job stays for diagnosis, but its ClusterRole, binding
and ServiceAccount are removed. A Job that is still running when the
wait times out keeps them, because the retry waits for it.

Known limitations. Migration 61 converts with the old operator stopped,
while Strimzi's conversion guide expects a running operator of 0.49 or
later. I stop it because 0.45 keeps writing the Kafka status through
`v1beta2`, but I have not checked this on a live cluster. Objects
Strimzi created keep `ownerReferences` to `v1beta2` until Strimzi 1.2
reconciles them. Deleting a Kafka before that can leave dependents
behind, and the chart's pre-delete hook covers only StrimziPodSets. The
conversion image is pulled from quay.io by digest with no values
override, so an air-gapped cluster has to mirror it under the same name.

The full offline unit run passed on Linux on
`1171d63adfafb45be34214fb9a0f565723e255fd`: 2,576 cases, no failures,
errors or skipped tests. Later changes were checked on `69c704499fa4`
with the Bats tests for migration 61, the migration runner, the Kafka
hooks and the Kafka backup scripts (102), the platform Helm suite (310
tests) and the Kafka Helm suite (91 tests). After the rebase onto `main`
at `5a5d5cd3d85f`, `a48a2f259947` passes the same Bats tests (115) and
the platform and Kafka Helm suites (326 and 103 tests). It also passes
the new check against added `documentIndex` selectors. I have not
validated this revision on a live cluster.

Closes #4365

### Screenshots

<!-- REQUIRED for UI changes: attach screenshots or screen recordings
demonstrating
the visual impact of your changes. PRs with UI changes without
screenshots will not be merged. -->

Not a UI change.

### Downstream repositories

<!--
Cozystack is upstream for repositories that are NOT kept in sync with it
automatically, and nothing in CI compares the two sides, so a change
here can break them silently.

Which change forces what, and which file to touch, is the trigger map in
docs/agents/contributing.md under "Downstream Repositories". Walk it
before you tick anything.

IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM
TO FILL IN:

1. Walk the trigger map against the actual diff of this PR, file by
file. Do not decide from the PR title or from your memory of what you
changed.
2. For every repository you tick, open the follow-up PR there and link
it on the same line. A ticked box with no link claims work that does not
exist, which is worse than an empty box. Search that repository for an
open PR or issue covering it first, and link that instead of filing a
duplicate.
3. When the follow-up is out of scope, or needs a decision that is not
yours to make, open an issue in that repository instead, link that, and
say so in the PR body. Do not push a speculative PR into another
repository just to fill a line here.
4. Do not tick "No downstream repository is affected" to make the
checklist go away. If you are unsure, leave every box empty and say so
in the PR body, so a human decides.
-->

- [ ] No downstream repository is affected by this change
- [x] [cozystack/website](https://github.com/cozystack/website) -
follow-up: https://github.com/cozystack/website/issues/805
- [ ]
[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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

The Terraform provider does not model the Kafka `version` field. The
website issue covers the upgrade notes the `default` variant needs.

### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same `type(scope):` prefix as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
feat(kafka)!: upgrade to Strimzi 1.2.0 and Kafka 4.3 by default, with Kafka 4.2 also available. Platform migration 61 converts Strimzi resources to v1 and moves Kafka 3.x applications to v4.3. Every Kafka must have confirmed KRaft state before the upgrade, including on repeat runs. Upgrade through Cozystack v1.7 first. Kafka 4 drops clients older than Kafka 2.1 and the message.format.version, message.downconversion.enable and message.timestamp.difference.max.ms topic settings, and requires segment.bytes of at least 1 MiB; the chart and the upgrade refuse a topic that breaks either rule, and a topic-metadata backup taken on Kafka 3.x restores without the removed settings and with segment.bytes raised to 1 MiB. In-place downgrades are unsupported.
```
2026-11-18 13:26:31 +03:00
Aleksei Sviridkin dbd6acba95 Merge branch 'main' into docs/release-check-b-image-pathspec
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-18 12:05:05 +03:00
Aleksei Sviridkin 5a92f1fc4e Merge branch 'main' into feat/build-provenance-attestation
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-18 11:55:28 +03:00
Aleksei Sviridkin 3b65cebea3 feat(kafka)!: run on the Strimzi v1 API and Kafka 4.x
Strimzi 1.2 serves only the v1 API and runs Kafka 4.2 and 4.3. The
node-pool hook no longer drives the ZooKeeper to KRaft migration or
the drain that freed the shared "kafka" pool name: Strimzi 1.x has no
ZooKeeper support, and the platform migration refuses to upgrade while
a ZooKeeper cluster is left. A cluster migrated earlier keeps its
"kafka" broker pool. Without the drain the hook takes seconds, so the
seven-hour install timeout goes too.

Kafka 4 rejects the topic configs it removed and a segment.bytes below
1 MiB, which Kafka 3.x accepted. A KafkaTopic that sets one stays
NotReady while the release reports Ready, so the chart refuses to
render such a topic. It reads segment.bytes the way Kafka does:
trimmed, with an optional sign, leading zeros decimal.

BREAKING CHANGE: the Kafka application accepts version v4.3 (default)
and v4.2; v3.8 and v3.9 are gone, and the platform migration moves
existing applications to v4.3.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-17 12:22:54 +03:00
Timofei Larkin c55c3928cb docs(agents): reword the section-banner comment rule
The rule is meant to reject a comment that only names the code below it
and adds nothing, such as a heading over a ClusterRole whose kind and
name already say what it is. "Banners a section" reads instead as an
objection to decoration, so it gets applied to the shape: `# == view
role ==` is rejected while `# view role`, which says exactly as little,
passes, and a heading that does orient the reader in a long file can be
rejected for its `==`.

Both places the rule appears, the in-code comments blocker and the list
of machine-authorship tells, now describe the content that is wrong
rather than its formatting. What the rules enforce is unchanged.

Assisted-by: LLM
Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
2026-11-16 13:28:17 +01:00
Aleksei Sviridkin 9cd2d3ac0f test(ci): smoke-test the tools that built images take from their base
The CSI, LINSTOR, multus, Harbor and redis-backup images call tools at
runtime that their base images or build stages install: mkfs and
mount.nfs, drbd, lvm and zfs, the CNI plugins, nginx and trivy under a
fixed uid, redis 8. A base or tool bump that drops one still builds,
and only fails once the image runs in a cluster.

The kubevirt CSI node plugin and its sidecars run inside tenant VMs on
whatever vCPU they are given, so their filesystem tools, libc and Go
entrypoints must not require more than x86-64-v2. C objects declare
that level in a GNU property note and Go binaries in their GOAMD64
build setting; a file that records neither fails the check.

Each PR build job runs the checks against the images it pushed, found
by diffing the tree's image references before and after the build.
Fork PRs are skipped because their images are not in a registry yet,
and the unit lane runs no container. A change to kubevirt-csi-node
alone, where the node sidecar tags live, now runs the kubevirt CSI
build too, and the check fails when either sidecar is missing or the
reference file cannot be read.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-16 01:07:36 +03:00
Maxim Belyy 854a3f40e4 fix(ci): limit the drifted-file bare-ref overlay to first-party images
Main can bump a third-party image together with its config, so a PR
behind it must keep the committed pair rather than take main's image
alone. Only ghcr.io/cozystack/cozystack refs, matched against an
artifact line for the same first-party image, are replaced now.

State the trade-off for first-party refs that do exist, and name the
packages that took main's images in their own annotation.

Assisted-by: LLM
Signed-off-by: Maxim Belyy <maximbel2003@gmail.com>
2026-11-14 19:54:31 +07:00
Maxim Belyy 54b76fcdf1 docs(agents): say how PR CI stamps a bare ref in a drifted file
Assisted-by: LLM
Signed-off-by: Maxim Belyy <maximbel2003@gmail.com>
2026-11-14 19:51:20 +07:00
Aleksei Sviridkin aa1448e20b docs(agents): add development principles to AGENTS.md and agent docs (#4859)
<!-- Thank you for making a contribution! Here are some tips for you:
- Use Conventional Commits for the PR title: `type(scope): description`
- Types: feat, fix, security (a fix that comes through a security
advisory), docs, style, refactor, perf, test, build, ci, chore
- Scopes are not an exhaustive list — pick the most specific scope for
the change and extend the list when a genuinely new area appears.
Examples:
- System components: dashboard, platform, operator, cilium, kube-ovn,
linstor, fluxcd, cluster-api
- Managed apps: postgres, mariadb, redis, kafka, clickhouse,
virtual-machine, kubernetes
- Development and maintenance: api, hack, tests, ci, docs, maintenance
- Breaking changes: append `!` after type/scope (`feat(api)!: ...`) or
add a `BREAKING CHANGE:` footer
- If it's a work in progress, consider creating this PR as a draft.
- Don't hesistate to ask for opinion and review in the community chats,
even if it's still a draft.
- Fixes merged to `main` reach the release lines the backport batch runs
for automatically, so do not open backport PRs by hand:
https://github.com/cozystack/cozystack/blob/main/docs/release/backports.md
-->

## What this PR does

<!-- Link the issues this PR addresses. For a complete fix targeting the
default branch, use Closes #N (Closes owner/repository#N for another
repository). Otherwise use a non-closing reference; release-branch PRs
need manual issue linking and closure when appropriate. -->

The same mistakes kept coming back in reviews of agent-written changes.
A failure was blamed on whatever changed just before it, with no
mechanism behind the claim. Commands ran against the current kubectl
context while the work moved between the management cluster and tenant
clusters. Prose edits got invented failing tests, and behavior changes
landed without any.

References and review feedback were the other source. Review corrections
were stacked as new commits instead of rewriting the change. Closing
keywords went into commits for partial fixes, while the PR itself did
not link the issue. Feedback in review bodies and conversation comments
was missed because only inline threads were read. A rerun of the fork
E2E workflow was taken as proof that an unmerged edit to that workflow
works.

I wrote these down as rules, so a review does not have to teach the same
thing again. They go into `AGENTS.md` and `docs/agents/`, which agents
and people both read, and the PR template now asks to link the issue a
PR addresses.

This also fixes my earlier advice on negated Bats assertions: such an
assertion can pass silently, but `bats` does fail it when it is the last
command of the test.

### Screenshots

<!-- REQUIRED for UI changes: attach screenshots or screen recordings
demonstrating
the visual impact of your changes. PRs with UI changes without
screenshots will not be merged. -->

### Downstream repositories

The ccp package commit template and the community contributor guide
restate parts of these rules. Both follow-ups are open issues, to be
done once this lands.

<!--
Cozystack is upstream for repositories that are NOT kept in sync with it
automatically, and nothing in CI compares the two sides, so a change
here can break them silently.

Which change forces what, and which file to touch, is the trigger map in
docs/agents/contributing.md under "Downstream Repositories". Walk it
before you tick anything.

IF YOU ARE AN AI AGENT OR AN LLM, THIS IS PART OF THE TASK, NOT A FORM
TO FILL IN:

1. Walk the trigger map against the actual diff of this PR, file by
file. Do not decide from the PR title or from your memory of what you
changed.
2. For every repository you tick, open the follow-up PR there and link
it on the same line. A ticked box with no link claims work that does not
exist, which is worse than an empty box. Search that repository for an
open PR or issue covering it first, and link that instead of filing a
duplicate.
3. When the follow-up is out of scope, or needs a decision that is not
yours to make, open an issue in that repository instead, link that, and
say so in the PR body. Do not push a speculative PR into another
repository just to fill a line here.
4. Do not tick "No downstream repository is affected" to make the
checklist go away. If you are unsure, leave every box empty and say so
in the PR body, so a human decides.
-->

- [ ] 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:
- [x] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up:
[issue #29](https://github.com/cozystack/ccp/issues/29)
- [ ] [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:
- [x] [cozystack/community](https://github.com/cozystack/community) -
follow-up: [issue
#125](https://github.com/cozystack/community/issues/125)

### Release note

<!--  Write a release note:
- Explain what has changed internally and for users.
- Start with the same `type(scope):` prefix as in the PR title
- Follow the guidelines at
https://github.com/kubernetes/community/blob/master/contributors/guide/release-notes.md.
-->

```release-note
docs(agents): write recurring review findings down as agent rules covering root-cause evidence, explicit cluster targets, tests for behavior changes, commit and issue references, and review feedback outside inline threads.
```
2026-11-14 00:42:14 +03:00
myasnikovdaniil a427ceb582 ci: run only the backport-batch tests for a backport-batch change (#5287)
## What this PR does

Stacked on #5288, merge that one first.

PR touching only `cmd/backport-batch` was treated as code change, so it
rebuilt every image, installed platform in e2e sandbox and ran full
chainsaw suite plus whole unit lane. #5283 (one-line test fix) spent 3.5
hours in that e2e and hit job timeout. And backport-batch go tests were
running on every code PR, whatever it touched.

- plan job `code` output is now false when every changed path is under
`docs/`, `cmd/backport-batch/` or `cmd/api-gate/` (CI-only tools, no
image builds them). Builds, finalize and e2e are skipped and `E2E Tests`
posted green, same as for docs-only PRs. `e2e-fork.yaml` skips on same
prefixes, `hack/gate-concurrency-contract.bats` fails if two lists
diverge.
- `hack/build-matrix.sh` and `hack/select-e2e.sh` don't escalate to full
rebuild or full suite because of these two dirs, so mixed PR is scoped
by its other paths. Other `cmd/` dirs still escalate.
- `test-backport-batch` removed from `make unit-tests`. Checks job runs
it only when diff touches path from `cmd/backport-batch/test-inputs.txt`
(tool itself, in-repo packages it imports, docs pages its tests read,
`go.mod`, `go.sum`). `TestInputsListed` compares this list with `go list
-deps -test` and fails when import is missing there.
- new `docs` output keeps bats lane for docs changes and drops it for
tool-only ones.
- includes test fix from #5283 (pin run attempt in
`TestReportDedupAndTrust`), this PR replaces it.

### Screenshots

### 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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
ci: changes only in docs/, cmd/backport-batch/ or cmd/api-gate/ don't build images and don't run e2e anymore, backport-batch tests run only when their inputs change.
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Bug Fixes**
* CI now skips builds, E2E tests, and full-pipeline checks for changes
limited to documentation and designated CI-only tools.
* Backport-batch tests run when relevant files change, without being
included in the general unit-test target.
* Changes to other command-line tools continue to trigger the
appropriate build and E2E checks.

* **Documentation**
* Clarified how documentation, dashboard, and backport-batch changes
affect test selection.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-13 23:40:56 +03:00
myasnikovdaniil aa36d3fad6 fix(kubernetes)!: remove the talos block and other leftovers of the worker pool split (#5191)
## What this PR does

Cleanup after the Kubernetes app was split into `Kubernetes` (control
plane and addons) and `KubernetesNodes` (one release per worker pool):
what the split left behind in values, docs, templates and tests.

### Kubernetes

The `Kubernetes` application has no `talos` field any more. Worker pools
are `KubernetesNodes` resources and take their Talos release, image,
installer and registry mirrors from their own `talos` and `osImage`, so
the cluster's copies did nothing. The last one, `talos.version`, fed a
duplicate of the Talos to Kubernetes support-matrix check. The pool
chart already runs that check against the Talos release each pool
actually boots, including one picked through an `osImage` override; the
cluster's copy compared the Kubernetes version against a release no node
runs. A stored spec that still carries `talos.*` keeps rendering,
because the values schema does not close the object and the API does not
validate `spec` against it, and a unit test pins that.

The pool's check now has render coverage. Its own suite pins the
pairings it must accept, and a bats test renders the refusals through
`talos.version`, `osImage.factory.version` and `osImage.builtin.version`
with schema validation skipped, since the schema offers no Kubernetes
version the matrix refuses.

I fixed the README and field descriptions that described behavior the
chart no longer has, or never had: a dedicated etcd cluster, a
`blockSize.matchVolume` setting that does not exist, a default `md0`
pool, the host default, the substrate mismatch behavior, and rollout
phase names. The README's Breaking Changes section becomes a pointer to
the per-release upgrade notes on cozystack.io. Unused helpers and stale
comments are removed; the chart renders the same bytes.

### KubernetesNodes

Five field descriptions and the `talos` block told users to keep them in
sync with parent fields that do not exist. NOTES warned about colliding
with a parent-managed `md0` pool, although the parent renders no pools
and `md0` is the normal name of a pool. The installer image was credited
to an upgrade Job that never runs one. The values descriptions, README
intro and NOTES now say what the chart renders today, including which
fields have no effect on `substrate: proxmox`: `storageClass`,
`diskSize`, `instanceType`, `talos.imageFactoryURL` (beyond its format
check) and `talos.imageFactoryCA`.

The render error for a pool whose MachineDeployment belongs to another
release told users to remove the pool from the parent's `nodeGroups`,
which cannot clear the conflict. It now names a remedy that works.
Split-era history is gone from Helm and test comments, along with two
`storageClass` fallbacks that can only return the value they fall back
from, a constant variable, and two `.helmignore` rules that match
nothing.

The tenant pod and service CIDRs are literals in both charts, and
nothing checked that they agree. A new bats test renders both charts and
fails when they differ.

No rendered manifest of the pool chart changes. I rendered it for the
snapshot values, GPU, kubelet-override, factory/CA, storageClass
variants and three Proxmox variants on main and on every commit, and the
output is byte-identical. The snapshot and TalosConfigTemplate hash
tests pass unchanged, so no worker rolls. YAML comments inside the
hashed machine config and machine template are left as they are for that
reason.

### The rule

`docs/agents/overview.md` gains a rule so this does not come back with
the next change: app READMEs and field descriptions describe current
behavior, a change users must act on goes to the website's upgrade page,
and a description does not ask the reader to keep it in sync with
another chart.

```release-note
[kubernetes] The Kubernetes application no longer has a `talos` field. Talos settings for workers, and the Talos to Kubernetes compatibility check, live on each KubernetesNodes pool. Existing clusters that still store `talos` values keep working; the values are ignored. KubernetesNodes field descriptions, README and install notes now describe the worker pool as it works today, including which fields have no effect on Proxmox pools.
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Configuration**
* Worker OS image, installer, and registry-mirror settings are
configured per worker pool; these settings are no longer available at
the cluster level.
* Kubernetes and Talos version compatibility is checked for each worker
pool. A worker Kubernetes version cannot be ahead of its parent cluster.
* Worker pools support KubeVirt and Proxmox, with pool-specific sizing
and disk settings.
* Rendering is refused when a pool uses a different substrate from its
cluster or conflicts with an existing worker pool owned by another
release.
  * The default cluster hostname now includes the `kubernetes-` prefix.
* Existing cluster configurations that still include Talos settings
receive a warning; those settings are no longer used.

* **Documentation**
* Updated guidance for cluster and worker-pool settings, storage,
upgrades, and version compatibility.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-14 00:34:44 +05:00
Aleksei Sviridkin 8d29097e34 Merge branch 'main' into ci/skip-tooling-paths
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-13 19:16:34 +03:00
Aleksei Sviridkin 868b97dbe6 fix(kubevirt): let tenant admins upload a VMDisk image with virtctl (#5114)
## What this PR does

A VMDisk created with `source: upload` waits in `UploadReady` for an
image, but no tenant role can fill it. `virtctl image-upload` reads the
disk PVC and CDI's PVC Prime and requests an upload token, and the
tenant roles grant neither `get` on persistentvolumeclaims nor `create`
on `upload.cdi.kubevirt.io/uploadtokenrequests`, so the command stops on
a forbidden PVC read.

`cozy:tenant:admin:base` now grants both. Tenant admins and super-admins
get them in their own namespaces through the existing RoleBindings, the
use and view tiers do not. Reading the DataVolume is already granted for
the disk's own name by the vm-disk chart's dashboard role, so no
DataVolume rule is added. The vm-disk notes print the command with
`--no-create`, because the chart has already created the DataVolume, and
the security self-assessment and threat model list the new grants.

This is the RBAC part of #3847, split out so tenants can upload while
the console upload panel and the upload proxy certificate stay in review
there. The rules, their tests, the notes change and the docs lines are
from @myasnikovdaniil, who is co-author on the commit.

Checked live on a cluster with KubeVirt v1.8.4 and CDI v1.66.1, with
virtctl v1.8.4 impersonating a user in the `<tenant>-admin` group.

- With the stock roles `virtctl image-upload dv vm-disk-<name>
--no-create` fails with `persistentvolumeclaims "vm-disk-<name>" is
forbidden`.
- With exactly these two rules added as a temporary Role, the same
command reads `prime-<uid>`, uploads a 16 MiB image and the DataVolume
reaches `Succeeded`. `get` on the DataVolume came from the vm-disk
dashboard role.
- The upload went through a port-forward to `cdi-uploadproxy` with
`--insecure`. A trusted certificate on the published proxy is the other
half of #3847 and is not changed here.

Unit tests with `helm unittest` 1.1.2, the version CI pins.
`packages/system/cozystack-basics` passes 72 of 72, against 66 on main,
and `packages/apps/vm-disk` 117 of 117, against 116. Removing the upload
token rule fails one case, and dropping `--no-create` from the notes
fails one case.

Fixes #3759

### Screenshots

Not a UI change.

### Downstream repositories

Walked the trigger map in `docs/agents/contributing.md` against the
diff. Two tenant RBAC rules, their tests, the vm-disk notes and two docs
files. No values key, schema, default, README or package change, so no
trigger map entry applies.

- [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:
- [ ] [cozystack/community](https://github.com/cozystack/community) -
follow-up:

### Release note

```release-note
fix(kubevirt): tenant admins can upload an image into a VMDisk created with source upload using virtctl image-upload. The tenant admin and super-admin roles get get on persistentvolumeclaims and create on upload.cdi.kubevirt.io/uploadtokenrequests, and the vm-disk notes print the command with --no-create.
```


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **New Features**
  * Tenant administrators can now upload images into existing VM disks.
* **Improvements**
* The displayed upload command now explicitly targets the release
namespace and avoids creating a new disk.
* **Documentation**
* Security guidance now clarifies the access needed for uploads and
notes that persistent-volume permissions remain limited by namespace
scope.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-11-13 18:12:46 +03:00
cozystack-ci[bot] f3bf92acc1 docs: add changelog for v1.7.1
Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com>
2026-11-13 12:57:32 +00:00
Aleksei Sviridkin 95364b8ba0 Merge branch 'main' into fix/tenant-cdi-upload-rbac
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-13 14:07:40 +03:00
Myasnikov Daniil 48eae9ad36 ci: run only the backport-batch tests for a backport-batch change
A pull request that changed only cmd/backport-batch built every image,
installed the platform for e2e and ran the whole unit lane, so a
one-line test fix waited hours on suites that cannot exercise it. The
backport-batch tests themselves ran on every code pull request,
although only a change to the tool, to what it imports or to the pages
its tests read can break them.

Their inputs are listed beside the tool and checked against its import
graph, because a hand-kept list that fell behind would switch the
tests off without anyone noticing.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-13 13:11:46 +05:00
Aleksei Sviridkin 39d134b3ef docs(agents): clarify E2E execution targets
Fork workflow edits are exercised only after they reach the default
branch. State that boundary so a rerun is not mistaken for testing an
unmerged workflow change. Point install checks at the shared readiness
helper rather than duplicating its implementation in the instructions.

Validation: markdownlint (MD013 excluded) and git diff --check pass.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-12 16:53:37 +03:00
Aleksei Sviridkin 7475c5af5d docs(agents): define contribution and review requirements
Keep commit history self-contained and issue links visible on the PR.
Distinguish commit-reference trailers from issue-closing references,
and reserve closing keywords for complete fixes.

Include review bodies, conversation and commit comments alongside inline
threads without imposing the same review depth on every change. Verify
feedback against current code before acting on it.

Validation: markdownlint passes with MD013 excluded, and MD041 excluded
for the PR template, whose existing first heading is level two.

Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-12 16:53:23 +03:00
Aleksei Sviridkin 1e7ba63c57 docs(agents): define testing and authoring conventions
Require tests for behavior changes without inventing failures for prose
or unchanged upstream updates. Keep new image build filenames explicit
and preserve the existing lookup policy.

Correct the assertion guidance: Bats can fail on a final negation,
while cozytest appends a successful return. Separate numeric validation
from text coercion and account for null parent maps in Helm values.

Validation: markdownlint (MD013 excluded) and git diff --check pass.

Fixes: 5137d98e71 ("test(bats): refuse a negated assertion across every suite")
Assisted-by: LLM
Signed-off-by: Aleksei Sviridkin <f@lex.la>
2026-11-12 16:52:11 +03:00
Myasnikov Daniil a97b1ee924 docs(agents): keep app READMEs and field descriptions about the present
App READMEs and values.yaml descriptions drifted into release logs:
a Breaking Changes section that collected entries from several
releases, descriptions that explained a limit by a default that no
longer exists, a roadmap phase in an API type title, and fields
documented by what they replaced. The text reaches users through the
dashboard, the API schema and the website, where history only
misleads, and nothing told an author where the history goes instead.

The rule names the place for a change users must act on, the website's
per-version upgrade page announced by a "!" title, and asks a change
that touches a README or a description to fix what is wrong there.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-12 18:03:42 +05:00
Myasnikov Daniil 90f0b043a6 fix(kubernetes)!: remove the talos block the chart no longer uses
The kubernetes chart declared a talos block (version, schematicID,
imageFactoryURL, installerRepository, registryMirrors). Workers are
KubernetesNodes pools and take every one of these from their own talos
values, so an operator who set them on the cluster got no error and no
effect. The only reader left was a copy of the Talos to Kubernetes
support-matrix check, and the pool chart already runs that check
itself, against the Talos release each pool actually boots, including
one an osImage override selects. The cluster's copy compared the
Kubernetes version against a Talos release no node runs.

The block leaves the API schema, hence the "!". Stored specs that still
carry it keep rendering: the values schema does not close the object
and the API does not validate spec against it. A helm-unittest case
pins that.

Readers outside the chart moved with it. The e2e install read
talos.schematicID from this chart's values.yaml in a best-effort block
that only warns, so removing the field would have stopped the image
cache being seeded without failing anything; it now reads the pool
chart, as the proxmox template script already does. The e2e no longer
writes a talos block into the Kubernetes CR, the spec test checks the
pool chart for the key it emits, the release checklist diffs the pool
chart's pins as well, and the catalog guard drops the two tests that
compared or read the parent's block. The null-normalization Go tests
used talos keys of the real Kubernetes schema as their fixtures; they
use oidc.mode, the same required-with-default shape under an optional
root section, and addons.cilium.valuesOverride for the free-form case.

Assisted-by: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-12 16:51:38 +05:00
Myasnikov Daniil 885752eb5a feat(release): announce a parked original once on the open batch
A park is a decision a maintainer has to act on: port what applies as
a pull request of its own, or drop the original. Listing every park in
every notify comment would make that list noise within a week, and a
park nobody hears about is a fix that silently never ships.

notify now names each park the open batch's record holds that is not
yet marked announced, and once its comment is written marks those parks
in the record with gh pr edit --body-file. It writes only while the
pull request is open and its body still carries the record notify read,
so a run that rewrote the body in between loses nothing; a mark that
fails exits 2 and the next notify names the park once more. run carries
the mark into the next record, a merged or closed carrier's too, only
while the park is the same event: merge, kind, prerequisites, commits
and files. A park that changed is news and is named again. With no
batch open nothing is named (M2); the next batch's first notify does
it.

Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-10 11:11:15 +00:00
Myasnikov Daniil ce4ab1fd2c feat(release): park an original whose dependency never reaches its line, and hold one whose dependency is pending
On 1.6, the fix in #5071 conflicts on every run: it modifies files
that the feat in #3940 added on main, and that feat never reaches the
line. The fix in #5082 builds on #5071 and on code that never comes
either. Trying them on each run says nothing a maintainer can act on,
and a conflict reads as work to do.

Edges come from the dependencies the previous commit reads. One whose
prerequisite the line or the open batch carries, whatever its rule or
label, that this run picked or found empty, or whose evidence is
present at the branch head once earlier picks moved it, is satisfied
and dropped first. A direct push, an original rules 2-4, the start, a
skip label or a drop keep out, or one itself parked never comes and
parks the original. A prerequisite still to come (a conflict, a
deferral, a workflow wait, rule 6) holds it as deferred{needs}, the
strongest kind deciding: missing, workflow, deferred, rule 6; a chain
inherits.

run, check and the metadata operations share one order: partial unit
on the batch, a direct reason, an unpicked partial, the workflow
exception, a dependency park, a wait, then the original's own state.
In the scheduled mode a workflow original whose remaining
never-dependencies are only tests or docs waits for a maintainer
instead of parking, which is the case of the release fix in #5142.
check takes the mode the open record saved, and the scheduled one
with no batch open, where a closed record's workflow waits wait on
nothing any more and the original is judged as the scheduled run
judges it. check and the record-only operations keep a partial park
the open record holds while the batch head still shows it, since only
the run's picker sees it after the picks before it. Records refuse
waits and parks that form cycles, point at later merges or contradict
each other. notify lists a wait after what decides it, from the
record alone. backport/include lifts neither park nor wait.

Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-10 11:11:15 +00:00
Myasnikov Daniil 6696953d26 fix(release): set aside the note of a pick that differs from its original
A release note describes what the original does on main. A pick git had
to fit to a line that already had part of the change, a resolution, or
a unit whose first commit came out empty no longer does the same thing,
yet its note went into the batch's release-note block with the rest,
and the changelog took it from there.

A unit now counts as changed when a surviving pick's patch-id differs
from its source or the unit's net patch-id differs from the original
merge's; the latter catches an empty first commit, which leaves no pick
to compare. A changed original's note moves under "Check these notes",
fenced and neutralised as before, with a range-diff per differing pick
and the two diffs to compare. The range-diff uses a creation factor of
999 because the default leaves a pick that lost most of its change,
#5088's test-only pick for one, unpaired. The record and the report
list such originals as changed.

Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-10 10:58:32 +00:00
Myasnikov Daniil c617a99453 fix(release): withhold or refuse a unit that does only part of its original on the line
A clean cherry-pick says nothing about whether the original landed
whole: git deletes a file the line never had without a conflict and
leaves a file the line lacks untouched. #5088 reached the 1.6 batch
that way, carrying only its test while the two deletions that are the
fix had no effect.

Every M and D path of an original is now judged at its counterpart on
the line, followed through renames on main, on the line, or both. A
modified path missing before and after, or left unchanged when the line
holds neither the original's blob nor a clean git merge-file result, is
omitted; a deleted path absent before is omitted. Content merge-file
refuses, mode changes and skipped rename detection become diagnostics
and never count as omissions; I/O failures stop the command.

The same guard runs in four places: the picker, which resets a partial
pick and parks the original; a check-time pass over every unit on the
open batch at its own first parent, whatever its label, which fails
check --cut and verify; the same pass over every unpicked original's
clean net merge, which parks a partial one with no record needed; and
fold. contained accepts the renamed path, so a fix of a renamed file
passes verify and fold. The unit mapping also closes the found() gap: a
merged original whose first pick came out empty is on the batch, not
missing.

The record moves to version 3 with parked entries and partial units,
and reports to format 2 with typed parked entries; format 1 reports
still read.

Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-10 10:58:32 +00:00
Myasnikov Daniil 2c1cb2f41c feat(release): drop an original from one line with run --drop
A fix the rules take for every line can still be wrong for one of
them, typically because it builds on code that line does not have.
The only ways to keep it out were backport/skip, which keeps it off
every line, and --defer, which holds it out of one batch: the next
batch tried it again, and a conflict that would never resolve came
back every run.

run --drop N --reason R records a drop in the line's record, bound to
the original's merge commit on main, and every later record carries
it, a new batch's included. What the open batch carries of a dropped
original comes off it the way --defer takes one off; any other drop
changes only the record, so a batch on a line that moved since stays
where it is. --undrop withdraws one. Both need an open batch, as every
write to the record does.

A drop comes after the rules and the carries: backport/skip, rules 2
to 4 or the line itself decide first and the drop stays on record,
and backport/include does not lift it. check notes a dropped original,
the body lists it, fold refuses it, and a record whose drop names
another original's merge stops every command. Each report keeps the
record's drops with the merge commit each is bound to and its reason,
held on read to the same rules, so an earlier report still says why
after an undrop.

A reason now travels from a body to terminals, bodies and comments, so
a reason or a file name in a record is believed only in the form a run
writes it, one clean line, and so is a report's diagnostic. Output
that repeats a reason, file names, a report ID or a state GitHub
reports escapes it.

Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-11-10 07:20:32 +00:00