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
UPSTREAM: 8778: VPA: Allow e2e tests to reference a custom namespace
VPA: Allow e2e tests to reference a custom namespace (kubernetes#8778)
* VPA: Allow e2e tests to reference a custom namespace
Enable VPA e2e tests to use a custom namespace via the VPA_NAMESPACE environment variable, while maintaining backward compatibility with the default kube-system namespace.
This addresses issue kubernetes#8752 by making the e2e tests consistent with the VPA components' ability to run in custom namespaces.
Changes:
- Made VpaNamespace (e2e/v1/common.go) configurable via environment variable
- Made RecommenderNamespace (e2e/utils/common.go) configurable via environment variable
- Replaced hardcoded kube-system in deleteRecommender() function
- Replaced hardcoded kube-system in webhook RoleBinding operations
The implementation follows the same pattern as PR kubernetes#7654, using environment variables with sensible defaults to enable custom configurations without breaking existing tests.
* VPA: Allow e2e tests to reference a custom namespace
Changes:
- Consolidated to single VpaNamespace variable in e2e/utils/common.go
- Added VPA_NAMESPACE environment variable support with init() function
- Replaced all hardcoded namespace references in e2e tests:
- e2e/v1/recommender.go deleteRecommender() function (1 instance)
- e2e/v1/updater.go status namespace references (10 instances)
- e2e/integration/recommender.go deployment operations (3 instances)
- e2e/utils/webhook.go RoleBinding operations (2 instances)
- Removed duplicate VpaNamespac from e2e/v1/common.go
Signed-off-by: Max Cao <[email protected]>
0 commit comments