Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
kubevirt.22283
0001-Allow-overwrite-the-default-DNS-service-in...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Allow-overwrite-the-default-DNS-service-in-tests.patch of Package kubevirt.22283
From e16ee53335cac0e1b36d8736077ce76b929c4c62 Mon Sep 17 00:00:00 2001 From: Vasiliy Ulyanov <vulyanov@suse.de> Date: Fri, 15 Oct 2021 16:47:59 +0200 Subject: [PATCH] Allow overwrite the default DNS service in tests Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de> --- tests/flags/flags.go | 4 ++++ tests/libnet/dns.go | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/flags/flags.go b/tests/flags/flags.go index 84fa15b8a..2d7ea01c8 100644 --- a/tests/flags/flags.go +++ b/tests/flags/flags.go @@ -51,6 +51,8 @@ var ApplyDefaulte2eConfiguration bool var DeployTestingInfrastructureFlag = false var PathToTestingInfrastrucureManifests = "" +var DNSServiceName = "" +var DNSServiceNamespace = "" func init() { kubecli.Init() @@ -78,6 +80,8 @@ func init() { flag.StringVar(&IPV6ConnectivityCheckAddress, "conn-check-ipv6-address", "", "Address that is used for testing IPV6 connectivity to the outside world") flag.StringVar(&ConnectivityCheckDNS, "conn-check-dns", "", "dns that is used for testing connectivity to the outside world") flag.BoolVar(&ApplyDefaulte2eConfiguration, "apply-default-e2e-configuration", false, "Apply the default e2e test configuration (feature gates, selinux contexts, ...)") + flag.StringVar(&DNSServiceName, "dns-service-name", "kube-dns", "cluster DNS service name") + flag.StringVar(&DNSServiceNamespace, "dns-service-namespace", "kube-system", "cluster DNS service namespace") } func NormalizeFlags() { diff --git a/tests/libnet/dns.go b/tests/libnet/dns.go index abeb07e5a..09bd72224 100644 --- a/tests/libnet/dns.go +++ b/tests/libnet/dns.go @@ -26,12 +26,10 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "kubevirt.io/client-go/kubecli" + "kubevirt.io/kubevirt/tests/flags" ) const ( - k8sDNSServiceName = "kube-dns" - k8sDNSNamespace = "kube-system" - openshiftDNSServiceName = "dns-default" openshiftDNSNamespace = "openshift-dns" ) @@ -49,7 +47,7 @@ func ClusterDNSServiceIP() (string, error) { return "", err } - service, err := virtClient.CoreV1().Services(k8sDNSNamespace).Get(context.Background(), k8sDNSServiceName, metav1.GetOptions{}) + service, err := virtClient.CoreV1().Services(flags.DNSServiceNamespace).Get(context.Background(), flags.DNSServiceName, metav1.GetOptions{}) if err != nil { prevErr := err service, err = virtClient.CoreV1().Services(openshiftDNSNamespace).Get(context.Background(), openshiftDNSServiceName, metav1.GetOptions{}) -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor