Description
/area vertical-pod-autoscaler
The VPA components (e.g., recommender, updater, and admission controller) have various configurable flags. For instance, some of the recommender's flags can be found here.
However, the current VPA end-to-end (e2e) tests do not validate the behavior of these flags. Instead, they rely solely on the default flag values without testing any custom configurations. Specifically, the e2e tests deploy VPA components using a predefined deployment script (deploy-for-e2e.sh), which, for example, references the following deployment configuration for the recommender:
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: vpa-recommender
namespace: kube-system
spec:
replicas: 1
selector:
matchLabels:
app: vpa-recommender
template:
metadata:
labels:
app: vpa-recommender
spec:
serviceAccountName: vpa-recommender
securityContext:
runAsNonRoot: true
runAsUser: 65534 # nobody
containers:
- name: recommender
image: registry.k8s.io/autoscaling/vpa-recommender:1.2.2
imagePullPolicy: IfNotPresent
resources:
limits:
cpu: 200m
memory: 1000Mi
requests:
cpu: 50m
memory: 500Mi
ports:
- name: prometheus
containerPort: 8942
The above configuration, as seen in the recommender deployment template, does not pass any flags to the recommender component.
To ensure comprehensive testing and avoid potential issues, the e2e tests should:
- Incorporate additional deployments of VPA components with various flag configurations.
- Validate the behavior of these components under different flag settings.
This enhancement would help identify and prevent regressions, such as this pr, where the namespace filtering behavior was unintentionally changed from a whitelist (vpaObjectNamespace) to a blacklist (ignoredVPANamespaces).