File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 88import  uuid 
99from  typing  import  Final , Iterator 
1010
11+ import  kr8s 
1112import  pytest 
1213from  kopf .testing  import  KopfRunner 
14+ from  packaging .version  import  Version 
1315from  pytest_kind .cluster  import  KindCluster 
1416
1517DIR : Final [pathlib .Path ] =  pathlib .Path (__file__ ).parent .absolute ()
@@ -105,6 +107,7 @@ def namespace(k8s_cluster: KindCluster) -> Iterator[str]:
105107
106108@pytest .fixture (scope = "session" , autouse = True ) 
107109def  install_gateway (k8s_cluster : KindCluster ) ->  Iterator [None ]:
110+     kube_version  =  Version (kr8s .version ().get ("gitVersion" ))
108111    if  bool (os .environ .get ("TEST_DASK_GATEWAY" , False )):
109112        check_dependency ("helm" )
110113        # To ensure the operator can coexist with Gateway 
@@ -115,6 +118,8 @@ def install_gateway(k8s_cluster: KindCluster) -> Iterator[None]:
115118                "dask-gateway" ,
116119                "dask-gateway" ,
117120                "--install" ,
121+                 "--version" ,
122+                 "2024.1.0"  if  kube_version  <  Version ("1.30.0" ) else  ">=2024.1.0" ,
118123                "--repo=https://helm.dask.org" ,
119124                "--create-namespace" ,
120125                "--namespace" ,
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments