Skip to content

Commit 23d0280

Browse files
committed
📝 docs
modified: README.md; modified: controllers/pod_controller.go
1 parent c236deb commit 23d0280

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ auto.request.operator/mode=min # Sets the request to the MINIMUM of all sa
100100
1. One or more of the samples in a certain cycle reports `0` (less than 1):
101101
1. **mode=average**: Will take the `0` into consideration.
102102
2. **mode=min**: Will consider the `0` as `1`.
103-
3. **mode=max**: Will take the `0` into consideration, but will ignore if *max=0*.
103+
3. **mode=max**: Will ignore the sample.
104104
2. **annotation-filter** is `true` (`optimize=false` is as strong as **deny**):
105105
1. A namespace has `optimize=false` but a pod has `optimize=true`:
106106
1. The controller will ignore the pod and not reconcile.

controllers/pod_controller.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,14 @@ func (r *PodReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.R
116116
sumCAddr.MaxCPU = int64(math.Max(float64(sumCAddr.MaxCPU), float64(latestC.CPU)))
117117
sumCAddr.MinCPU = int64(math.Min(float64(sumCAddr.MinCPU), float64(latestC.CPU)))
118118
} else {
119-
sumCAddr.MaxCPU = latestC.CPU
119+
// sumCAddr.MaxCPU = latestC.CPU
120120
sumCAddr.MinCPU = 1
121121
}
122122
if latestC.Memory > 0 {
123123
sumCAddr.MaxMemory = int64(math.Max(float64(sumCAddr.MaxMemory), float64(latestC.Memory)))
124124
sumCAddr.MinMemory = int64(math.Min(float64(sumCAddr.MinMemory), float64(latestC.Memory)))
125125
} else {
126-
sumCAddr.MaxMemory = latestC.Memory
126+
// sumCAddr.MaxMemory = latestC.Memory
127127
sumCAddr.MinMemory = 1
128128
}
129129
sumCAddr.CPU += latestC.CPU

0 commit comments

Comments
 (0)