From ba4311012328aa281e7ccdc2522bc30827a3152a Mon Sep 17 00:00:00 2001 From: Mondo Diaz Date: Mon, 2 Feb 2026 14:37:27 -0600 Subject: [PATCH] Add PyPI cache worker config and increase memory limit - Add orchard.pypiCache config section to helm values - Set default workers to 2 (reduced from 5 to limit memory) - Bump pod memory from 512Mi to 768Mi (request=limit) - Add ORCHARD_PYPI_CACHE_* env vars to deployment template --- helm/orchard/templates/deployment.yaml | 14 ++++++++++++++ helm/orchard/values.yaml | 10 ++++++++-- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/helm/orchard/templates/deployment.yaml b/helm/orchard/templates/deployment.yaml index 53a3f78..d9eadc0 100644 --- a/helm/orchard/templates/deployment.yaml +++ b/helm/orchard/templates/deployment.yaml @@ -144,6 +144,20 @@ spec: - name: ORCHARD_DATABASE_POOL_TIMEOUT value: {{ .Values.orchard.database.poolTimeout | quote }} {{- end }} + {{- if .Values.orchard.pypiCache }} + {{- if .Values.orchard.pypiCache.workers }} + - name: ORCHARD_PYPI_CACHE_WORKERS + value: {{ .Values.orchard.pypiCache.workers | quote }} + {{- end }} + {{- if .Values.orchard.pypiCache.maxDepth }} + - name: ORCHARD_PYPI_CACHE_MAX_DEPTH + value: {{ .Values.orchard.pypiCache.maxDepth | quote }} + {{- end }} + {{- if .Values.orchard.pypiCache.maxAttempts }} + - name: ORCHARD_PYPI_CACHE_MAX_ATTEMPTS + value: {{ .Values.orchard.pypiCache.maxAttempts | quote }} + {{- end }} + {{- end }} {{- if .Values.orchard.auth }} {{- if or .Values.orchard.auth.secretsManager .Values.orchard.auth.existingSecret .Values.orchard.auth.adminPassword }} - name: ORCHARD_ADMIN_PASSWORD diff --git a/helm/orchard/values.yaml b/helm/orchard/values.yaml index 393a422..1b6492f 100644 --- a/helm/orchard/values.yaml +++ b/helm/orchard/values.yaml @@ -54,10 +54,10 @@ ingress: resources: limits: cpu: 500m - memory: 512Mi + memory: 768Mi requests: cpu: 500m - memory: 512Mi + memory: 768Mi livenessProbe: httpGet: @@ -120,6 +120,12 @@ orchard: mode: "presigned" # presigned, redirect, or proxy presignedUrlExpiry: 3600 # Presigned URL expiry in seconds + # PyPI Cache Worker settings + pypiCache: + workers: 2 # Number of concurrent cache workers (reduced to limit memory usage) + maxDepth: 10 # Maximum recursion depth for dependency caching + maxAttempts: 3 # Maximum retry attempts for failed cache tasks + # Authentication settings auth: # Option 1: Plain admin password (creates K8s secret)