Files
cozystack/packages/system/cozystack-controller/templates/deployment.yaml
T
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

38 lines
1.0 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: cozystack-controller
labels:
app: cozystack-controller
spec:
replicas: {{ .Values.cozystackController.replicas }}
selector:
matchLabels:
app: cozystack-controller
template:
metadata:
labels:
app: cozystack-controller
spec:
serviceAccountName: cozystack-controller
containers:
- name: cozystack-controller
image: "{{ .Values.cozystackController.image }}"
args:
- --leader-elect
{{- if .Values.cozystackController.debug }}
- --zap-log-level=debug
{{- else }}
- --zap-log-level=info
{{- end }}
{{- if .Values.cozystackController.disableTelemetry }}
- --disable-telemetry
{{- end }}
{{- with .Values.cozystackController.seaweedfsMetricsEndpoint }}
- --seaweedfs-metrics-endpoint={{ . }}
{{- end }}
{{- with .Values.cozystackController.resources }}
resources:
{{- toYaml . | nindent 10 }}
{{- end }}