Skip to content

Commit

Permalink
Add minimum value of 1 for replicas
Browse files Browse the repository at this point in the history
Signed-off-by: Shiva Krishna, Merla <[email protected]>
  • Loading branch information
shivamerla committed Aug 16, 2024
1 parent 78c3a95 commit 0ac27c3
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/apps/v1alpha1/nimservice_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ type NIMServiceSpec struct {
StartupProbe Probe `json:"startupProbe,omitempty"`
Scale Autoscaling `json:"scale,omitempty"`
Metrics Metrics `json:"metrics,omitempty"`
Replicas int `json:"replicas,omitempty"`
UserID *int64 `json:"userID,omitempty"`
GroupID *int64 `json:"groupID,omitempty"`
// +kubebuilder:validation:Minimum=1
Replicas int `json:"replicas,omitempty"`
UserID *int64 `json:"userID,omitempty"`
GroupID *int64 `json:"groupID,omitempty"`
}

// NIMCacheVolSpec defines the spec to use NIMCache volume
Expand Down
1 change: 1 addition & 0 deletions bundle/manifests/apps.nvidia.com_nimpipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,7 @@ spec:
type: object
type: object
replicas:
minimum: 1
type: integer
resources:
description: ResourceRequirements describes the compute
Expand Down
1 change: 1 addition & 0 deletions bundle/manifests/apps.nvidia.com_nimservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,7 @@ spec:
type: object
type: object
replicas:
minimum: 1
type: integer
resources:
description: ResourceRequirements describes the compute resource requirements.
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/apps.nvidia.com_nimpipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,7 @@ spec:
type: object
type: object
replicas:
minimum: 1
type: integer
resources:
description: ResourceRequirements describes the compute
Expand Down
1 change: 1 addition & 0 deletions config/crd/bases/apps.nvidia.com_nimservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,7 @@ spec:
type: object
type: object
replicas:
minimum: 1
type: integer
resources:
description: ResourceRequirements describes the compute resource requirements.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,7 @@ spec:
type: object
type: object
replicas:
minimum: 1
type: integer
resources:
description: ResourceRequirements describes the compute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,7 @@ spec:
type: object
type: object
replicas:
minimum: 1
type: integer
resources:
description: ResourceRequirements describes the compute resource requirements.
Expand Down

0 comments on commit 0ac27c3

Please sign in to comment.