Skip to content
Open
Show file tree
Hide file tree
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 @@ -254,6 +254,14 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.updatePolicy.minReplicas
name: MinReplicas
priority: 1
type: integer
- jsonPath: .spec.updatePolicy.evictAfterOOMThreshold
name: OOMThreshold
priority: 1
type: string
name: v1
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -425,6 +433,14 @@ spec:
If not specified, all fields in the `PodUpdatePolicy` are set to their
default values.
properties:
evictAfterOOMThreshold:
description: |-
EvictAfterOOMThreshold specifies the time to wait after an OOM event before
considering the pod for eviction. Pods that have OOMed in less than this threshold
since start will be evicted.
format: duration
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
type: string
evictionRequirements:
description: |-
EvictionRequirements is a list of EvictionRequirements that need to
Expand Down Expand Up @@ -478,6 +494,10 @@ spec:
- Auto
type: string
type: object
x-kubernetes-validations:
- message: evictAfterOOMThreshold must be greater than 0
rule: '!has(self.evictAfterOOMThreshold) || duration(self.evictAfterOOMThreshold)
>= duration(''0s'')'
required:
- targetRef
type: object
Expand Down
20 changes: 20 additions & 0 deletions vertical-pod-autoscaler/deploy/vpa-v1-crd-gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .spec.updatePolicy.minReplicas
name: MinReplicas
priority: 1
type: integer
- jsonPath: .spec.updatePolicy.evictAfterOOMThreshold
name: OOMThreshold
priority: 1
type: string
name: v1
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -425,6 +433,14 @@ spec:
If not specified, all fields in the `PodUpdatePolicy` are set to their
default values.
properties:
evictAfterOOMThreshold:
description: |-
EvictAfterOOMThreshold specifies the time to wait after an OOM event before
considering the pod for eviction. Pods that have OOMed in less than this threshold
since start will be evicted.
format: duration
pattern: ^([0-9]+(\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$
type: string
evictionRequirements:
description: |-
EvictionRequirements is a list of EvictionRequirements that need to
Expand Down Expand Up @@ -478,6 +494,10 @@ spec:
- Auto
type: string
type: object
x-kubernetes-validations:
- message: evictAfterOOMThreshold must be greater than 0
rule: '!has(self.evictAfterOOMThreshold) || duration(self.evictAfterOOMThreshold)
>= duration(''0s'')'
required:
- targetRef
type: object
Expand Down
2 changes: 1 addition & 1 deletion vertical-pod-autoscaler/docs/flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ This document is auto-generated from the flag definitions in the VPA updater cod
| `add-dir-header` | | | If true, adds the file directory to the header of the log messages |
| `address` | string | ":8943" | The address to expose Prometheus metrics. |
| `alsologtostderr` | | | log to standard error as well as files (no effect when -logtostderr=true) |
| `evict-after-oom-threshold` | | 10m0s | duration Evict pod that has OOMed in less than evict-after-oom-threshold since start. |
| `evict-after-oom-threshold` | | 10m0s | duration The default duration to evict pod that has OOMed in less than evict-after-oom-threshold since start. |
| `eviction-rate-burst` | int | 1 | Burst of pods that can be evicted. |
| `eviction-rate-limit` | float | | Number of pods that can be evicted per seconds. A rate limit set to 0 or -1 will disable<br>the rate limiter. (default -1) |
| `eviction-tolerance` | float | 0.5 | Fraction of replica count that can be evicted for update, if more than one pod can be evicted. |
Expand Down
5 changes: 4 additions & 1 deletion vertical-pod-autoscaler/e2e/utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ var RecommenderLabels = map[string]string{"app": "vpa-recommender"}
// HamsterLabels are labels of hamster app
var HamsterLabels = map[string]string{"app": "hamster"}

// OOMLabels are labels for OOM test pods
var OOMLabels = map[string]string{"app": "oom-test"}

// SIGDescribe adds sig-autoscaling tag to test description.
// Takes args that are passed to ginkgo.Describe.
func SIGDescribe(scenario, name string, args ...interface{}) bool {
Expand Down Expand Up @@ -226,7 +229,7 @@ func NewNHamstersDeployment(f *framework.Framework, n int) *appsv1.Deployment {
DefaultHamsterReplicas, /*replicas*/
HamsterLabels, /*podLabels*/
GetHamsterContainerNameByIndex(0), /*imageName*/
"registry.k8s.io/ubuntu-slim:0.14", /*image*/
"ubuntu:25.10", /*image*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a quick grep of the kubernetes codebase, and I see they use ubuntu:latest
Unsure if it really matters though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm I always prefer to set a specific version rather than latest, but no strong opinions here

appsv1.RollingUpdateDeploymentStrategyType, /*strategyType*/
)
d.ObjectMeta.Namespace = f.Namespace.Name
Expand Down
Loading
Loading