Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc spec updates #26

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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