File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/codeflare_sdk/cluster Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,17 @@ def evaluate_dispatch_priority(self):
128
128
print (f"Priority class { priority_class } is not available in the cluster" )
129
129
return None
130
130
131
+ def validate_image_config (self ):
132
+ """
133
+ Validates that the image configuration is not empty.
134
+
135
+ :param image: The image string to validate
136
+ :raises ValueError: If the image is not specified
137
+ """
138
+ if self .config .image == "" or self .config .image == None :
139
+ raise ValueError ("Image must be specified in the ClusterConfiguration" )
140
+
141
+
131
142
def create_app_wrapper (self ):
132
143
"""
133
144
Called upon cluster object creation, creates an AppWrapper yaml based on
@@ -142,6 +153,9 @@ def create_app_wrapper(self):
142
153
raise TypeError (
143
154
f"Namespace { self .config .namespace } is of type { type (self .config .namespace )} . Check your Kubernetes Authentication."
144
155
)
156
+
157
+ # Validate image configuration
158
+ self .validate_image_config ()
145
159
146
160
# Before attempting to create the cluster AW, let's evaluate the ClusterConfig
147
161
if self .config .dispatch_priority :
You can’t perform that action at this time.
0 commit comments