@@ -142,13 +142,38 @@ class ClusterConfiguration:
142
142
annotations : Dict [str , str ] = field (default_factory = dict )
143
143
volumes : list [V1Volume ] = field (default_factory = list )
144
144
volume_mounts : list [V1VolumeMount ] = field (default_factory = list )
145
+ enable_gcs_ft : bool = False
146
+ redis_address : Optional [str ] = None
147
+ redis_password_secret : Optional [Dict [str , str ]] = None
148
+ external_storage_namespace : Optional [str ] = None
145
149
146
150
def __post_init__ (self ):
147
151
if not self .verify_tls :
148
152
print (
149
153
"Warning: TLS verification has been disabled - Endpoint checks will be bypassed"
150
154
)
151
155
156
+ if self .enable_gcs_ft :
157
+ if not self .redis_address :
158
+ raise ValueError (
159
+ "redis_address must be provided when enable_gcs_ft is True"
160
+ )
161
+
162
+ if self .redis_password_secret and not isinstance (
163
+ self .redis_password_secret , dict
164
+ ):
165
+ raise ValueError (
166
+ "redis_password_secret must be a dictionary with 'name' and 'key' fields"
167
+ )
168
+
169
+ if self .redis_password_secret and (
170
+ "name" not in self .redis_password_secret
171
+ or "key" not in self .redis_password_secret
172
+ ):
173
+ raise ValueError (
174
+ "redis_password_secret must contain both 'name' and 'key' fields"
175
+ )
176
+
152
177
self ._validate_types ()
153
178
self ._memory_to_resource ()
154
179
self ._memory_to_string ()
@@ -283,10 +308,13 @@ def check_type(value, expected_type):
283
308
else :
284
309
return True
285
310
if origin_type is dict :
286
- return all (
287
- check_type (k , args [0 ]) and check_type (v , args [1 ])
288
- for k , v in value .items ()
289
- )
311
+ if value is not None :
312
+ return all (
313
+ check_type (k , args [0 ]) and check_type (v , args [1 ])
314
+ for k , v in value .items ()
315
+ )
316
+ else :
317
+ return True
290
318
if origin_type is tuple :
291
319
return all (check_type (elem , etype ) for elem , etype in zip (value , args ))
292
320
if expected_type is int :
0 commit comments