Skip to content

Commit 4cd75f8

Browse files
committed
fix: add scaling adapter
Signed-off-by: Julien Mancuso <[email protected]>
1 parent c6ece7d commit 4cd75f8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

deploy/cloud/operator/internal/controller/dynamographdeploymentscalingadapter_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func (r *DynamoGraphDeploymentScalingAdapterReconciler) Reconcile(ctx context.Co
8686

8787
// 3. Find the target service in DGD's spec.services map
8888
component, exists := dgd.Spec.Services[adapter.Spec.DGDRef.ServiceName]
89-
if !exists {
89+
if !exists || component == nil {
9090
logger.Error(nil, "Service not found in DGD",
9191
"service", adapter.Spec.DGDRef.ServiceName,
9292
"dgd", dgd.Name,

deploy/cloud/operator/internal/webhook/validation/dynamographdeployment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ func (v *DynamoGraphDeploymentValidator) validateReplicasChanges(old *nvidiacomv
137137
if oldReplicas != newReplicas {
138138
errs = append(errs, fmt.Errorf(
139139
"spec.services[%s].replicas cannot be modified directly when scaling adapter is enabled; "+
140-
"use 'kubectl scale dgdsa/%s-%s --replicas=%d' or update the DynamoGraphDeploymentScalingAdapter instead",
141-
serviceName, v.deployment.Name, serviceName, newReplicas))
140+
"scale or update the related DynamoGraphDeploymentScalingAdapter instead",
141+
serviceName))
142142
}
143143
}
144144

0 commit comments

Comments
 (0)