`dnsConfig` was a top-level value although it exclusively configures the pod spec of the Gitea Deployment. With `affinity` and `env` already moved into the `deployment` dict, keeping `dnsConfig` at the root level leaves the Deployment configuration split across two places and makes it harder to see which values end up in the rendered pod spec. Moving it into the `deployment` dict continues the consolidation of Deployment-scoped values and keeps the values structure predictable for the remaining pod-level settings. A deprecation check is added so that existing installations fail fast with an actionable error message. Without it, a custom DNS configuration would be dropped silently, which typically surfaces much later as unexplained name resolution failures inside the Gitea pod. BREAKING CHANGE: `dnsConfig` no longer exists. Use `deployment.dnsConfig` instead. Installations that still set `dnsConfig` will fail unless `checkDeprecation` is set to `false`. Co-authored-by: Copilot <copilot@github.com>
56 lines
1.7 KiB
YAML
56 lines
1.7 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: 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
|
|
asserts:
|
|
- hasDocuments:
|
|
count: 0
|