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
Note that this doesn't prevent scaling down entirely, as Pods may get recreated for different reasons, resulting in a new recommendation being applied. See [the original AEP](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler/enhancements/4831-control-eviction-behavior) for more context and usage information.
378
379
380
+
### Limiting which namespaces are used
381
+
382
+
By default the VPA will run against all namespaces. You can limit that behaviour by setting the following options:
383
+
384
+
1.`ignored-vpa-object-namespaces` - A comma separated list of namespaces to ignore
385
+
1.`vpa-object-namespace` - A single namespace to monitor
386
+
387
+
These options cannot be used together and are mutually exclusive.
388
+
389
+
379
390
# Known limitations
380
391
381
392
* Whenever VPA updates the pod resources, the pod is recreated, which causes all
ciphers=flag.String("tls-ciphers", "", "A comma-separated or colon-separated list of ciphers to accept. Only works when min-tls-version is set to tls1_2.")
64
66
minTlsVersion=flag.String("min-tls-version", "tls1_2", "The minimum TLS version to accept. Must be set to either tls1_2 (default) or tls1_3.")
65
67
66
-
port=flag.Int("port", 8000, "The port to listen on.")
67
-
address=flag.String("address", ":8944", "The address to expose Prometheus metrics.")
68
-
kubeconfig=flag.String("kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
69
-
kubeApiQps=flag.Float64("kube-api-qps", 5.0, `QPS limit when making requests to Kubernetes apiserver`)
70
-
kubeApiBurst=flag.Float64("kube-api-burst", 10.0, `QPS burst limit when making requests to Kubernetes apiserver`)
71
-
namespace=os.Getenv("NAMESPACE")
72
-
serviceName=flag.String("webhook-service", "vpa-webhook", "Kubernetes service under which webhook is registered. Used when registerByURL is set to false.")
73
-
webhookAddress=flag.String("webhook-address", "", "Address under which webhook is registered. Used when registerByURL is set to true.")
74
-
webhookPort=flag.String("webhook-port", "", "Server Port for Webhook")
75
-
webhookTimeout=flag.Int("webhook-timeout-seconds", 30, "Timeout in seconds that the API server should wait for this webhook to respond before failing.")
76
-
registerWebhook=flag.Bool("register-webhook", true, "If set to true, admission webhook object will be created on start up to register with the API server.")
77
-
registerByURL=flag.Bool("register-by-url", false, "If set to true, admission webhook will be registered by URL (webhookAddress:webhookPort) instead of by service name")
78
-
vpaObjectNamespace=flag.String("vpa-object-namespace", apiv1.NamespaceAll, "Namespace to search for VPA objects. Empty means all namespaces will be used.")
68
+
port=flag.Int("port", 8000, "The port to listen on.")
69
+
address=flag.String("address", ":8944", "The address to expose Prometheus metrics.")
70
+
kubeconfig=flag.String("kubeconfig", "", "Path to a kubeconfig. Only required if out-of-cluster.")
71
+
kubeApiQps=flag.Float64("kube-api-qps", 5.0, `QPS limit when making requests to Kubernetes apiserver`)
72
+
kubeApiBurst=flag.Float64("kube-api-burst", 10.0, `QPS burst limit when making requests to Kubernetes apiserver`)
73
+
namespace=os.Getenv("NAMESPACE")
74
+
serviceName=flag.String("webhook-service", "vpa-webhook", "Kubernetes service under which webhook is registered. Used when registerByURL is set to false.")
75
+
webhookAddress=flag.String("webhook-address", "", "Address under which webhook is registered. Used when registerByURL is set to true.")
76
+
webhookPort=flag.String("webhook-port", "", "Server Port for Webhook")
77
+
webhookTimeout=flag.Int("webhook-timeout-seconds", 30, "Timeout in seconds that the API server should wait for this webhook to respond before failing.")
78
+
registerWebhook=flag.Bool("register-webhook", true, "If set to true, admission webhook object will be created on start up to register with the API server.")
79
+
registerByURL=flag.Bool("register-by-url", false, "If set to true, admission webhook will be registered by URL (webhookAddress:webhookPort) instead of by service name")
80
+
vpaObjectNamespace=flag.String("vpa-object-namespace", apiv1.NamespaceAll, "Namespace to search for VPA objects. Empty means all namespaces will be used. Must not be used if ignored-vpa-object-namespaces is set.")
81
+
ignoredVpaObjectNamespaces=flag.String("ignored-vpa-object-namespaces", "", "Comma separated list of namespaces to ignore. Must not be used if vpa-object-namespace is used.")
79
82
)
80
83
81
84
funcmain() {
82
85
klog.InitFlags(nil)
83
86
kube_flag.InitFlags()
84
87
klog.V(1).Infof("Vertical Pod Autoscaler %s Admission Controller", common.VerticalPodAutoscalerVersion)
0 commit comments