@@ -260,6 +260,33 @@ def _WaitForIngress(self, name: str, namespace: str, port: int) -> str:
260260 ])
261261 return f'{ self ._GetAddressFromIngress (stdout )} :{ port } '
262262
263+ def ApplyManifest (self , manifest_file : str , ** kwargs ) -> Any :
264+ """Applies a declarative Kubernetes manifest; possibly with jinja."""
265+ return kubernetes_commands .ApplyManifest (manifest_file , ** kwargs )
266+
267+ def WaitForResource (
268+ self ,
269+ resource_name : str ,
270+ condition_name : str ,
271+ namespace : str | None = None ,
272+ timeout : int = vm_util .DEFAULT_TIMEOUT ,
273+ wait_for_all : bool = False ,
274+ condition_type : str = 'condition=' ,
275+ extra_args : list [str ] | None = None ,
276+ ** kwargs ,
277+ ) -> None :
278+ """Waits for a condition on a Kubernetes resource (eg: deployment, pod)."""
279+ return kubernetes_commands .WaitForResource (
280+ resource_name ,
281+ condition_name ,
282+ namespace ,
283+ timeout ,
284+ wait_for_all ,
285+ condition_type ,
286+ extra_args ,
287+ ** kwargs ,
288+ )
289+
263290 def _GetAddressFromIngress (self , ingress_out : str ):
264291 """Gets the endpoint address from the Ingress resource."""
265292 ingress = json .loads (ingress_out .strip ("'" ))
@@ -306,7 +333,7 @@ def _DeleteAllFromDefaultNamespace():
306333 kubectl .RunRetryableKubectlCommand (run_cmd , timeout = timeout )
307334
308335 run_cmd = ['delete' , 'pvc' , '--all' , '-n' , 'default' ]
309- kubectl .RunKubectlCommand (run_cmd )
336+ kubectl .RunRetryableKubectlCommand (run_cmd , timeout = timeout )
310337 # There maybe a slight race if resources are cleaned up in the background
311338 # where deleting the cluster immediately prevents the PVCs from being
312339 # deleted.
0 commit comments