From c34775735f048d8700b55495fd1d951fdd1b69de Mon Sep 17 00:00:00 2001 From: Mayne0213 Date: Sun, 28 Dec 2025 23:50:37 +0900 Subject: [PATCH] FIX(vpa): vpa outofsync by ignoring cpu limits - differences - Add ignoreDifferences for Deployment CPU limits - Prevents ArgoCD from detecting drift when CPU limits are null - Add RespectIgnoreDifferences syncOption --- vpa/argocd/vpa.yaml | 8 ++++++++ vpa/helm-values/vpa.yaml | 27 ++++----------------------- 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/vpa/argocd/vpa.yaml b/vpa/argocd/vpa.yaml index 8afbfc2..4d99c81 100644 --- a/vpa/argocd/vpa.yaml +++ b/vpa/argocd/vpa.yaml @@ -35,6 +35,7 @@ spec: - CreateNamespace=true - PrunePropagationPolicy=foreground - PruneLast=true + - RespectIgnoreDifferences=true retry: limit: 5 @@ -43,4 +44,11 @@ spec: factor: 2 maxDuration: 3m + # Ignore Deployment differences for CPU limits (set to null) + ignoreDifferences: + - group: apps + kind: Deployment + jqPathExpressions: + - '.spec.template.spec.containers[].resources.limits.cpu' + revisionHistoryLimit: 10 diff --git a/vpa/helm-values/vpa.yaml b/vpa/helm-values/vpa.yaml index dda7620..cf652f4 100644 --- a/vpa/helm-values/vpa.yaml +++ b/vpa/helm-values/vpa.yaml @@ -15,33 +15,14 @@ recommender: memory: 512Mi # Updater - applies recommended resource requests to pods +# Disabled because we're using updateMode: Off (recommendations only) updater: - enabled: true - replicaCount: 1 - - resources: - limits: - cpu: null - memory: 1Gi - requests: - cpu: 50m - memory: 512Mi + enabled: false # Admission Controller - injects resource requests into new pods +# Disabled because we're using updateMode: Off (recommendations only) admissionController: - enabled: true - replicaCount: 1 - - resources: - limits: - cpu: null - memory: 512Mi - requests: - cpu: 50m - memory: 256Mi - - # Generate self-signed certificate - generateCertificate: true + enabled: false # Optional: Configure default VPA behavior # metrics-server should be installed in the cluster