feat(deployment)!: move replicaCount to deployment.replicas
The top-level `replicaCount` value only ever set the replica count of the Gitea Deployment, but was declared next to chart-wide settings. Moving it into the `deployment` dict completes the consolidation already done for `affinity`, `dnsConfig`, `nodeSelector`, `priorityClassName`, `resources`, `schedulerName`, `strategy`, `tolerations` and `topologySpreadConstraints`. The key was renamed from `replicaCount` to `replicas` at the same time. Every other key inside the `deployment` dict mirrors the name of the corresponding Kubernetes field, so `deployment.replicas` maps one to one onto `spec.replicas` and removes the need to remember a chart-specific alias. A deprecation check fails the release when the removed top-level value is still set. Silently ignoring it would be severe here: the release would scale back down to a single replica without any warning, and the HA guards in the PVC and config templates, which key off the replica count, would no longer apply. BREAKING CHANGE: `replicaCount` no longer exists. Use `deployment.replicas` instead. Installations that still set `replicaCount` will fail unless `checkDeprecation` is set to `false`. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -14,7 +14,7 @@ metadata:
|
||||
{{- toYaml .Values.deployment.labels | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
replicas: {{ .Values.deployment.replicas }}
|
||||
strategy:
|
||||
type: {{ .Values.deployment.strategy.type }}
|
||||
{{- if eq .Values.deployment.strategy.type "RollingUpdate" }}
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
{{- fail "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* REPLICA COUNT */}}
|
||||
{{- if .Values.replicaCount -}}
|
||||
{{- fail "`replicaCount` does no longer exist. Please refer to the changelog and configure `deployment.replicas` instead." -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/* SCHEDULER NAME */}}
|
||||
{{- if .Values.schedulerName -}}
|
||||
{{- fail "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead." -}}
|
||||
|
||||
@@ -10,7 +10,7 @@ metadata:
|
||||
{{ .Values.persistence.labels | toYaml | indent 4}}
|
||||
spec:
|
||||
accessModes:
|
||||
{{- if gt (.Values.replicaCount | int) 1 }}
|
||||
{{- if gt (.Values.deployment.replicas | int) 1 }}
|
||||
- ReadWriteMany
|
||||
{{- else }}
|
||||
{{- .Values.persistence.accessModes | toYaml | nindent 4 }}
|
||||
|
||||
@@ -28,7 +28,7 @@ stringData:
|
||||
{{- end }}
|
||||
|
||||
{{- /* multiple replicas assertions */ -}}
|
||||
{{- if gt (.Values.replicaCount | int) 1 -}}
|
||||
{{- if gt (.Values.deployment.replicas | int) 1 -}}
|
||||
{{- if .Values.gitea.config.cron -}}
|
||||
{{- if .Values.gitea.config.cron.GIT_GC_REPOS -}}
|
||||
{{- if eq .Values.gitea.config.cron.GIT_GC_REPOS.ENABLED true -}}
|
||||
|
||||
Reference in New Issue
Block a user