Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
- [Container Policy Parameters](#container-policy-parameters)
- [Update Policy Parameters](#update-policy-parameters)
- [Design Details](#design-details)
- [Configuration Level Considerations](#configuration-level-considerations)
- [Parameter Level Analysis](#parameter-level-analysis)
- [API Changes](#api-changes)
- [OOM Parameter Consolidation](#oom-parameter-consolidation)
- [Parameter Coexistence and Global Configuration](#parameter-coexistence-and-global-configuration)
- [Phase 1 (Current Proposal)](#phase-1-current-proposal)
- [Future Extensions](#future-extensions)
- [Feature Enablement and Rollback](#feature-enablement-and-rollback)
Expand Down Expand Up @@ -64,12 +68,12 @@ The configuration will be split into two sections: container-specific recommenda
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
name: oom-test-vpa
name: simple-vpa
spec:
targetRef:
apiVersion: apps/v1
kind: Deployment
name: oom-test
name: my-app
updatePolicy:
updateMode: Auto
evictAfterOOMThreshold: "5m"
Expand All @@ -84,7 +88,6 @@ spec:

### Parameter Descriptions

#### Container Policy Parameters
#### Container Policy Parameters
* `oomBumpUpRatio` (Quantity):
- Multiplier applied to memory recommendations after OOM events
Expand All @@ -97,8 +100,7 @@ spec:
- Minimum absolute memory increase after OOM events
- Setting to 0 effectively disables the OOM minimum increase
- When both `oomBumpUpRatio` = 1 and `oomMinBumpUp` = 0, OOM-based memory increases are completely disabled
- Ensures meaningful increases even for small containers

- Ensures meaningful increases even for small containers
* `memoryAggregationInterval` (duration):
- Time window for aggregating memory usage data
- Affects how quickly VPA responds to memory usage changes
Expand All @@ -117,6 +119,37 @@ Each parameter can be configured independently, falling back to global defaults

## Design Details

### Configuration Level Considerations

When designing the configuration parameters, we analyzed each parameter to determine the most appropriate configuration level:

#### Parameter Level Analysis

1. **OOM-Related Parameters (`oomBumpUpRatio`, `oomMinBumpUp`)**
- **Recommended Level**: Container-level
- **Rationale**:
- Different containers in the same pod may have different memory requirements and OOM patterns
- Memory recommendations in VPA are already handled at container level
- Consistent with how VPA handles other resource-related configurations
- While these parameters are container-level, VPA-wide configuration can still be achieved using the wildcard container name "*"

2. **Memory Aggregation Parameters (`memoryAggregationInterval`, `memoryAggregationIntervalCount`)**
- **Recommended Level**: Container-level
- **Rationale**:
- Different containers may have different memory usage patterns
- Some containers might need faster reaction times to memory changes
- Consistent with existing VPA container-level resource policies
- While `memoryAggregationInterval` and `memoryAggregationIntervalCount` are container-level, VPA-wide configuration can still be achieved using the wildcard container name "*"

3. **Eviction Parameters (`evictAfterOOMThreshold`)**
- **Recommended Level**: VPA-level
- **Rationale**:
- Eviction decisions affect the entire pod
- Pod-level operation that shouldn't vary by container
- Simpler operational model for pod lifecycle management
- Consistent with how Kubernetes handles pod evictions


### API Changes

#### Phase 1 (Current Proposal)
Expand Down Expand Up @@ -177,8 +210,8 @@ The `PerVPAConfig` feature requires VPA version 1.5.0 or higher. The feature is
Initial validation rules (CEL):
* `oomMinBumpUp` >= 0
* `memoryAggregationInterval` > 0
* `evictAfterOOMThreshold` > 0
* `memoryAggregationIntervalCount` > 0
* `evictAfterOOMThreshold` > 0

Validation via Admission Controller:
Some components cann't be validated using Common Expression Language (CEL). This validation is performed within the admission controller.
Expand All @@ -201,6 +234,7 @@ E2E tests will be included to verify:
## Implementation History

- 2025-04-12: Initial proposal
- 2025-09-06: Specify `oomBumpUpRatio` and `oomMinBumpUp` as container-level parameters
- Future: Additional parameters will be added based on user feedback and requirements

## Future Work
Expand Down
Loading