Files
cozystack/packages/core/installer/values.yaml
T
Myasnikov Daniil 9fe93a3d7e docs(operator): fix three claims that overstated what the code does
The static-pod note said containers built from an on-disk manifest are
unaffected "in both directions". True of the container, which the
kubelet runs from disk whatever the API says, but the mirror pod is an
ordinary API object that passes admission like any other, so a static
pod declaring a memory request above the ceiling with no limit of its
own has its mirror pod rejected -- leaving the container running with no
representation in the API. Worth naming, since kube-system is in scope
by design. The scan does cover it: a mirror pod is a live Pod.

The ReplicaSet exclusion was justified on live ones being copies of
their Deployment's template. That does not reach an ownerless
ReplicaSet, which at replicas 0 has neither pods to be seen through nor
a Deployment template standing in for it. It stays out of scope --
nothing here ships a bare ReplicaSet -- but as a gap left open rather
than one the stated reason closes.

The delete guard's comment claimed the enabled apply always adopts and
stamps a same-named foreign object. It does not when that object's spec
already matches, because then the apply is skipped entirely. The
outcome is the same one the guard gives on purpose, but it is reached by
the apply not running.

Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
2026-10-07 05:36:54 +03:00

140 lines
9.2 KiB
YAML

# Render a bare `Namespace cozy-system` resource (with PSA + identity labels).
# Off by default: helm install/upgrade callers create the namespace via
# `--create-namespace` and let the pre-install labeler hook stamp the labels.
# The top-level Makefile turns this on for the kubectl-apply release artifacts
# (_out/assets/cozystack-operator-*.yaml).
bareNamespace: false
cozystackOperator:
# Deployment variant: talos, generic, hosted
variant: talos
# Platform version this install reports (telemetry, observability). Supplied
# as deploy-time data, not baked into the image — so a release-candidate image
# can be promoted to stable by retagging alone. Injected as the
# COZYSTACK_VERSION env var on the operator; when empty the operator falls back
# to the value baked at build time. The Makefile sets this for the
# kubectl-apply release artifacts (_out/assets/cozystack-operator-*.yaml).
platformVersion: ""
# Stop the operator sending cluster telemetry (nodes, storage, packages) to
# https://telemetry.cozystack.io. This covers the OPERATOR only. The second
# collector, cozystack-controller, reports application counts and is
# configured through the platform Package — set telemetry.disabled there as
# well, or the opt-out is partial. Declared here rather than left implicit
# because the documented opt-out is a `--set` against this key.
disableTelemetry: false
image: ghcr.io/cozystack/cozystack/cozystack-operator:v1.6.0@sha256:93b305f78823b070c59ca631b213e39bd9d8a256d5c520f156a03f5f72f57a5d
platformSourceUrl: 'oci://ghcr.io/cozystack/cozystack/cozystack-packages'
platformSourceRef: 'digest=sha256:bf68208730860fa8e47f378a0260e79a0262e0783fa63ba4f7f97f57a48b2d23'
# When non-empty, overrides the operator's --helmrelease-interval flag
# (operator default: 5m). E2E sets this to 30s; production should leave empty.
helmReleaseInterval: ""
# When non-empty, overrides the operator's --helmrelease-retry-interval flag
# (operator default: 30s). Controls how fast failed install/upgrade attempts
# are retried. Decoupled from helmReleaseInterval (healthy reconcile cadence).
helmReleaseRetryInterval: ""
# When non-empty, overrides the operator's --helmrelease-install-timeout flag
# (operator default: 10m). Bounds individual k8s operations (job/hook/wait)
# during Helm install. Charts with long-running install hooks may need longer.
helmReleaseInstallTimeout: ""
# When non-empty, overrides the operator's --helmrelease-upgrade-timeout flag
# (operator default: 10m). Same semantics as helmReleaseInstallTimeout, for
# the Helm upgrade action.
helmReleaseUpgradeTimeout: ""
# When non-empty, overrides the operator's --helmrelease-max-history flag
# (operator default: 5). Number of release revisions Helm keeps per HR.
# Use 0 for unlimited; lower values reduce Secret accumulation in test clusters.
helmReleaseMaxHistory: ""
# When non-empty, overrides the operator's --system-namespace-memory-limit flag
# (operator default: 32Gi). The operator maintains a LimitRange in every system
# namespace defaulting container memory for anything that declares none.
#
# This exists for the Talos userspace OOM handler (v1.12+), which ranks cgroups
# with `memory_max.hasValue() ? 0.0 : {Besteffort: 1.0, ...}[class] *
# memory_current` and discards everything scoring zero. Only a memory *limit*
# sets memory.max and buys immunity — a request merely demotes BestEffort to
# Burstable, which under strictCgroupClassOrdering still means "killed second".
# Without this, system components are the victims whenever a tenant workload
# drives node memory PSI, because the tenant workload has limits and they do not:
# packages/apps/tenant ships tenant-range-limits, which defaults container memory
# in tenant namespaces that declare resourceQuotas. Tenant namespaces are left to
# that chart; this closes the same gap for system namespaces.
#
# Scope is every namespace a Package targets whose name does not start with `tenant-`.
# That includes kube-system, because cozystack-scheduler is installed there, so a namespace
# owned by the underlying Kubernetes distribution is defaulted like any other. Containers
# the kubelet builds from an on-disk manifest rather than from the API get no memory.max
# from this: the kubelet runs them from disk whatever the API says, so a Talos
# control-plane static pod is neither protected nor constrained by the default. Its mirror
# pod is a different matter, being an ordinary API object that passes admission like any
# other — a static pod declaring a memory request above the ceiling with no limit of its
# own therefore has its mirror pod rejected, which leaves the container running with no
# representation in the API rather than taking anything down. The scan covers that case,
# since a mirror pod is a live Pod and raises the namespace ceiling like any other.
#
# A ceiling, not a reservation, and the default is deliberately far above any real
# working set. The OOM handler discards a cgroup for having a memory.max at all,
# whatever its value, so the default buys immunity rather than a fitted ceiling —
# and a ceiling nothing reaches cannot convert a rare pressure-driven kill into a
# deterministic one, which is the failure mode this repository already carries a scar
# from (see the vertical-pod-autoscaler values). Lower it to make it bind once real
# usage is known; the scan below cannot see real usage, only declared requests.
#
# It should stay above the largest memory request in any system namespace, because a
# defaulted limit below a container's own request is rejected at admission. Setting
# it too low costs precision rather than availability: before applying, the operator
# scans each system namespace for a container that requests more than this and
# declares no limit of its own, and where it finds one it raises that namespace's
# ceiling to the request instead, logging the namespace, workload, container and both
# limits. A raised namespace still gets memory.max on its pod cgroups, which is the
# whole point — withholding the LimitRange would leave it with none.
#
# A raised ceiling drops back to this value once the oversized request has been absent
# for a grace period, not on the first scan that misses it: an empty scan is also what
# a pod between deletion and recreation looks like, and for a workload visible only as
# a live Pod (every CNPG Cluster in a system namespace builds its instance pods
# directly) an ordinary node drain produces exactly that. Lowering the ceiling under
# such a pod rejects its recreation permanently. Grep the operator log for "raising the
# default container memory limit" to find raised namespaces, and for "lowering this
# namespace's container memory ceiling" to see one come back down.
#
# Raising a namespace's ceiling raises it for every container in that namespace, not
# only the one that caused it, so it also widens the request-to-limit ratio VPA
# preserves when it rescales those containers.
#
# A container that declares its own memory limit is never touched, so a component
# that needs a ceiling other than this one states a limit in its own chart rather than
# relying on the knob.
#
# A system namespace where another LimitRange already defaults or caps container memory
# is left alone entirely, and anything the operator wrote there earlier is withdrawn.
# Two defaults in one namespace leave the effective ceiling to the order LimitRanger
# happens to iterate them, and a foreign container memory max below this default would
# have every container that declares no limit of its own rejected at admission.
#
# Set to 0 to disable, which also removes the LimitRanges the operator previously
# created.
systemNamespaceMemoryLimit: ""
# When non-empty, overrides the operator's --system-namespace-memory-request flag
# (operator default: 32Mi). Deliberately small and always set: Kubernetes defaults
# an unset request to the limit, which would have every system container reserve
# the full limit at schedule time.
systemNamespaceMemoryRequest: ""
# Name of the Secret in cozy-system namespace containing credentials for the
# platform source. When non-empty, sets spec.secretRef on the generated
# OCIRepository or GitRepository resource. Secret type depends on source kind:
# OCI (oci://...): kubernetes.io/dockerconfigjson with registry credentials.
# Git over HTTPS: Opaque secret with `username`+`password`, or `bearerToken`.
# Git over SSH: Opaque secret with `identity` (PEM private key) and `known_hosts`.
# The Secret must already exist in cozy-system before the operator reconciles;
# otherwise source-controller will report a failed condition until it is created.
# See FluxCD source-controller docs for the exact key layout per scheme.
platformSourceSecret: ''
# Generic variant configuration (only used when cozystackOperator.variant=generic)
cozystack:
# Kubernetes API server host (IP only, no protocol/port)
# Must be the INTERNAL IP of the control-plane node
# (the IP visible on the node's network interface, not a public/NAT IP)
# Used by the operator and networking components (cilium, kube-ovn)
apiServerHost: ""
# Kubernetes API server port
apiServerPort: "6443"