mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-12 23:54:01 +09:00
- 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>
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: cozystack-api
|
|
namespace: cozy-system
|
|
labels:
|
|
app: cozystack-api
|
|
spec:
|
|
replicas: {{ .Values.cozystackAPI.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app: cozystack-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: cozystack-api
|
|
spec:
|
|
tolerations:
|
|
- operator: Exists
|
|
serviceAccountName: cozystack-api
|
|
affinity:
|
|
nodeAffinity:
|
|
preferredDuringSchedulingIgnoredDuringExecution:
|
|
- weight: 100
|
|
preference:
|
|
matchExpressions:
|
|
- key: node-role.kubernetes.io/control-plane
|
|
operator: Exists
|
|
containers:
|
|
- name: cozystack-api
|
|
args:
|
|
- --tls-cert-file=/tmp/cozystack-api-certs/tls.crt
|
|
- --tls-private-key-file=/tmp/cozystack-api-certs/tls.key
|
|
image: "{{ .Values.cozystackAPI.image }}"
|
|
ports:
|
|
- containerPort: 443
|
|
name: https
|
|
volumeMounts:
|
|
- name: cozystack-api-certs
|
|
mountPath: /tmp/cozystack-api-certs
|
|
readOnly: true
|
|
{{- with .Values.cozystackAPI.resources }}
|
|
resources:
|
|
{{- toYaml . | nindent 10 }}
|
|
{{- end }}
|
|
volumes:
|
|
- name: cozystack-api-certs
|
|
secret:
|
|
secretName: cozystack-api-cert
|
|
defaultMode: 0400
|