| 1 |
# Copyright 2020 gRPC authors. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
from absl import flags |
| 15 |
|
| 16 |
# GCP |
| 17 |
KUBE_CONTEXT = flags.DEFINE_string("kube_context", |
| 18 |
default=None, |
| 19 |
help="Kubectl context to use") |
| 20 |
SECONDARY_KUBE_CONTEXT = flags.DEFINE_string( |
| 21 |
"secondary_kube_context", |
| 22 |
default=None, |
| 23 |
help="Secondary kubectl context to use for cluster in another region") |
| 24 |
GCP_SERVICE_ACCOUNT = flags.DEFINE_string( |
| 25 |
"gcp_service_account", |
| 26 |
default=None, |
| 27 |
help="GCP Service account for GKE workloads to impersonate") |
| 28 |
TD_BOOTSTRAP_IMAGE = flags.DEFINE_string( |
| 29 |
"td_bootstrap_image", |
| 30 |
default=None, |
| 31 |
help="Traffic Director gRPC Bootstrap Docker image") |
| 32 |
|
| 33 |
# Test app |
| 34 |
SERVER_IMAGE = flags.DEFINE_string("server_image", |
| 35 |
default=None, |
| 36 |
help="Server Docker image name") |
| 37 |
SERVER_IMAGE_CANONICAL = flags.DEFINE_string( |
| 38 |
"server_image_canonical", |
| 39 |
default=None, |
| 40 |
help=("The canonical implementation of the xDS test server.\n" |
| 41 |
"Can be used in tests where language-specific xDS test server" |
| 42 |
"does not exist, or missing a feature required for the test.")) |
| 43 |
CLIENT_IMAGE = flags.DEFINE_string("client_image", |
| 44 |
default=None, |
| 45 |
help="Client Docker image name") |
| 46 |
DEBUG_USE_PORT_FORWARDING = flags.DEFINE_bool( |
| 47 |
"debug_use_port_forwarding", |
| 48 |
default=False, |
| 49 |
help="Development only: use kubectl port-forward to connect to test app") |
| 50 |
ENABLE_WORKLOAD_IDENTITY = flags.DEFINE_bool( |
| 51 |
"enable_workload_identity", |
| 52 |
default=True, |
| 53 |
help="Enable the WorkloadIdentity feature") |
| 54 |
|
| 55 |
flags.mark_flags_as_required([ |
| 56 |
"kube_context", |
| 57 |
"td_bootstrap_image", |
| 58 |
"server_image", |
| 59 |
"client_image", |
| 60 |
]) |