You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-31Lines changed: 26 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,8 @@ cpuFactor: 1
46
46
memoryFactor: 1
47
47
logLevel: info
48
48
concurrentWorkers: 10
49
+
persistence:
50
+
enabled: true
49
51
```
50
52
## Prerequisites
51
53
- The metrics server must be deployed in your cluster. Read more about [Metrics Server](https://github.com/kubernetes-sigs/metrics-server). This controller uses the **metrics.k8s.io** extension API group (apis/metrics.k8s.io/v1beta1)
@@ -55,53 +57,48 @@ concurrentWorkers: 10
55
57
**kube-reqsizer** has primary custom flags:
56
58
57
59
```bash
60
+
# Enable a annotation filter for pod scraping.
61
+
# True will only set requests of controllers of which PODS or NAMESPACE
62
+
# have the annotation set to "true".
63
+
# If "false", will ignore annotations and work
64
+
# on all pods in the cluster unless
65
+
# they have "false".
66
+
67
+
# reqsizer.jatalocks.github.io/optimize=true
68
+
# reqsizer.jatalocks.github.io/optimize=false
58
69
--annotation-filter bool (default true)
59
-
60
-
Enable a annotation filter for pod scraping.
61
-
Enabling this will ensure that the controller
62
-
only sets requests of controllers of which PODS or NAMESPACE
63
-
have the annotation set to "true".
64
-
If "false", will ignore annotations and work on all pods in the cluster.
65
-
66
-
# reqsizer.jatalocks.github.io/optimize=true
67
-
# reqsizer.jatalocks.github.io/optimize=false
68
70
71
+
# The sample size to create an average from when reconciling.
69
72
--sample-size int (default 1)
70
73
71
-
The sample size to create an average from when reconciling.
72
-
74
+
# Minimum seconds between pod restart.
75
+
# This ensures the controller will not restart a pod if the minimum time
76
+
# has not passed since it has started.
73
77
--min-seconds float (default 1)
74
78
75
-
Minimum seconds between pod restart.
76
-
This ensures the controller will not restart a pod if the minimum time
77
-
has not passed since it has started.
78
-
79
+
# Allow controller to reduce/increase requests
79
80
--enable-increase (default true)
80
-
Enables the controller to increase pod requests
81
-
82
81
--enable-reduce (default true)
83
-
Enables the controller to reduce pod requests
84
82
83
+
# Min and Max CPU (m) and Memory (Mi) the controller can set a pod request to. 0 is infinite
85
84
--max-cpu int (default 0)
86
-
Maximum CPU in (m) that the controller can set a pod request to. 0 is infinite
87
-
88
85
--max-memory int (default 0)
89
-
Maximum memory in (Mi) that the controller can set a pod request to. 0 is infinite
90
-
91
86
--min-cpu int (default 0)
92
-
Minimum CPU in (m) that the controller can set a pod request to. 0 is infinite
93
-
94
87
--min-memory int (default 0)
95
-
Minimum memory in (Mi) that the controller can set a pod request to. 0 is infinite
96
88
89
+
# Multiply requests when reconciling
97
90
--cpu-factor float (default 1)
98
-
A factor to multiply CPU requests when reconciling.
99
-
100
91
--memory-factor float (default 1)
101
-
A factor to multiply Memory requests when reconciling.
102
92
93
+
# How many pods to sample in parallel. This may affect the controllers stability.
103
94
--concurrent-workers (default 10)
104
-
How many pods to sample in parallel. This may affect the controller's stability.
95
+
96
+
# Persistence using Redis
97
+
--enable-persistence (default false)
98
+
--redis-host (default "localhost")
99
+
--redis-port (default "6379")
100
+
--redis-password (default "")
101
+
--redis-db (default 0)
105
102
```
106
103
107
104
### Annotations
@@ -140,8 +137,6 @@ reqsizer.jatalocks.github.io/mode=min # Sets the request to the MINIMUM of
140
137
## Limitations
141
138
142
139
- Does not work with CRD controllers (such as Argo Rollouts)
143
-
- Does not have persistent cache. Will reset cache on controller restart
144
-
145
140
# Development
146
141
## Getting Started
147
142
You’ll need a Kubernetes cluster to run against. You can use [KIND](https://sigs.k8s.io/kind) to get a local cluster for testing, or run against a remote cluster.
0 commit comments