gitea: move to available CPU capacity and reserve measured memory

This commit is contained in:
jenkins 2026-10-04 03:33:53 -05:00
parent dfcf75866d
commit 6ee8eb2e6c

View File

@ -90,7 +90,7 @@ spec:
serviceAccountName: gitea-vault serviceAccountName: gitea-vault
initContainers: initContainers:
- name: configure-oidc - name: configure-oidc
image: gitea/gitea:1.23 image: gitea/gitea:1.23@sha256:8b5a98abe52dacbead16eb4179c9abb7c217d523df3a75901343906ae7853357
securityContext: securityContext:
runAsUser: 1000 runAsUser: 1000
runAsGroup: 1000 runAsGroup: 1000
@ -200,30 +200,12 @@ spec:
mountPath: /data mountPath: /data
nodeSelector: nodeSelector:
node-role.kubernetes.io/worker: "true" node-role.kubernetes.io/worker: "true"
affinity: # Last-resort CPU placement while the healthy Pi pool lacks headroom.
nodeAffinity: # Restore Pi preference only after service peaks and one CI agent fit.
requiredDuringSchedulingIgnoredDuringExecution: kubernetes.io/hostname: titan-22
nodeSelectorTerms:
- matchExpressions:
- key: hardware
operator: In
values: ["rpi5"]
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
preference:
matchExpressions:
- key: hardware
operator: In
values: ["rpi5"]
- weight: 100
preference:
matchExpressions:
- key: kubernetes.io/hostname
operator: In
values: ["titan-20","titan-21"]
containers: containers:
- name: gitea - name: gitea
image: gitea/gitea:1.23 image: gitea/gitea:1.23@sha256:8b5a98abe52dacbead16eb4179c9abb7c217d523df3a75901343906ae7853357
command: ["/bin/sh", "-c"] command: ["/bin/sh", "-c"]
args: args:
- | - |
@ -246,6 +228,14 @@ spec:
name: http name: http
- containerPort: 2242 - containerPort: 2242
name: ssh name: ssh
readinessProbe:
httpGet:
path: /api/healthz
port: http
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
env: env:
- name: USER_UID - name: USER_UID
value: "1000" value: "1000"
@ -294,7 +284,7 @@ spec:
resources: resources:
requests: requests:
cpu: 500m cpu: 500m
memory: 1Gi memory: 2Gi
limits: limits:
cpu: 1500m cpu: 1500m
# Raised from 2Gi: the pod sat at 2073Mi and wedged, refusing # Raised from 2Gi: the pod sat at 2073Mi and wedged, refusing