The comment justified upgradeCRDs: false by a kubectl-image-compatibility
problem in the upgrade-crds Job. That rationale is obsolete in velero 12.x:
the Job now runs the velero image natively, not a kubectl image. The real,
current reason the Job stays disabled is that CRDs ship via the chart's
crds/ directory, making the Job redundant. Correct both the values.yaml
override comment and the helm-unittest comment to match.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Re-vendors the FoundationDB Kubernetes operator chart from v2.13.0 to v2.30.0
(chart 0.2.0 -> 0.3.0), 17 minor releases forward, picking up the published
security fixes. The CRD changes (FoundationDBCluster/Backup/Restore) are
additive only -- new fields, no property removals (only the controller-gen and
foundationdb.org/release version annotations change) -- so the apps/foundationdb
FDB CR stays valid against the new operator. cozystack overrides (globalMode,
nodeReadClusterRole) remain valid. The one removed CLI flag (genericclioption)
is not used by cozystack; the chart's rbac role binding is now unconditional
(previously globalMode-gated), a no-op for cozystack which sets globalMode=true.
Adds helm-unittest coverage (the package shipped none): pins the operator image.
Adaptations:
- Makefile: clone --branch v2.13.0 -> v2.30.0; add test target
- charts/: re-vendored (operator v2.30.0 + additive CRD schema)
- tests/fdb-operator_test.yaml: new helm-unittest image pin
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
The managed-service app deploys the system openbao chart, whose server
image follows that chart's appVersion (now v2.5.1). The app Chart.yaml
appVersion ships verbatim on the openbao app CR, so leaving it at 2.5.0
makes every instance misreport its running OpenBAO version.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Re-vendors the openbao-helm chart from 0.25.3 to 0.25.7 (app v2.5.0 -> v2.5.1),
the latest in the ^0.25 line the Makefile pins, picking up the v2.5.1 security
fix. cozystack overrides (injector + csi disabled) stay valid and render
nothing, so the changed surface is the openbao server StatefulSet image only.
Widening past 0.25.x to 0.28.x (app v2.5.5) would need a CHART_VERSION constraint
change plus a 0.26/0.27/0.28 changelog review and is intentionally left out.
Adds helm-unittest coverage (the package shipped none): pins the server image
and the injector/csi-disabled invariants.
Adaptations:
- charts/: re-vendored via make update (helm pull openbao ^0.25 -> 0.25.7)
- Makefile: add test target
- tests/openbao_test.yaml: new helm-unittest coverage
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Bumps every supported Kubernetes minor in the apps/kubernetes version map to its
latest upstream patch, picking up the published Go-stdlib / x/net fixes in the
control-plane component images:
- v1.35: v1.35.1 -> v1.35.6
- v1.34: v1.34.4 -> v1.34.9
- v1.33: v1.33.8 -> v1.33.13
- v1.32: v1.32.12 -> v1.32.13
v1.31 and v1.30 already track their latest patch (.14). The major/minor enum is
unchanged, so the generated values schema, CRD and README are untouched
(make generate is a no-op).
The version range is intentionally held at v1.30-v1.35 and does NOT advance to
v1.36: KubeVirt 1.8.2 rejects the kubelet checksum on Kubernetes 1.36 (int32 CRD
validation), leaving tenant VMIs stuck Scheduled. The kamaji bump to 26.6.4-edge
raises KubeadmVersion to v1.36.0, so hack/update-versions.sh would otherwise add
v1.36 here -- that expansion is deferred until the KubeVirt regression is fixed.
The script also caps the top minor at the exact KubeadmVersion (v1.35.0); v1.35
is set to the latest patch (v1.35.6) by hand instead, matching the existing
practice of running a patch above the kubeadm tool version.
The OS-package advisories in the scan live in the ubuntu-container-disk worker
images; those clear when the release pipeline rebuilds them on the floating
ubuntu noble/current base (no source change needed -- the base is not pinned).
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Per-app TLS issues a per-release self-signed CA, but the only objects
that carry ca.crt — the cert-manager CA and leaf Secrets — also carry
private keys. Granting a tenant read on those to obtain the trust
anchor also hands over a server or CA private key.
Add cozy-lib.tls.caCertSecret, which renders a canonical Opaque Secret
holding only ca.crt and labelled internal.cozystack.io/tenantresource=
true. The tenantsecret registry surfaces label-bearing Secrets under
core.cozystack.io/tenantsecrets, which the base tenant roles already
grant, so tenants reach the trust anchor without any grant on a Secret
that contains tls.key. The helper fails closed on empty input and
refuses any PEM carrying private key material.
Covered by helm-unittest in the cozy-lib test chart.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Refreshes the monitoring image anchors onto current upstream to clear the
published advisories carried by the stale pins.
- grafana image: base grafana/grafana 11.4.0 -> 11.6.15 (latest 11.x). The
rebuild clears the Go-dependency advisories in the grafana binary (x/crypto,
moby/spdystream, jackc/pgx/v5, russellhaering/goxmldsig, buger/jsonparser,
golang-jwt/jwt/v4, getkin/kin-openapi). It stays on the 11.x line rather than
12.x to keep the bundled panel plugins compatible (grafana-worldmap-panel is
deprecated upstream) and avoid a dashboard-schema migration.
- victorialogs-datasource plugin: v0.14.1 -> v0.28.0 (grafanaDependency
>=10.4.0, so it loads on 11.6.15).
- alerta-web: 9.0.4 -> 9.1.0, clearing the python cryptography advisory.
- images/grafana.tag: re-pinned to the rebuilt multi-arch digest.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Rebuilds the e2e test sandbox on current upstream to clear the published
advisories (containerd, helm, go-git, moby/spdystream, Go stdlib) carried by the
stale tool binaries and base layers:
- base: ubuntu 22.04 -> 24.04; netcat -> netcat-openbsd, since `netcat` is a
candidate-less virtual package on 24.04
- kubectl: 1.33.2 -> 1.33.13, staying on the 1.33 line that the e2e control
plane pins at v1.33.12, so client/server skew is unchanged
- talosctl: 1.10.4 -> 1.13.5, aligning the client with the v1.13.x Talos nodes
the sandbox provisions
- helm: 3.18.3 -> 3.21.2 (latest helm 3); the e2e flow drives the v3 CLI, so it
stays on the 3.x line rather than moving to the breaking 4.x
- yq: 4.44.3 -> 4.53.3
- values.yaml: re-pinned to the rebuilt multi-arch digest
crust-gather and cozyhr already track their latest releases; flux and mc install
the current release at build time.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Refreshes the core/talos asset/profile layer onto current upstream to clear the
published advisories the scanner flagged in the stale pinned images.
- profiles: regenerated by hack/gen-profiles.sh v1.13.5, moving the base
installer and every system extension to the v1.13.5 line (installer v1.13.0 ->
v1.13.5; amdgpu/i915/drbd/zfs to their -v1.13.5 builds; amd-ucode and the
firmware blobs to the 20260519/20260512 snapshots). v1.13.5 rebuilds the
installer on the Go 1.26.4 toolchain and current runtime (kernel, containerd,
runc, OpenSSL), clearing the Go and libcrypto advisories compiled into the
stale v1.13.0 installer.
- matchbox: base image quay.io/poseidon/matchbox v0.10.0 -> v0.11.0, clearing
the libcrypto3 advisories in the matchbox runtime.
cozy-talos ships no runtime templates -- it drives the node image / installer /
matchbox asset builds. The Talos installer and matchbox images are rebuilt from
these sources by the release asset pipeline (the privileged imager build), which
also re-pins the generated matchbox digest; this change is the source bump.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
TEMPORARY revert. Restoring persistent EFI/TPM state (4cc60e3) makes
windows.11/2k22/2k25 VMs get a backend-storage PVC that is ReadWriteOnce on the
default StorageClass, which pins the VM to its node and blocks live-migration and
node drains (with evictionStrategy: LiveMigrate this can stall cluster upgrades).
See #3005.
Strip persistent EFI/TPM from the preferences again, but with `yq del` so an
emptied preferredTPM stays `{}` (the v1.8 CRD rejects null) — the bug the original
sed strip caused. Secure Boot and the vTPM stay present, just non-persistent.
Stopgap until vm-state can request an RWX backend (RWX-Block via the upstream
KubeVirt change, or an RWX-Filesystem vmStateStorageClass).
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <andrei.kvapil@aenix.io>
Re-vendors the coredns Helm chart from 1.43.2 to 1.46.0 (chart appVersion
1.12.3 -> 1.13.1), picking up the chart-tooling improvements (1.46 ServiceMonitor
options, 1.45 customAnnotations/dnsConfig/podLabels/dnsPolicy, 1.44 multicluster
RBAC).
This is a chart-only refresh: the running CoreDNS image is deliberately KEPT at
registry.k8s.io/coredns/coredns:v1.12.4. It is pinned to the 1.12 line that
matches the Kubernetes-bundled kube-dns replacement, and v1.12.4 is the latest
patch of that line (itself a security release). Advancing the image to the
chart's 1.13.1 appVersion (or newer) would break the deliberate alignment with
the bundled CoreDNS version and is a separate platform decision, not part of
this chart refresh. The kube-dns overrides (k8sAppLabelOverride, service.name,
serviceAccount.name) stay valid and the rendered Deployment still uses v1.12.4.
Pins the update target to --version 1.46.0 for reproducible re-vendoring.
Note: this does NOT close#2899 -- that ticket asks to advance the coredns
*image* for CVE remediation, which conflicts with the kube-dns version
alignment. Whether to move the bundled CoreDNS line forward (and thus the image)
is a platform-level call, left open on the issue.
Adaptations:
- charts/: re-vendored via make update (helm pull coredns --version 1.46.0; upstream tests dropped per the existing recipe)
- Makefile: pin update target to --version 1.46.0
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
The vm-disk pvc-resize, cozystack-api, seaweedfs and vm-instance update
hooks (whose alpine/k8s image this PR refreshes) ran as root with no
securityContext. Add a pod-level runAsNonRoot + runAsUser 65534 +
seccompProfile RuntimeDefault and a container-level
allowPrivilegeEscalation: false + capabilities drop ALL, mirroring the
dashboard adopt hook. kubectl needs no root, so this is behavior-neutral.
Each hook is lookup-gated; pin the securityContext in a per-chart
helm-unittest that mocks the gating object (DaemonSet / PVC / Service) via
kubernetesProvider so the guard renders without a cluster. vm-disk and
vm-instance had no Makefile test target, so add 'test: helm unittest .' to
both so CI runs the new suites.
Scope note: other kubectl hooks on clastix/kubectl (mariadb, keycloak,
kubernetes, tenant) are untouched here — they are not part of this
alpine/k8s refresh and belong to a separate hardening pass.
Also fix the vm-disk resize hook's backoffLimit: it was nested under the
pod spec (silently ignored, leaving the Job at the default 6 retries)
instead of Job.spec. Move it to Job.spec and pin it in the test.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Re-vendors the nats Helm chart from 1.3.13 to 1.3.16 (app 2.11.8 -> 2.11.10),
the latest patch in the 1.3 line, picking up the published security fixes plus
upstream bug fixes (route-reconnect storms, stream interest loss when lowering
max-connections, JetStream meta performance). Pins the update target to
--version 1.3.16 so make update stays on the 1.3 line instead of jumping to the
2.x chart restructure. The cozystack overrides (PVC retention policy, cluster
routeURLs domain, prometheus exporter PodMonitor) stay valid.
Adds helm-unittest coverage (the package shipped none): pins the server image,
the PVC retention policy, and the PodMonitor invariant.
Adaptations:
- charts/: re-vendored via make update (helm pull nats --version 1.3.16)
- Makefile: pin update target to --version 1.3.16; add test target
- tests/nats_test.yaml: new helm-unittest coverage
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
When the platform signals shared wildcard issuance via
_cluster.wildcard-issue, the publishing controller (Release.Namespace ==
expose-ingress) renders one cert-manager Certificate for <root-host> +
*.<root-host>. The resulting Secret is served as the controller's default
SSL certificate and the existing wildcard-secret-name consumption path
makes the system services drop per-host ACME. The Certificate uses the
DNS-01 ClusterIssuer that cert-manager-issuers already renders in dns01
mode, so no per-tenant Issuer is minted. Only the publishing controller
renders it — the Secret must be same-namespace for ingress-nginx to read
it.
Part of #2811.
Signed-off-by: Aleksei Sviridkin <f@lex.la>
On the default ingress-nginx path (gateway.enabled=false) a DNS-01 solver
still minted a per-host ACME certificate for every system service, hitting
Let's Encrypt rate limits once a deployment exceeds ~50 endpoints. Add an
opt-in publishing.certificates.wildcard toggle (default false) and compute,
in apps.yaml, an effective wildcard secret name plus a wildcard-issue
signal: when enabled with solver=dns01 and no operator-provided
wildcardSecretName, the platform targets one shared wildcard cert
(*.<root-host> + <root-host>) instead of per-host certs.
Issuance is off by default because a single-label wildcard does not cover
a custom service host outside *.<root-host> (e.g. a keycloak ingress.host,
harbor host, or grafana host pointed at another domain); enabling it would
otherwise switch such a host to the controller's default certificate and
serve the wrong certificate. The operator-provided (BYO) name always wins
and never triggers issuance; http01 cannot issue wildcards; and the
Gateway API path issues its own wildcard via the controller, so all three
are excluded. This reuses the existing wildcard-secret-name consumption
path, so no per-service ingress template changes are needed.
Part of #2811.
Signed-off-by: Aleksei Sviridkin <f@lex.la>
VPA 1.4 deprecated updateMode Auto as an alias for Recreate that will be
removed in a future API version. The vpa-for-vpa VerticalPodAutoscalers
still used Auto; switch them to the explicit Recreate (behavior-identical
today) and pin it in helm-unittest so the deprecated value cannot creep
back.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Re-vendors the cowboysysop vertical-pod-autoscaler chart from 10.0.0 to 11.1.1
(app 1.3.0 -> 1.5.0), moving the VPA components to registry.k8s.io/autoscaling
images at 1.5.1 and picking up the published security fixes. The values schema
keeps every cozystack override valid: the recommender's prometheus storage
config (storage, prometheus-address, container labels), the crds.enabled=false
gate, and the updater/admissionController resource blocks.
The upstream chart's 11.0 default switched the bundled CRD-install Job image to
bitnamilegacy/kubectl, but cozystack already overrides crds.image to
docker.io/alpine/k8s AND disables the Job (crds.enabled=false), so no Bitnami
image is ever pulled. VPA 1.5 deprecations (humanized memory flag, UpdateMode
Auto) are not used by cozystack.
Adds helm-unittest coverage (the package shipped none): pins the recommender's
prometheus-storage args, the non-Bitnami registry.k8s.io image, and the
crds.enabled=false -> no CRD-install Job invariant. Pins the update target's
helm pull to an explicit chart version.
Adaptations:
- charts/: re-vendored via make update (helm pull vpa --version 11.1.1)
- Makefile: pin update target to --version 11.1.1; add test target
- tests/vpa_test.yaml: new helm-unittest coverage
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Re-vendors the velero chart from 11.0.0 to 12.0.3 (app 1.17.0 -> 1.18.1) and
moves the backup-plugin initContainers to the matching releases:
velero-plugin-for-aws v1.12.1 -> v1.14.1 (the release that bumps to velero
1.18.1) and kubevirt-velero-plugin v0.8.0 -> v0.9.0. The chart-major bump's
values-schema changes are backward-compatible (two required fields relaxed,
one optional key added), so all cozystack overrides (upgradeCRDs,
initContainers, configuration.{features,defaultItemOperationTimeout},
deployNodeAgent) stay valid. The 1.18 "PVC selected-node" deprecation needs no
action (velero handles it transparently); the CRD changes are additive.
Adds helm-unittest coverage (the package shipped none): pins the server and
plugin image tags and the upgradeCRDs=false -> no upgrade-crds Job invariant,
which has silently regressed before. Pins the update target's helm pull to an
explicit chart version so re-vendoring is reproducible.
Note: Helm v3 does not update CRDs on `helm upgrade` (upgradeCRDs is disabled);
the 1.18 CRDs must be applied manually on existing clusters.
Adaptations:
- charts/: re-vendored via make update (helm pull velero --version 12.0.3)
- values.yaml: plugin images to velero-1.18-compatible releases
- Makefile: pin update target to --version 12.0.3; add test target
- tests/velero_test.yaml: new helm-unittest coverage
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Six further references to the alpine/k8s tools image were still pinned at
1.33.4 across the installer, the cozystack-api post-upgrade hook, the vm-disk
and vm-instance resize hooks, the vertical-pod-autoscaler CRD-install override,
and the e2e cilium leak healer. Move them all to 1.36.2 so the whole repo runs
a single current tools-image version (the two digest-pinned refs get the
matching multi-arch digest sha256:44ef4942...). Same stale-stdlib remediation
as the seaweedfs bump in this PR.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Bumps the alpine/k8s tools image used by the seaweedfs resize hook and the
kubectl hook job from 1.33.4 to 1.36.2 (current). This non-vendored override is
the effective runtime value; the vendored chart's stale 1.28.4 default is unused
and left untouched per the vendoring rules.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Bumps the etcd metrics scrape proxy from the 2021-era v0.11.0 to v0.22.0 on the
same quay.io/brancz registry that etcd-operator already standardized on. The two
flags used here (--secure-listen-address, --upstream) are core and stable across
the version range.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Refreshes the matchbox PXE image base from the 2021-era v0.10.0 to v0.11.0,
clearing the long-fixed golang.org/x/crypto and x/net versions baked into the
old build. v0.11.0 only bumps butane (v0.17->v0.18) and adds darwin arm64
artifacts; no behavior change for Talos PXE boot.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Re-vendors the HAMi vGPU chart from 2.8.1 to 2.9.0, moving the device-plugin
image to projecthami/hami:v2.9.0 and picking up the published security fixes.
The vendoring approach changed for 2.9.0: upstream now gates the scheduler and
device-plugin templates on .Values.dra.enabled and .Values.podSecurityPolicy.enabled
across ~27 files, so the previous "strip the dra/PSP values and remove the
conditionals" approach would nil-pointer at render time. Instead the dra and
podSecurityPolicy blocks are KEPT at their upstream default (enabled: false),
which cleanly disables both paths; only the unused hami-dra subchart and its
values block are removed.
Replays the indent->nindent patch on the custom Service labels block, now
extended to BOTH Services that carry the upstream defect: the device-plugin
monitor Service and the scheduler Service (the latter was previously unpatched
and would emit invalid YAML if scheduler.service.labels were set).
Adds helm-unittest coverage (the package shipped none): pins the device-plugin
image and guards the nindent patch on both Services.
Adaptations:
- Makefile: pin update to --version 2.9.0; keep dra/podSecurityPolicy blocks (drop the del); add test target; refresh vendoring notes
- charts/: re-vendored HAMi 2.9.0 (hami-dra subchart removed, deps emptied)
- charts/.../device-plugin/monitorservice.yaml + scheduler/service.yaml: replay indent->nindent
- values.yaml: refresh the upstream-values reference URL to v2.9.0
- tests/hami_test.yaml: new helm-unittest coverage
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
psmdb-operator evolves its CRD schema between minor versions; 1.22.0 adds
spec.storageScaling/storageAutoscaling, vault and other fields. Helm never
upgrades CRDs shipped in crds/, so without an explicit policy the operator
binary upgrades on an existing cluster while the live CRD stays behind and
the apiserver rejects the new fields. Opt the mongodb-operator PackageSource
into CreateReplace, consistent with etcd-operator, and add a platform test
pinning the policy.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Matches the managed MongoDB CR (`spec.crVersion`) to the psmdb-operator 1.22.0
bump so the platform tracks the deployed operator instead of running at the
N-1 skew. The 1.22.0 CR schema is additive (no new required fields), so
existing instances reconcile cleanly under SmartUpdate. PMM (disabled by
default) and the PBM 2.11.0 sidecar stay compatible with operator 1.22.0;
refreshing their image matrix is a separate apps/mongodb concern.
Adaptations:
- templates/mongodb.yaml: spec.crVersion 1.21.1 -> 1.22.0
- tests/mongodb_test.yaml: update crVersion assertion to 1.22.0
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Re-vendors the Percona Operator for MongoDB Helm chart from 1.21.2 to 1.22.0,
moving the operator image to 1.22.0 and picking up the published security
fixes. The CRD gains additive fields (native MinIO backup storage, storage
scaling) and new metrics.k8s.io RBAC. The only schema removal -- the
restore-spec `replset` string, replaced by `replsetRemapping` -- is unused by
cozystack's mongodb app (restore.yaml uses clusterName/pitr/backupSource only).
Deprecations (PSMDB 6.0, PMM2, enableVolumeExpansion) stay backward-compatible;
the watchAllNamespaces override remains valid.
Note: Helm v3 does not update CRDs on `helm upgrade`; the bumped CRD must be
applied manually on existing clusters per Percona's upgrade docs.
Adaptations:
- charts/: re-vendored via `make update` (helm pull psmdb-operator 1.22.0)
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Re-vendors the upstream csi-driver-nfs Helm chart from 4.11.0 to 4.13.3,
picking up the published security fixes in the bundled Go toolchain that the
issue enumerates. Refreshes the CSI sidecars to current sig-storage releases
(csi-provisioner v6.1.0, csi-resizer v2.0.0, csi-snapshotter/snapshot-controller
v8.4.0, livenessprobe v2.17.0, node-driver-registrar v2.15.0) and nfsplugin to
v4.13.3.
The csi-provisioner v5->v6 and csi-resizer v1->v2 majors declare a Kubernetes
1.34 minimum for the VolumeAttributesClass API, but the chart pins
--feature-gates=VolumeAttributesClass=false on both sidecars, so they skip that
API and keep running on a sub-1.34 cluster. cozystack overrides are empty so
nothing is clobbered, and helm template renders cleanly.
Adaptations:
- charts/: re-vendored via `make update` (helm pull csi-driver-nfs 4.13.3)
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Keycloak 26.6 adds zero-downtime patch upgrades, startup/liveness probes
reporting UP during DB migrations (smoother rolling updates on Kubernetes),
and a Quarkus 3.33 LTS base. Targets 26.6.3 specifically: 26.6.0/26.6.1
shipped a migration-persistence bug (server exits code 1 after async realm
migration) that is fixed in later patches.
Adaptations:
- values.yaml: image quay.io/keycloak/keycloak 26.5.2 -> 26.6.3
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Register the v1alpha1.sdn.cozystack.io aggregated APIService, grant the
cozystack-api ServiceAccount full access to CiliumNetworkPolicy (the
backing object for SecurityGroup), and let tenants self-service their
SecurityGroups: full access in the base tenant role and read access in
the view role, mirroring how apps.cozystack.io resources are exposed.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Co-authored-by: Timofei Larkin <lllamnyp@gmail.com>
State next to the hostFirewall default why the cozystack cilium image
deviates from upstream: with the IPv6 datapath disabled, upstream drops
all node IPv6 pre-policy, while the patched image hands IPv6 to the
kernel stack. Cilium host policies therefore apply to IPv4 only.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
The image build already fails on patch drift, but only when the image
is built. Check the patch against the freshly vendored upstream tag
inside make update as well, so the author of a cilium version bump sees
the drift immediately instead of at the next image build.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
Cozystack ships Cilium with the IPv6 datapath disabled
(ipv6.enabled=false) and the host firewall enabled. In this combination
upstream bpf_host.c drops all IPv6 on managed devices as unknown L3
("Unsupported L3 protocol") before any policy evaluation, in both
directions. This kills ICMPv6 Neighbor Discovery and BGP unnumbered over
link-local addresses on IPv6/L3 fabrics, and no
CiliumClusterwideNetworkPolicy can allow the traffic back because the
drop happens before policy enforcement.
Carry a BPF patch in the cozystack cilium image that adds an ETH_P_IPV6
passthrough case to the host-firewall protocol switches, mirroring the
behaviour without the host firewall: IPv6 is handed to the kernel stack
instead of dropped. IPv4 host policies remain fully enforced; node IPv6
is not filtered by Cilium.
The patch is applied with patch --fuzz=0 in a multi-stage build, so any
upstream drift in the patched context fails the image build loudly.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Aleksei Sviridkin <f@lex.la>
The system chart was bumped to Harbor 2.15.1, but the user-facing app
chart still declared appVersion 2.14.2. Since the Application type serves
appVersion as a top-level field, the platform API and dashboard misreported
the deployed Harbor version. Align appVersion with the shipped 2.15.1.
Signed-off-by: Алексей Артамонов <alexeyartamonov1987@gmail.com>
## What this PR does
Implements the tenant Flux sharding design from #2817: a new
`flux-shard-operator` system package that spreads tenant HelmReleases
across multiple helm-controller shards, so a noisy tenant (e.g. a
HelmRelease stuck in infinite remediation) cannot degrade the others.
- **Placement controller** owns the tenant→shard assignment: the unit of
placement is the tenant (all of its HelmReleases share one shard label),
distribution is greedy least-loaded weighted by HelmRelease count, with
pinned tenants, threshold-gated rebalance, paced moves, and never moving
deleting tenants. Watches are metadata-only, so the controller does not
decode the helm-controller status-patch firehose. Assignments are
recorded on tenant namespaces; HelmRelease labels remain the source of
truth on restarts.
- **Shard runtime** is provisioned by the operator: `shardCount`
helm-controller Deployments cloned from the flux-aio `flux` Deployment
and sanitised, so the image and feature-gates stay version-synced
automatically. flux-aio itself is unchanged and keeps owning everything
without a shard key.
- **CREATE-only mutating webhook** (`failurePolicy: Ignore`) stamps the
tenant's shard onto every HelmRelease at admission, so each one is born
on the correct shard regardless of creation path; any miss degrades
gracefully to the placement controller.
- The hand-rolled `flux-tenants` Deployment is retired: the operator
drains it (backfill `tenants` → `shard<i>`) and deletes it once empty;
migration 44 removes a leftover only under the same guard.
Ships with `shardCount: auto` (the default): the operator sizes the
shard count from the tenant HelmRelease count — `K = clamp(ceil(H/100),
1, min(16, T))` with hysteresis (scale up past 120 HR/shard, down under
60) — so small clusters stay at one shard (≈ today's behaviour) and
large fleets shard out automatically. An integer value pins the count
explicitly.
One deviation from the design doc: the webhook/controller scope is the
`sharding.fluxcd.io/key` label rather than
`internal.cozystack.io/tenantmodule` — every tenant HelmRelease is born
with `key=tenants` (stamped by ApplicationDefinition `release.labels`
and chart templates), so the webhook rewrites it and the placement
controller continuously relabels stragglers; `tenantmodule` covers only
the 6 tenant chart modules.
### Screenshots
Not a UI change.
### Release note
```release-note
feat(fluxcd): tenant HelmReleases are now reconciled by operator-managed helm-controller shards; the flux-shard-operator balances tenants across `shardCount` instances and retires the legacy flux-tenants deployment
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Introduced **flux-shard-operator** to shard helm-controller workloads
with deterministic tenant placement, optional rebalance controls, and
autosized shard count.
* Added a **CREATE-only mutating webhook** to stamp the correct shard
label on tenant HelmReleases.
* **Bug Fixes**
* Application updates now preserve existing **flux-shard** label
assignments to prevent unwanted shard re-stamping.
* **Chores**
* Added platform packaging for the new component, including an image
build step.
* Removed the legacy tenants deployment and added a migration to retire
it safely.
* **Tests**
* Expanded unit and chart tests for placement, provisioning, webhook
behavior, and configuration parsing.
* **Documentation**
* Added operator documentation describing configuration and metrics.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## What this PR does
During node reprovisioning in tenant Kubernetes clusters, the VMI (and
its hot-plug pod) can outlive the parent VirtualMachine. The upstream
kubevirt-csi-driver treats a missing VM as "detach succeeded", so the
hot-plug pod stays alive and keeps the infra storage device exclusively
attached to the source host — every subsequent attach of that volume
fails, on DRBD with `failed to set source device readwrite`. This was
hit repeatedly in production tenant clusters (see
kubevirt/csi-driver#182).
This PR:
- updates the pinned `kubevirt.io/csi-driver` module to the latest
upstream commit;
- backports kubevirt/csi-driver#184 into the controller wrapper: after
the upstream unpublish returns success, the wrapper re-checks
`VMI.status.volumeStatus` and, if the hot-plug is still reported there
(e.g. because the parent VM is already gone), detaches it from the VMI
directly via the `removevolume` subresource and waits until it
disappears.
The backport is self-contained in the wrapper and can be dropped once
kubevirt/csi-driver#184 merges upstream and the module pin is bumped
past it.
Credit to @mattia-eleuteri for the root-cause analysis and the upstream
fix.
### Screenshots
Not a UI change.
### Release note
```release-note
fix(csi): tenant CSI driver no longer leaves orphan hot-plug volumes exclusively attached to the source host when the VMI outlives its deleted VirtualMachine during node reprovisioning
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Enhanced hotplug volume unpublishing with automatic verification to
ensure volumes are fully detached before completion, including retry
logic with up to 2-minute timeout.
* **Dependencies**
* Updated KubeVirt API and CSI driver dependencies to latest versions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Bump the vendored Harbor Helm chart from 1.18.2 to 1.19.1, which
upgrades Harbor itself from appVersion 2.14.2 to 2.15.1.
The bump adds PodDisruptionBudget templates for the core, exporter,
jobservice, nginx, portal, registry and trivy components, improving
availability during voluntary disruptions (node drains/upgrades).
Signed-off-by: Алексей Артамонов <alexeyartamonov1987@gmail.com>
Resolve go.mod conflict: keep main's go 1.26.4 and golang.org/x/* bumps, and keep gomodules.xyz/jsonpatch/v2 v2.4.0 as a direct dependency (imported by the flux-shard-operator admission webhook) instead of main's indirect entry. go mod tidy leaves go.sum consistent.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
The shardCount description and the shard.resources value overflowed their columns, pushing the internal separators out of line. Reflow every column to its widest cell so the raw table renders cleanly.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
## What
Consolidated landing branch for a set of interdependent platform/CI
stabilization fixes. It began as the source PRs in the table below (in
dependency order) and has since grown with review-driven fixes and a few
production-behavior changes — the full current inventory is under
**Scope** below. Landing them as one unit lets CI run against the real
combined state instead of a fragile bottom-up merge train.
## Source PRs (dependency order)
| # | Commit | Source PR | Addresses |
|---|--------|-----------|-----------|
| 1 | fix(capi): startupProbe on capi-controller-manager | #2946 | capi
crashloop during cert provisioning |
| 2 | test(e2e): bucket.bats port-forward + S3 client reliability |
#2944 | flaky bucket test |
| 3 | fix(seaweedfs): restore -lock BucketClass, s3 svc name, drop
volumeSizeLimitMB | #2943 | missing bucket/access classes |
| 4 | test(e2e): in-cluster Cilium endpoint-leak healer (install + apps)
| #2874 | cilium "IP already in use" leak |
| 5 | refactor(build): mode=max registry cache + main-only warmer |
#2938 | build cache |
| 6 | ci(build): isolate each PR build on its own ephemeral runner VM |
#2939 | shared-buildkit contention |
| 7 | fix(e2e): LINSTOR post-install waits on a single 15m deadline |
#2928 | LINSTOR provisioning timeouts |
| 8 | test(metallb): assert digest-pinned image form, not version
literal | #2873 | brittle metallb assertion |
## Why consolidated
These form a dependency DAG (verified from CI logs): e.g. 2943 needs
2946, 2938 needs 2874, 2928 needs 2938/2939, 2873 needs 2928. Tested
bottom-up, each lower PR runs with none of the fixes above it and can't
go green alone. This branch carries all of them, so CI runs against the
real combined state.
## Verification status
CI is green on the latest head (`5653c30`): full-suite E2E passes
end-to-end and is reproducible (2 of 3 runs on this SHA green). The one
red run was a LINSTOR tie-breaker / DRBD-metadata infra flake on the
sandbox, unrelated to the diff — a different environmental subsystem
failed each run (details in the comments below). The earlier 3-hour
crust-gather snapshot hang is fixed in `5653c30`.
## Scope beyond the original 8
The branch has grown past the 8 source PRs above with review-driven
fixes and a few production-behavior changes. For reviewer transparency,
the full set:
**Review fixes (@lexfrei review):**
- **B1 (blocker)** — `8f41910` converts the SeaweedFS
`-lock`/`-readonly` BucketClasses and the s3 service-name override into
`patches/`, wired into `make update`, so a re-vendor no longer drops
them.
- **FU1** — `cc99230` grants the cilium leak-healer `delete` on pods
(both delete remedies were RBAC-forbidden).
- **FU3** — `014de3f` adds a unit test for the HelmRelease update
conflict-retry path.
- **FU4** — `6deddc6` makes the leak-healer refuse a disconnect for any
non-terminal owner phase, not just `Running`.
- **FU7** — `f3914d2` sets `persist-credentials: false` on the
build-cache checkout (SHA-pinning is handled repo-wide in #2849).
**Production-behavior changes (not in the table above):**
- VPA `updateMode: Auto → Initial` for etcd (`6e9ff90`) and monitoring
(`0997105`), plus `vmselect`/`vmstorage` `minAllowed` floors — stops
install-time eviction churn.
- cozystack-api: `retry.RetryOnConflict` on the Application→HelmRelease
update path (`728f676`).
**E2E robustness follow-ups:** per-test crust-gather snapshots
(`50e5f94`), EtcdBackupSchedule wait (`763b85e`), tenant-node
single-deadline wait (`9e43d45`), harbor BucketClaim 10m budget
(`d7f244f`), tenant API via LoadBalancer (`9beda4e`), crust-gather pin
(`95f42aa`).
**Not addressed (by decision):** FU2 — the s3 Service keeps
`seaweedfs.name`-based naming via patch (rendered output unchanged;
cozystack renders `fullname == seaweedfs`, so it matches the
`componentName`/`fullname` siblings in practice). FU6 — fork PR build
push is handled by the existing mirror-to-same-repo-branch workflow.
## Relates to
#2946#2944#2943#2874#2938#2939#2928#2873 — if this lands, those
can be closed; otherwise they remain the granular per-PR review path.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added CI build cache warming for main branch builds.
* Added a best-effort in-cluster Cilium endpoint self-heal watchdog for
e2e installs.
* Extended SeaweedFS COSI with object-lock support plus separate
readonly access.
* **Improvements**
* Reduced e2e install flakiness with a shared readiness deadline, safer
waits, and improved cleanup/diagnostics capture.
* Prevented install-time churn by switching VPA update mode to
**Initial**.
* Added container startup probes and updated SeaweedFS volume sizing.
* **Tests**
* Improved e2e robustness (etcd backup schedule waiting, digest-pinned
image checks, and corrected S3 port-forwarding).
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
## What this PR does
Adds an operator-facing way to serve platform services and the root
tenant's ingress under a pre-existing wildcard TLS certificate instead
of minting per-host ACME certificates. Implements the "native
references" design decided on #2812.
A single value, `publishing.certificates.wildcardSecretName`, names a
TLS Secret the operator has already created in the publishing namespace
(`tenant-root` by default). Only the name travels through the
`cozystack-values` channel — the certificate and private key are never
broadcast, unlike the public `kube-root-ca` that already rides it.
When set:
- **ingress-nginx path** (`gateway.enabled=false`): the publishing
tenant's ingress controller serves the Secret as its
`--default-ssl-certificate`, and the platform service Ingresses drop
their cert-manager cluster-issuer annotation and `tls` block. No
per-host ACME.
- **Gateway API path** (`gateway.enabled=true`): a new `TenantGateway`
cert mode, `existingSecret`, references the Secret in the wildcard/apex
listener `certificateRefs` and mints no Issuer or Certificate. Switching
into this mode garbage-collects any ACME machinery left from
`http01`/`dns01`.
Scope is the root tenant — everything is same-namespace, so no RBAC or
NetworkPolicy changes. Extending wildcard mode to child tenants needs
the Secret replicated into each tenant namespace and is left as a
follow-up.
Closes#2812. Part of #2811.
### Screenshots
N/A — no UI changes.
### Release note
```release-note
feat(platform): operators can serve platform services and the root tenant's ingress under a pre-existing wildcard TLS certificate via `publishing.certificates.wildcardSecretName`, instead of minting per-host ACME certificates
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added an "existingSecret" TLS certificate mode and a wildcardSecretRef
option for TenantGateway and platform values to use a pre-existing
wildcard TLS Secret.
* **Platform / Templates**
* Introduced operator "wildcard secret" mode across Gateway and many
Helm charts (Ingress, apps) to skip per-host ACME provisioning and
optionally wire a default SSL cert.
* **Tests**
* Added extensive chart and controller tests covering existingSecret
behavior and cert-mode transitions.
* **Documentation**
* Updated gateway docs describing the new wildcard secret mode and
requirements.
* **Chores**
* Added Helm unit test makefile targets to several packages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
The restored COSI -lock/-readonly BucketClass/BucketAccessClass and the s3
Service name override lived only as raw edits in the vendored chart tree, so
the next `make update` (rm -rf charts && curl | tar && patch) would silently
drop them again — the same way the 4.31 bump did. Capture both as patch files
under patches/ and wire them into the Makefile update target, matching the
existing s3-tls-main-port / cosi-provisioner-sa-name customizations. No
rendered output changes; this only makes the customizations survive re-vendor.
Addresses the B1 review blocker on #2948.
Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Andrei Kvapil <andrei.kvapil@aenix.io>
The crust-gather install.sh substitutes the version verbatim into both
the release-tag path and the asset filename:
releases/download/<ver>/kubectl-crust-gather_<ver>_<target>.tar.gz
The release tag is 'v0.15.2', so passing '0.15.2' 404s on the tag path
(curl exit 22) and fails the image build. The 'v0.15.2' asset variant
exists too, so the leading v satisfies both. Verified HTTP 200.
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
cozytest.sh runs each .bats as one invocation, exits on the first failing @test, and never invokes bats setup/teardown. Add a single EXIT-trap hook: on failure, snapshot the host AND every nested tenant cluster (tenantkubeconfig-*) with crust-gather into per-app dirs BEFORE cleanup — so each failure is independently inspectable (crust-gather serve) instead of one end-of-suite host-only dump; then ALWAYS run the file's cozy_cleanup() if defined.
run-kubernetes.sh gains cozy_cleanup() (delete tenant clusters, wait for PVCs to free): a failed kubernetes test otherwise leaves tens of GiB of worker-VM PVCs in tenant-test, exhausting the shared tenant-quota and cascade-failing every storage-heavy app after it. The kubernetes .bats now source run-kubernetes.sh at file scope so the parent-shell trap can reach the hook.
Ship pinned crust-gather 0.15.2 in the e2e-sandbox image; fold per-test snapshots into cozyreport.tgz.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
Auto mode evicts running etcd members to apply VPA recommendations, churning the StatefulSet (disruptive to quorum and a Cilium IP-reuse-leak trigger under load). Initial sizes at pod creation without evicting; the existing 250m/256Mi minAllowed floor covers the no-runtime-resize tradeoff. Same eviction-churn class as the monitoring VPA fix.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
In Auto mode the VPA Updater evicts running pods to apply new recommendations. During install that eviction churn recreates VictoriaMetrics pods faster than Cilium releases their endpoint IPs, tripping the cluster-pool IPAM "IP already in use" (putEndpointIdInvalid) leak that wedges a pod and stalls the install. Initial sets requests at pod creation without ever evicting, removing the trigger (the cilium-leak healer remains as defense for non-VPA churn paths).
Also raise vmstorage/vmselect minAllowed floors to 200m/512Mi: under Initial a pod is sized once at creation and never re-sized at runtime, so the floor is the safety net against the heavy query/storage tiers being left under-provisioned.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>