@@ -107,40 +107,6 @@ func (r *VLLMRuntimeReconciler) Reconcile(ctx context.Context, req ctrl.Request)
107
107
return ctrl.Result {Requeue : true }, nil
108
108
}
109
109
110
- // Check if the pv already exists, if not create a new one
111
- foundPV := & corev1.PersistentVolume {}
112
- err = r .Get (ctx , types.NamespacedName {Name : "shared-pvc-storage" , Namespace : vllmRuntime .Namespace }, foundPV )
113
- if err != nil && errors .IsNotFound (err ) {
114
- // Define a new pv
115
- pv := r .pvForVLLMRuntime (vllmRuntime )
116
- log .Info ("Creating a new PV" , "PV.Namespace" , pv .Namespace , "PV.Name" , pv .Name )
117
- err = r .Create (ctx , pv )
118
- if err != nil {
119
- log .Error (err , "Failed to create new PV" , "PV.Namespace" , pv .Namespace , "PV.Name" , pv .Name )
120
- return ctrl.Result {}, err
121
- }
122
- } else if err != nil {
123
- log .Error (err , "Failed to get PV" )
124
- return ctrl.Result {}, err
125
- }
126
-
127
- // Check if the pvc already exists, if not create a new one
128
- foundPVC := & corev1.PersistentVolumeClaim {}
129
- err = r .Get (ctx , types.NamespacedName {Name : "shared-pvc-storage-claim" , Namespace : vllmRuntime .Namespace }, foundPVC )
130
- if err != nil && errors .IsNotFound (err ) {
131
- // Define a new pvc
132
- pvc := r .pvcForVLLMRuntime (vllmRuntime )
133
- log .Info ("Creating a new PVC" , "PVC.Namespace" , pvc .Namespace , "PVC.Name" , pvc .Name )
134
- err = r .Create (ctx , pvc )
135
- if err != nil {
136
- log .Error (err , "Failed to create new PVC" , "PVC.Namespace" , pvc .Namespace , "PVC.Name" , pvc .Name )
137
- return ctrl.Result {}, err
138
- }
139
- } else if err != nil {
140
- log .Error (err , "Failed to get PVC" )
141
- return ctrl.Result {}, err
142
- }
143
-
144
110
// Check if the deployment already exists, if not create a new one
145
111
found := & appsv1.Deployment {}
146
112
err = r .Get (ctx , types.NamespacedName {Name : vllmRuntime .Name , Namespace : vllmRuntime .Namespace }, found )
@@ -184,43 +150,6 @@ func (r *VLLMRuntimeReconciler) Reconcile(ctx context.Context, req ctrl.Request)
184
150
return ctrl.Result {}, nil
185
151
}
186
152
187
- func (r * VLLMRuntimeReconciler ) pvForVLLMRuntime (vllmRuntime * productionstackv1alpha1.VLLMRuntime ) * corev1.PersistentVolume {
188
- return & corev1.PersistentVolume {
189
- ObjectMeta : metav1.ObjectMeta {
190
- Name : "shared-pvc-storage" ,
191
- Namespace : vllmRuntime .Namespace ,
192
- Labels : map [string ]string {"app" : vllmRuntime .Name },
193
- },
194
- Spec : corev1.PersistentVolumeSpec {
195
- AccessModes : []corev1.PersistentVolumeAccessMode {corev1 .ReadWriteMany },
196
- StorageClassName : "" ,
197
- Capacity : corev1.ResourceList {corev1 .ResourceStorage : resource .MustParse ("100Gi" )},
198
- PersistentVolumeSource : corev1.PersistentVolumeSource {
199
- HostPath : & corev1.HostPathVolumeSource {
200
- Path : "/data/shared-pvc-storage" ,
201
- },
202
- },
203
- },
204
- }
205
- }
206
-
207
- func (r * VLLMRuntimeReconciler ) pvcForVLLMRuntime (vllmRuntime * productionstackv1alpha1.VLLMRuntime ) * corev1.PersistentVolumeClaim {
208
- return & corev1.PersistentVolumeClaim {
209
- ObjectMeta : metav1.ObjectMeta {
210
- Name : "shared-pvc-storage-claim" ,
211
- Namespace : vllmRuntime .Namespace ,
212
- Labels : map [string ]string {"app" : vllmRuntime .Name },
213
- },
214
- Spec : corev1.PersistentVolumeClaimSpec {
215
- AccessModes : []corev1.PersistentVolumeAccessMode {corev1 .ReadWriteMany },
216
- StorageClassName : & []string {"" }[0 ],
217
- Resources : corev1.VolumeResourceRequirements {
218
- Requests : corev1.ResourceList {corev1 .ResourceStorage : resource .MustParse ("100Gi" )},
219
- },
220
- },
221
- }
222
- }
223
-
224
153
// deploymentForVLLMRuntime returns a VLLMRuntime Deployment object
225
154
func (r * VLLMRuntimeReconciler ) deploymentForVLLMRuntime (vllmRuntime * productionstackv1alpha1.VLLMRuntime ) * appsv1.Deployment {
226
155
labels := map [string ]string {"app" : vllmRuntime .Name }
@@ -252,11 +181,11 @@ func (r *VLLMRuntimeReconciler) deploymentForVLLMRuntime(vllmRuntime *production
252
181
Scheme : corev1 .URISchemeHTTP ,
253
182
},
254
183
},
255
- InitialDelaySeconds : 500 ,
256
- PeriodSeconds : 10 ,
184
+ InitialDelaySeconds : 300 ,
185
+ PeriodSeconds : 20 ,
257
186
TimeoutSeconds : 3 ,
258
187
SuccessThreshold : 1 ,
259
- FailureThreshold : 3 ,
188
+ FailureThreshold : 10 ,
260
189
}
261
190
262
191
// Build command line arguments
@@ -520,7 +449,7 @@ func (r *VLLMRuntimeReconciler) deploymentForVLLMRuntime(vllmRuntime *production
520
449
Name : "shared-pvc-storage" ,
521
450
VolumeSource : corev1.VolumeSource {
522
451
PersistentVolumeClaim : & corev1.PersistentVolumeClaimVolumeSource {
523
- ClaimName : "shared-pvc-storage-claim" ,
452
+ ClaimName : "production-stack- shared-pvc-storage-claim" ,
524
453
},
525
454
},
526
455
},
0 commit comments