Files
Nikita Aboltin 8732dc96cf feat(api): add configurable resources and replicas for cozystack-engine components
- cozystack-api, cozystack-controller, lineage-controller-webhook: conditional
  resources block via `{{- with .Values.*.resources }}`, defaulting to `{}` so the
  default render stays unchanged
- cozystack-controller: replicas comes from values (was hardcoded 1); the chart
  now passes --leader-elect unconditionally and grants the Lease verbs through a
  namespaced Role and RoleBinding in cozy-system (the Lease lives in the manager's
  own namespace), so raising replicas adds a standby instead of a second active
  writer over the reconcilers that patch HelmReleases, Gateways, Certificates,
  ResourceQuotas and Secrets

Signed-off-by: Nikita Aboltin <aboltin.nikita@rwb.ru>
2026-09-28 15:19:45 +03:00

40 lines
1022 B
YAML

suite: cozystack-controller resources knob
templates:
- templates/deployment.yaml
release:
name: cozystack-controller
namespace: cozy-system
# Same contract as cozystack-api: the shipped `{}` renders no resources key, so
# the default render stays byte-identical to the hardcoded chart and only an
# admin who sets the value gets requests or limits.
tests:
- it: the shipped default renders no resources key
asserts:
- isKind:
of: Deployment
- notExists:
path: spec.template.spec.containers[0].resources
- it: a set value renders on the container, not the pod
set:
cozystackController.resources:
requests:
cpu: 1m
memory: 96Mi
limits:
cpu: 500m
memory: 512Mi
asserts:
- equal:
path: spec.template.spec.containers[0].resources
value:
requests:
cpu: 1m
memory: 96Mi
limits:
cpu: 500m
memory: 512Mi