Create config for common flags, rename port forward flag

pull/24983/head
Sergii Tkachenko 4 years ago
parent 51d9c24a8f
commit 9b0162e8c2
  1. 4
      tools/run_tests/xds_test_driver/config/common.cfg
  2. 3
      tools/run_tests/xds_test_driver/config/grpc-testing.cfg
  3. 8
      tools/run_tests/xds_test_driver/config/local-dev.cfg.example
  4. 6
      tools/run_tests/xds_test_driver/framework/xds_k8s_flags.py
  5. 9
      tools/run_tests/xds_test_driver/framework/xds_k8s_testcase.py

@ -0,0 +1,4 @@
--namespace=interop-psm-security
--td_bootstrap_image=gcr.io/trafficdirector-prod/td-grpc-bootstrap:0.10.0
--logger_levels=__main__:DEBUG,framework:DEBUG
--verbosity=0

@ -1,5 +1,4 @@
--flagfile=config/common.cfg
--project=grpc-testing
--network=default-vpc
--gcp_service_account=830293263384-compute@developer.gserviceaccount.com
# Dev version with security support
--td_bootstrap_image=gcr.io/trafficdirector-prod/td-grpc-bootstrap:0.10.0

@ -1,12 +1,10 @@
# Copy to local-dev.cfg
# Local dev settings
--flagfile=config/grpc-testing.cfg
--namespace=interop-psm-security
--kube_context=gke_grpc-testing_us-central1-a_interop-test-psm-sec1-us-central1
--namespace=your-namespace
# Test images
--server_image=gcr.io/grpc-testing/xds-k8s-test-server-java:latest
--client_image=gcr.io/grpc-testing/xds-k8s-test-client-java:latest
# Debug settings
--client_debug_use_port_forwarding
--logger_levels=__main__:DEBUG,framework:DEBUG
--verbosity=0
# Enable port forwarding in local dev
--debug_use_port_forwarding

@ -33,10 +33,10 @@ SERVER_IMAGE = flags.DEFINE_string("server_image",
CLIENT_IMAGE = flags.DEFINE_string("client_image",
default=None,
help="Client Docker image name")
CLIENT_PORT_FORWARDING = flags.DEFINE_bool(
"client_debug_use_port_forwarding",
DEBUG_USE_PORT_FORWARDING = flags.DEFINE_bool(
"debug_use_port_forwarding",
default=False,
help="Development only: use kubectl port-forward to connect to test client")
help="Development only: use kubectl port-forward to connect to test app")
flags.mark_flags_as_required([
"gcp_service_account",

@ -67,7 +67,8 @@ class XdsKubernetesTestCase(absltest.TestCase):
cls.client_image = xds_k8s_flags.CLIENT_IMAGE.value
cls.client_name = xds_flags.CLIENT_NAME.value
cls.client_port = xds_flags.CLIENT_PORT.value
cls.client_port_forwarding = xds_k8s_flags.CLIENT_PORT_FORWARDING.value
cls.debug_use_port_forwarding = \
xds_k8s_flags.DEBUG_USE_PORT_FORWARDING.value
# Resource managers
cls.k8s_api_manager = k8s.KubernetesApiManager(
@ -164,7 +165,7 @@ class RegularXdsKubernetesTestCase(XdsKubernetesTestCase):
gcp_service_account=self.gcp_service_account,
network=self.network,
td_bootstrap_image=self.td_bootstrap_image,
debug_use_port_forwarding=self.client_port_forwarding,
debug_use_port_forwarding=self.debug_use_port_forwarding,
stats_port=self.client_port,
reuse_namespace=self.server_namespace == self.client_namespace)
@ -212,7 +213,7 @@ class SecurityXdsKubernetesTestCase(XdsKubernetesTestCase):
network=self.network,
td_bootstrap_image=self.td_bootstrap_image,
deployment_template='server-secure.deployment.yaml',
debug_use_port_forwarding=self.client_port_forwarding)
debug_use_port_forwarding=self.debug_use_port_forwarding)
# Test Client Runner
self.client_runner = client_app.KubernetesClientRunner(
@ -226,7 +227,7 @@ class SecurityXdsKubernetesTestCase(XdsKubernetesTestCase):
deployment_template='client-secure.deployment.yaml',
stats_port=self.client_port,
reuse_namespace=self.server_namespace == self.client_namespace,
debug_use_port_forwarding=self.client_port_forwarding)
debug_use_port_forwarding=self.debug_use_port_forwarding)
def startSecureTestServer(self, replica_count=1, **kwargs) -> XdsTestServer:
test_server = self.server_runner.run(replica_count=replica_count,

Loading…
Cancel
Save