Public Member Functions | Public Attributes | Static Public Attributes | List of all members
framework.test_app.server_app.KubernetesServerRunner Class Reference
Inheritance diagram for framework.test_app.server_app.KubernetesServerRunner:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, k8s_namespace, *deployment_name, image_name, td_bootstrap_image, gcp.api.GcpApiManager gcp_api_manager, str gcp_project, str gcp_service_account, service_account_name=None, service_name=None, neg_name=None, xds_server_uri=None, network='default', deployment_template='server.deployment.yaml', service_account_template='service-account.yaml', service_template='server.service.yaml', reuse_service=False, reuse_namespace=False, namespace_template=None, debug_use_port_forwarding=False, enable_workload_identity=True)
 
def cleanup (self, *force=False, force_namespace=False)
 
str make_namespace_name (cls, str resource_prefix, str resource_suffix, str name='server')
 
List[XdsTestServerrun (self, *test_port=DEFAULT_TEST_PORT, maintenance_port=None, secure_mode=False, server_id=None, replica_count=1)
 
- Public Member Functions inherited from framework.test_app.base_runner.KubernetesBaseRunner
def __init__ (self, k8s_namespace, namespace_template=None, reuse_namespace=False)
 
def cleanup (self, *force=False)
 
def delete_namespace (self, wait_for_deletion=True)
 
def run (self, **kwargs)
 

Public Attributes

 debug_use_port_forwarding
 
 deployment
 
 deployment_name
 
 deployment_template
 
 enable_workload_identity
 
 gcp_iam
 
 gcp_project
 
 gcp_service_account
 
 gcp_ui_url
 
 image_name
 
 neg_name
 
 network
 
 port_forwarders
 
 reuse_service
 
 service
 
 service_account
 
 service_account_name
 
 service_account_template
 
 service_name
 
 service_template
 
 td_bootstrap_image
 
 xds_server_uri
 
- Public Attributes inherited from framework.test_app.base_runner.KubernetesBaseRunner
 namespace
 
 namespace_template
 
 reuse_namespace
 

Static Public Attributes

int DEFAULT_MAINTENANCE_PORT = 8080
 
int DEFAULT_SECURE_MODE_MAINTENANCE_PORT = 8081
 
int DEFAULT_TEST_PORT = 8080
 
- Static Public Attributes inherited from framework.test_app.base_runner.KubernetesBaseRunner
string ROLE_WORKLOAD_IDENTITY_USER = 'roles/iam.workloadIdentityUser'
 
string TEMPLATE_DIR_NAME = 'kubernetes-manifests'
 
string TEMPLATE_DIR_RELATIVE_PATH = f'../../{TEMPLATE_DIR_NAME}'
 

Detailed Description

Definition at line 155 of file server_app.py.

Constructor & Destructor Documentation

◆ __init__()

def framework.test_app.server_app.KubernetesServerRunner.__init__ (   self,
  k8s_namespace,
deployment_name,
  image_name,
  td_bootstrap_image,
gcp.api.GcpApiManager  gcp_api_manager,
str  gcp_project,
str  gcp_service_account,
  service_account_name = None,
  service_name = None,
  neg_name = None,
  xds_server_uri = None,
  network = 'default',
  deployment_template = 'server.deployment.yaml',
  service_account_template = 'service-account.yaml',
  service_template = 'server.service.yaml',
  reuse_service = False,
  reuse_namespace = False,
  namespace_template = None,
  debug_use_port_forwarding = False,
  enable_workload_identity = True 
)

Definition at line 160 of file server_app.py.

Member Function Documentation

◆ cleanup()

def framework.test_app.server_app.KubernetesServerRunner.cleanup (   self,
force = False,
  force_namespace = False 
)

Definition at line 347 of file server_app.py.

◆ make_namespace_name()

str framework.test_app.server_app.KubernetesServerRunner.make_namespace_name (   cls,
str  resource_prefix,
str  resource_suffix,
str   name = 'server' 
)
A helper to make consistent XdsTestServer kubernetes namespace name
for given resource prefix and suffix.

Note: the idea is to intentionally produce different namespace name for
the test server, and the test client, as that closely mimics real-world
deployments.
:rtype: object

Definition at line 368 of file server_app.py.

◆ run()

List[XdsTestServer] framework.test_app.server_app.KubernetesServerRunner.run (   self,
test_port = DEFAULT_TEST_PORT,
  maintenance_port = None,
  secure_mode = False,
  server_id = None,
  replica_count = 1 
)

Definition at line 226 of file server_app.py.

Member Data Documentation

◆ debug_use_port_forwarding

framework.test_app.server_app.KubernetesServerRunner.debug_use_port_forwarding

Definition at line 178 of file server_app.py.

◆ DEFAULT_MAINTENANCE_PORT

int framework.test_app.server_app.KubernetesServerRunner.DEFAULT_MAINTENANCE_PORT = 8080
static

Definition at line 157 of file server_app.py.

◆ DEFAULT_SECURE_MODE_MAINTENANCE_PORT

int framework.test_app.server_app.KubernetesServerRunner.DEFAULT_SECURE_MODE_MAINTENANCE_PORT = 8081
static

Definition at line 158 of file server_app.py.

◆ DEFAULT_TEST_PORT

int framework.test_app.server_app.KubernetesServerRunner.DEFAULT_TEST_PORT = 8080
static

Definition at line 156 of file server_app.py.

◆ deployment

framework.test_app.server_app.KubernetesServerRunner.deployment

Definition at line 291 of file server_app.py.

◆ deployment_name

framework.test_app.server_app.KubernetesServerRunner.deployment_name

Definition at line 164 of file server_app.py.

◆ deployment_template

framework.test_app.server_app.KubernetesServerRunner.deployment_template

Definition at line 175 of file server_app.py.

◆ enable_workload_identity

framework.test_app.server_app.KubernetesServerRunner.enable_workload_identity

Definition at line 179 of file server_app.py.

◆ gcp_iam

framework.test_app.server_app.KubernetesServerRunner.gcp_iam

Definition at line 196 of file server_app.py.

◆ gcp_project

framework.test_app.server_app.KubernetesServerRunner.gcp_project

Definition at line 190 of file server_app.py.

◆ gcp_service_account

framework.test_app.server_app.KubernetesServerRunner.gcp_service_account

Definition at line 193 of file server_app.py.

◆ gcp_ui_url

framework.test_app.server_app.KubernetesServerRunner.gcp_ui_url

Definition at line 191 of file server_app.py.

◆ image_name

framework.test_app.server_app.KubernetesServerRunner.image_name

Definition at line 165 of file server_app.py.

◆ neg_name

framework.test_app.server_app.KubernetesServerRunner.neg_name

Definition at line 172 of file server_app.py.

◆ network

framework.test_app.server_app.KubernetesServerRunner.network

Definition at line 174 of file server_app.py.

◆ port_forwarders

framework.test_app.server_app.KubernetesServerRunner.port_forwarders

Definition at line 351 of file server_app.py.

◆ reuse_service

framework.test_app.server_app.KubernetesServerRunner.reuse_service

Definition at line 177 of file server_app.py.

◆ service

framework.test_app.server_app.KubernetesServerRunner.service

Definition at line 264 of file server_app.py.

◆ service_account

framework.test_app.server_app.KubernetesServerRunner.service_account

Definition at line 284 of file server_app.py.

◆ service_account_name

framework.test_app.server_app.KubernetesServerRunner.service_account_name

Definition at line 183 of file server_app.py.

◆ service_account_template

framework.test_app.server_app.KubernetesServerRunner.service_account_template

Definition at line 184 of file server_app.py.

◆ service_name

framework.test_app.server_app.KubernetesServerRunner.service_name

Definition at line 166 of file server_app.py.

◆ service_template

framework.test_app.server_app.KubernetesServerRunner.service_template

Definition at line 176 of file server_app.py.

◆ td_bootstrap_image

framework.test_app.server_app.KubernetesServerRunner.td_bootstrap_image

Definition at line 168 of file server_app.py.

◆ xds_server_uri

framework.test_app.server_app.KubernetesServerRunner.xds_server_uri

Definition at line 169 of file server_app.py.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:10