The top-level `strategy` value only ever configured the update strategy of the Gitea Deployment, but had its own `## @section strategy` next to chart-wide settings. Moving it into the `deployment` dict completes the consolidation already done for `affinity`, `dnsConfig`, `nodeSelector`, `priorityClassName`, `resources`, `schedulerName`, `tolerations` and `topologySpreadConstraints`, so everything that shapes the Deployment now lives in one predictable place. The parameter descriptions were rewritten while moving them. `strategy type`, `maxSurge` and `maxUnavailable` merely repeated the key names and gave readers of the generated parameter table no information at all. They now state the accepted values and that `rollingUpdate` is ignored for the `Recreate` strategy. Since the `strategy` section disappeared and `clusterDomain` moved into a new `Network` section, the manually maintained table of contents was updated accordingly, otherwise `markdownlint` fails with MD051 on the dangling link fragments. A deprecation check fails the release when the removed top-level value is still set. Silently ignoring it would be risky: a `Recreate` strategy configured to avoid two pods writing to the same `ReadWriteOnce` volume would fall back to `RollingUpdate` without any warning. BREAKING CHANGE: `strategy` no longer exists. Use `deployment.strategy` instead. Installations that still set `strategy` will fail unless `checkDeprecation` is set to `false`. Co-authored-by: Copilot <copilot@github.com>
123 lines
4.2 KiB
YAML
123 lines
4.2 KiB
YAML
suite: deprecation template (deployment)
|
|
release:
|
|
name: gitea-unittests
|
|
namespace: testing
|
|
templates:
|
|
- templates/gitea/deprecation.yaml
|
|
tests:
|
|
- it: renders nothing with the default values
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|
|
- it: fails when the removed `affinity` value is set
|
|
set:
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: kubernetes.io/os
|
|
operator: In
|
|
values:
|
|
- linux
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`affinity` does no longer exist. Please refer to the changelog and configure `deployment.affinity` instead."
|
|
- it: fails when the removed `deployment.env` value is set
|
|
set:
|
|
deployment.env:
|
|
- name: VARIABLE
|
|
value: my-value
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`deployment.env` does no longer exist. Please refer to the changelog and configure `deployment.gitea.env` instead."
|
|
- it: fails when the removed `dnsConfig` value is set
|
|
set:
|
|
dnsConfig:
|
|
nameservers:
|
|
- 192.0.2.1
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`dnsConfig` does no longer exist. Please refer to the changelog and configure `deployment.dnsConfig` instead."
|
|
- it: fails when the removed `nodeSelector` value is set
|
|
set:
|
|
nodeSelector:
|
|
foo: bar
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`nodeSelector` does no longer exist. Please refer to the changelog and configure `deployment.nodeSelector` instead."
|
|
- it: fails when the removed `priorityClassName` value is set
|
|
set:
|
|
priorityClassName: high-priority
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`priorityClassName` does no longer exist. Please refer to the changelog and configure `deployment.priorityClassName` instead."
|
|
- it: fails when the removed `resources` value is set
|
|
set:
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`resources` does no longer exist. Please refer to the changelog and configure `deployment.gitea.resources` instead."
|
|
- it: fails when the removed `schedulerName` value is set
|
|
set:
|
|
schedulerName: stork
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`schedulerName` does no longer exist. Please refer to the changelog and configure `deployment.schedulerName` instead."
|
|
- it: fails when the removed `strategy` value is set
|
|
set:
|
|
strategy:
|
|
type: Recreate
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`strategy` does no longer exist. Please refer to the changelog and configure `deployment.strategy` instead."
|
|
- it: fails when the removed `tolerations` value is set
|
|
set:
|
|
tolerations:
|
|
- key: database/type
|
|
operator: Equal
|
|
value: postgres
|
|
effect: NoSchedule
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`tolerations` does no longer exist. Please refer to the changelog and configure `deployment.tolerations` instead."
|
|
- it: fails when the removed `topologySpreadConstraints` value is set
|
|
set:
|
|
topologySpreadConstraints:
|
|
- topologyKey: kubernetes.io/hostname
|
|
asserts:
|
|
- failedTemplate:
|
|
errorMessage: "`topologySpreadConstraints` does no longer exist. Please refer to the changelog and configure `deployment.topologySpreadConstraints` instead."
|
|
- it: skips the deprecation checks when `checkDeprecation` is disabled
|
|
set:
|
|
checkDeprecation: false
|
|
affinity:
|
|
nodeAffinity: {}
|
|
deployment.env:
|
|
- name: VARIABLE
|
|
value: my-value
|
|
dnsConfig:
|
|
nameservers:
|
|
- 192.0.2.1
|
|
nodeSelector:
|
|
foo: bar
|
|
priorityClassName: high-priority
|
|
resources:
|
|
limits:
|
|
cpu: 100m
|
|
schedulerName: stork
|
|
strategy:
|
|
type: Recreate
|
|
tolerations:
|
|
- key: database/type
|
|
operator: Equal
|
|
value: postgres
|
|
effect: NoSchedule
|
|
topologySpreadConstraints:
|
|
- topologyKey: kubernetes.io/hostname
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|