feat(deployment)!: move affinity to deployment.affinity

Moving `affinity` into the `deployment` dict groups it with the other Deployment-specific values and prepares a
consistent structure for further migrations of pod-level settings.

A deprecation check is added so that existing installations fail fast with an actionable error message instead of
silently dropping the affinity rules, which would otherwise lead to pods being scheduled on unintended nodes.

BREAKING CHANGE: `affinity` no longer exists. Use `deployment.affinity` instead. Installations that still set
`affinity` will fail unless `checkDeprecation` is set to `false`.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-09-04 09:12:58 +02:00
co-authored by Copilot
parent 229ba12744
commit 150c08eabc
5 changed files with 58 additions and 8 deletions
+2 -2
View File
@@ -1127,10 +1127,10 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `schedulerName` | Use an alternate scheduler, e.g. "stork" | `""` |
| `nodeSelector` | NodeSelector for the deployment | `{}` |
| `tolerations` | Tolerations for the deployment | `[]` |
| `affinity` | Affinity for the deployment | `{}` |
| `topologySpreadConstraints` | TopologySpreadConstraints for the deployment | `[]` |
| `dnsConfig` | dnsConfig for the deployment | `{}` |
| `priorityClassName` | priorityClassName for the deployment | `""` |
| `deployment.affinity` | Affinity for the deployment. | `{}` |
| `deployment.env` | Additional environment variables to pass to containers | `[]` |
| `deployment.terminationGracePeriodSeconds` | How long to wait until forcefully kill the pod | `60` |
| `deployment.labels` | Labels for the deployment | `{}` |
@@ -1151,7 +1151,7 @@ To comply with the Gitea helm chart definition of the digest parameter, a "custo
| `secrets.admin.new.annotations` | Annotations for the admin Secret | `{}` |
| `secrets.admin.new.labels` | Labels for the admin Secret | `{}` |
| `secrets.admin.new.email` | Email of the Gitea admin user | `gitea@local.domain` |
| `secrets.admin.new.password` | Password of the Gitea admin user | `r8sA8CPHD9!bt6d` |
| `secrets.admin.new.password` | Password of the Gitea admin user. | `r8sA8CPHD9!bt6d` |
| `secrets.admin.new.username` | Username of the Gitea admin user | `gitea_admin` |
| `secrets.config.addSHASumAnnotation` | Add a pod annotation with the SHA sum of the config Secret to trigger a rollout on change | `true` |
| `secrets.config.existingSecret.enabled` | Use an already existing Secret instead of creating the config Secret | `false` |