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
This commit is contained in:
@@ -35,6 +35,7 @@ spec:
|
|||||||
- CreateNamespace=true
|
- CreateNamespace=true
|
||||||
- PrunePropagationPolicy=foreground
|
- PrunePropagationPolicy=foreground
|
||||||
- PruneLast=true
|
- PruneLast=true
|
||||||
|
- RespectIgnoreDifferences=true
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
limit: 5
|
limit: 5
|
||||||
@@ -43,4 +44,11 @@ spec:
|
|||||||
factor: 2
|
factor: 2
|
||||||
maxDuration: 3m
|
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
|
revisionHistoryLimit: 10
|
||||||
|
|||||||
@@ -15,33 +15,14 @@ recommender:
|
|||||||
memory: 512Mi
|
memory: 512Mi
|
||||||
|
|
||||||
# Updater - applies recommended resource requests to pods
|
# Updater - applies recommended resource requests to pods
|
||||||
|
# Disabled because we're using updateMode: Off (recommendations only)
|
||||||
updater:
|
updater:
|
||||||
enabled: true
|
enabled: false
|
||||||
replicaCount: 1
|
|
||||||
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: null
|
|
||||||
memory: 1Gi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 512Mi
|
|
||||||
|
|
||||||
# Admission Controller - injects resource requests into new pods
|
# Admission Controller - injects resource requests into new pods
|
||||||
|
# Disabled because we're using updateMode: Off (recommendations only)
|
||||||
admissionController:
|
admissionController:
|
||||||
enabled: true
|
enabled: false
|
||||||
replicaCount: 1
|
|
||||||
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: null
|
|
||||||
memory: 512Mi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 256Mi
|
|
||||||
|
|
||||||
# Generate self-signed certificate
|
|
||||||
generateCertificate: true
|
|
||||||
|
|
||||||
# Optional: Configure default VPA behavior
|
# Optional: Configure default VPA behavior
|
||||||
# metrics-server should be installed in the cluster
|
# metrics-server should be installed in the cluster
|
||||||
|
|||||||
Reference in New Issue
Block a user