feat(deployment)!: split resources into deployment.gitea.resources and deployment.resources

The top-level `resources` value was applied to the Gitea container only, while its name suggested it covered the
whole pod. Kubernetes meanwhile supports pod-level resources, so a single ambiguous key can no longer express
both scopes.

Container-scoped limits and requests now live in `deployment.gitea.resources`, next to `deployment.gitea.env`,
and the new `deployment.resources` maps to the pod-level `resources` field. The pod-level block is only rendered
when set, because the field is not accepted by older API servers and would otherwise be rejected on clusters
that do not support it yet. The GOMAXPROCS derivation follows the container-scoped value and tolerates an unset
`deployment.gitea.resources`, which defaults to `null`.

The `deployment` section marker in `values.yaml` is restored as well. Without it the generated README lost its
`### deployment` heading and the manually maintained table of contents pointed at a non-existing anchor, which
made `markdownlint` fail.

BREAKING CHANGE: `resources` no longer exists. Use `deployment.gitea.resources` for container limits and
requests, or `deployment.resources` for pod-level resources. Installations that still set `resources` will fail
unless `checkDeprecation` is set to `false`.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-09-04 11:40:09 +02:00
co-authored by Copilot
parent 25b3fff3eb
commit 20de800294
6 changed files with 141 additions and 37 deletions
+34 -17
View File
@@ -292,20 +292,6 @@ gatewayAPI:
body: {}
# maxSize: 100m
## @section deployment
#
## @param resources Kubernetes resources
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
## Use an alternate scheduler, e.g. "stork".
## ref: https://kubernetes.io/docs/tasks/administer-cluster/configure-multiple-schedulers/
@@ -319,9 +305,7 @@ tolerations: []
## @param topologySpreadConstraints TopologySpreadConstraints for the deployment
topologySpreadConstraints: []
## @param priorityClassName priorityClassName for the deployment
priorityClassName: ""
## @section deployment
deployment:
## @param deployment.enabled Enable the deployment of Gitea.
## @param deployment.annotations Annotations for the Gitea deployment to be created
@@ -367,9 +351,42 @@ deployment:
# - name: VARIABLE
# value: my-value
## @param deployment.gitea.resources Compute Resources required by Gitea container. Cannot be updated.
## @skip deployment.gitea.resources.claims Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.
## @skip deployment.gitea.resources.limits Limits describes the maximum amount of compute resources allowed for this container.
## @skip deployment.gitea.resources.requests Requests describes the minimum amount of compute resources required for this container.
resources:
# claims: []
# - name: ""
# request: ""
# limits:
# ephemeral: 100Mi
# cpu: 100m
# memory: 128Mi
# requests:
# ephemeral: 100Mi
# cpu: 100m
# memory: 128Mi
## @param deployment.nodeSelector NodeSelector for the deployment
nodeSelector: {}
## @param deployment.priorityClassName priorityClassName for the deployment
priorityClassName: ""
## @param deployment.resources Resources is the total amount of CPU and Memory resources required by all containers in the pod.
## @skip deployment.resources.limits Limits describes the maximum amount of compute resources allowed.
## @skip deployment.resources.requests Requests describes the minimum amount of compute resources required.
resources: {}
# limits:
# ephemeral: 100Mi
# cpu: 100m
# memory: 128Mi
# requests:
# ephemeral: 100Mi
# cpu: 100m
# memory: 128Mi
## @param deployment.terminationGracePeriodSeconds How long to wait until forcefully kill the pod
terminationGracePeriodSeconds: 60