Skip to content

Commit

Permalink
Merge pull request #26 from NVIDIA/update_misc_spec
Browse files Browse the repository at this point in the history
Misc spec updates
  • Loading branch information
ArangoGutierrez authored Aug 6, 2024
2 parents 03d3f3e + 7229b32 commit 98db2c2
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 18 deletions.
2 changes: 1 addition & 1 deletion api/apps/v1alpha1/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type ServiceMonitor struct {
// Autoscaling defines attributes to automatically scale the service based on metrics
type Autoscaling struct {
Enabled *bool `json:"enabled,omitempty"`
HPASpec autoscalingv2.HorizontalPodAutoscalerSpec `json:"hpaspec,omitempty"`
HPASpec autoscalingv2.HorizontalPodAutoscalerSpec `json:"hpa,omitempty"`
}

// Image defines image attributes
Expand Down
3 changes: 2 additions & 1 deletion api/apps/v1alpha1/nimcache_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type NIMCacheSpec struct {
// Storage is the target storage for caching NIM model
Storage Storage `json:"storage"`
// Resources defines the minimum resources required for the caching job to run(cpu, memory, gpu).
Resources Resources `json:"resources"`
Resources Resources `json:"resources,omitempty"`
// Tolerations for running the job to cache the NIM model
Tolerations []corev1.Toleration `json:"tolerations,omitempty"`
// NodeSelectors are the node selector labels to schedule the caching job.
Expand All @@ -56,6 +56,7 @@ type NGCSource struct {
// The name of an existing pull secret containing the NGC_API_KEY
AuthSecret string `json:"authSecret"`
// ModelPuller is the container image that can pull the model
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="modelPuller is an immutable field. Please create a new NIMCache resource instead when you want to change this container."
ModelPuller string `json:"modelPuller"`
// PullSecret to pull the model puller image
PullSecret string `json:"pullSecret,omitempty"`
Expand Down
16 changes: 11 additions & 5 deletions bundle/manifests/apps.nvidia.com_nimcaches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ spec:
description: ModelPuller is the container image that can pull
the model
type: string
x-kubernetes-validations:
- message: modelPuller is an immutable field. Please create
a new NIMCache resource instead when you want to change
this container.
rule: self == oldSelf
pullSecret:
description: PullSecret to pull the model puller image
type: string
Expand Down Expand Up @@ -261,7 +266,6 @@ spec:
type: object
type: array
required:
- resources
- source
- storage
type: object
Expand Down Expand Up @@ -341,14 +345,16 @@ spec:
items:
description: NIMProfile defines the profiles that were cached
properties:
config:
additionalProperties:
type: string
type: object
model:
type: string
name:
type: string
release:
type: string
tags:
additionalProperties:
type: string
type: object
type: object
type: array
pvc:
Expand Down
2 changes: 1 addition & 1 deletion bundle/manifests/apps.nvidia.com_nimpipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ spec:
properties:
enabled:
type: boolean
hpaspec:
hpa:
description: HorizontalPodAutoscalerSpec describes the
desired functionality of the HorizontalPodAutoscaler.
properties:
Expand Down
2 changes: 1 addition & 1 deletion bundle/manifests/apps.nvidia.com_nimservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ spec:
properties:
enabled:
type: boolean
hpaspec:
hpa:
description: HorizontalPodAutoscalerSpec describes the desired
functionality of the HorizontalPodAutoscaler.
properties:
Expand Down
6 changes: 5 additions & 1 deletion config/crd/bases/apps.nvidia.com_nimcaches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ spec:
description: ModelPuller is the container image that can pull
the model
type: string
x-kubernetes-validations:
- message: modelPuller is an immutable field. Please create
a new NIMCache resource instead when you want to change
this container.
rule: self == oldSelf
pullSecret:
description: PullSecret to pull the model puller image
type: string
Expand Down Expand Up @@ -261,7 +266,6 @@ spec:
type: object
type: array
required:
- resources
- source
- storage
type: object
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/apps.nvidia.com_nimpipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ spec:
properties:
enabled:
type: boolean
hpaspec:
hpa:
description: HorizontalPodAutoscalerSpec describes the
desired functionality of the HorizontalPodAutoscaler.
properties:
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/apps.nvidia.com_nimservices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ spec:
properties:
enabled:
type: boolean
hpaspec:
hpa:
description: HorizontalPodAutoscalerSpec describes the desired
functionality of the HorizontalPodAutoscaler.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ spec:
description: ModelPuller is the container image that can pull
the model
type: string
x-kubernetes-validations:
- message: modelPuller is an immutable field. Please create
a new NIMCache resource instead when you want to change
this container.
rule: self == oldSelf
pullSecret:
description: PullSecret to pull the model puller image
type: string
Expand Down Expand Up @@ -341,14 +346,16 @@ spec:
items:
description: NIMProfile defines the profiles that were cached
properties:
config:
additionalProperties:
type: string
type: object
model:
type: string
name:
type: string
release:
type: string
tags:
additionalProperties:
type: string
type: object
type: object
type: array
pvc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ spec:
properties:
enabled:
type: boolean
hpaspec:
hpa:
description: HorizontalPodAutoscalerSpec describes the
desired functionality of the HorizontalPodAutoscaler.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,7 @@ spec:
properties:
enabled:
type: boolean
hpaspec:
hpa:
description: HorizontalPodAutoscalerSpec describes the desired
functionality of the HorizontalPodAutoscaler.
properties:
Expand Down

0 comments on commit 98db2c2

Please sign in to comment.