namespace.py
Go to the documentation of this file.
1 # Copyright 2022 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 """Clean up GKE namespaces leaked by the tests."""
15 
16 from absl import app
17 
18 from bin.cleanup import cleanup
19 from framework import xds_flags
20 from framework import xds_k8s_flags
21 
22 
23 def main(argv):
24  if len(argv) > 1:
25  raise app.UsageError('Too many command-line arguments.')
27 
28  project: str = xds_flags.PROJECT.value
29  network: str = xds_flags.NETWORK.value
30  gcp_service_account: str = xds_k8s_flags.GCP_SERVICE_ACCOUNT.value
31  dry_run: bool = cleanup.DRY_RUN.value
32 
33  cleanup.find_and_remove_leaked_k8s_resources(dry_run, project, network,
34  gcp_service_account)
35 
36 
37 if __name__ == '__main__':
38  app.run(main)
cleanup.load_keep_config
None load_keep_config()
Definition: cleanup.py:91
namespace.main
def main(argv)
Definition: namespace.py:23
cleanup.find_and_remove_leaked_k8s_resources
def find_and_remove_leaked_k8s_resources(dry_run, project, network, gcp_service_account)
Definition: cleanup.py:311
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46


grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:42