mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-04 22:21:46 +09:00
The chart nested `faultDomain`, `imageType`, `labels`, and `minimumUptimeSecondsForBounce` inside `automationOptions`, but the FoundationDBCluster CRD schema defines all four as direct children of `spec`. Flux v2.7 (helm-controller v1.4.3) used permissive client-side patch and silently dropped the unknown fields; v2.8 (helm-controller v1.5.0) does strict Server-Side Apply and rejects: failed to create typed patch object: .spec.automationOptions.<field>: field not declared in schema This was a latent bug from day one — none of those fields ever actually configured anything. Moving them one level up applies the values to where the operator looks for them. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
109 lines
3.6 KiB
YAML
109 lines
3.6 KiB
YAML
{{- $clusterDomain := index .Values._cluster "cluster-domain" | default "cozy.local" }}
|
|
---
|
|
apiVersion: apps.foundationdb.org/v1beta2
|
|
kind: FoundationDBCluster
|
|
metadata:
|
|
name: {{ .Release.Name }}
|
|
labels:
|
|
app.kubernetes.io/name: foundationdb
|
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
|
spec:
|
|
version: {{ .Values.cluster.version | quote }}
|
|
|
|
databaseConfiguration:
|
|
redundancy_mode: {{ .Values.cluster.redundancyMode }}
|
|
storage_engine: {{ .Values.cluster.storageEngine }}
|
|
|
|
processCounts:
|
|
{{- toYaml .Values.cluster.processCounts | nindent 4 }}
|
|
|
|
automationOptions:
|
|
replacements:
|
|
enabled: {{ .Values.automaticReplacements }}
|
|
|
|
# The FoundationDBCluster CRD schema places faultDomain, imageType, labels,
|
|
# and minimumUptimeSecondsForBounce as direct children of spec (siblings of
|
|
# automationOptions). The chart historically nested them under
|
|
# automationOptions; Flux v2.7's client-side patch silently dropped the
|
|
# unknown fields, so the misconfiguration had no runtime effect. Flux v2.8's
|
|
# Server-Side Apply enforces the CRD schema and rejects the apply with
|
|
# "field not declared in schema". Move all four fields to where the
|
|
# operator actually reads them.
|
|
faultDomain:
|
|
key: {{ .Values.cluster.faultDomain.key }}
|
|
{{- if .Values.cluster.faultDomain.valueFrom }}
|
|
valueFrom: {{ .Values.cluster.faultDomain.valueFrom }}
|
|
{{- end }}
|
|
|
|
imageType: {{ .Values.imageType }}
|
|
|
|
labels:
|
|
filterOnOwnerReference: false
|
|
matchLabels:
|
|
foundationdb.org/fdb-cluster-name: {{ .Release.Name }}
|
|
processClassLabels:
|
|
- foundationdb.org/fdb-process-class
|
|
processGroupIDLabels:
|
|
- foundationdb.org/fdb-process-group-id
|
|
|
|
minimumUptimeSecondsForBounce: 60
|
|
|
|
processes:
|
|
general:
|
|
{{- if .Values.customParameters }}
|
|
customParameters:
|
|
{{- range .Values.customParameters }}
|
|
- {{ . }}
|
|
{{- end }}
|
|
{{- end }}
|
|
podTemplate:
|
|
metadata:
|
|
labels:
|
|
policy.cozystack.io/allow-to-apiserver: "true"
|
|
spec:
|
|
serviceAccountName: {{ .Release.Name }}-foundationdb
|
|
securityContext:
|
|
fsGroup: {{ .Values.securityContext.runAsGroup }}
|
|
containers:
|
|
- name: foundationdb
|
|
resources: {{- include "cozy-lib.resources.defaultingSanitize" (list .Values.resourcesPreset .Values.resources $) | nindent 16 }}
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 16 }}
|
|
- name: foundationdb-kubernetes-sidecar
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 16 }}
|
|
initContainers:
|
|
- name: foundationdb-kubernetes-init
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
securityContext:
|
|
{{- toYaml .Values.securityContext | nindent 16 }}
|
|
volumeClaimTemplate:
|
|
spec:
|
|
{{- if .Values.storage.storageClass }}
|
|
storageClassName: {{ .Values.storage.storageClass }}
|
|
{{- end }}
|
|
resources:
|
|
requests:
|
|
storage: {{ .Values.storage.size }}
|
|
|
|
routing:
|
|
dnsDomain: {{ $clusterDomain }}
|
|
defineDNSLocalityFields: true
|
|
|
|
sidecarContainer:
|
|
enableLivenessProbe: true
|
|
enableReadinessProbe: true |