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

Fixed Liqo pods field compatibility #25

Merged
merged 1 commit into from
Jan 24, 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
1 change: 1 addition & 0 deletions apis/nodecore/v1alpha1/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type Partition struct {
Architecture string `json:"architecture"`
CPU resource.Quantity `json:"cpu"`
Memory resource.Quantity `json:"memory"`
Pods resource.Quantity `json:"pods"`
Gpu resource.Quantity `json:"gpu,omitempty"`
EphemeralStorage resource.Quantity `json:"ephemeral-storage,omitempty"`
Storage resource.Quantity `json:"storage,omitempty"`
Expand Down
9 changes: 9 additions & 0 deletions apis/nodecore/v1alpha1/flavour_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ type Characteristics struct {
// Memory is the amount of RAM of the Flavour.
Memory resource.Quantity `json:"memory"`

// Pods is the maximum number of pods of the Flavour.
Pods resource.Quantity `json:"pods"`

// GPU is the number of GPU cores of the Flavour.
Gpu resource.Quantity `json:"gpu,omitempty"`

Expand Down Expand Up @@ -63,11 +66,17 @@ type Partitionable struct {
// MemoryMin is the minimum requirable amount of RAM of the Flavour.
MemoryMin resource.Quantity `json:"memoryMin"`

// PodsMin is the minimum requirable number of pods of the Flavour.
PodsMin resource.Quantity `json:"podsMin"`

// CpuStep is the incremental value of CPU cores of the Flavour.
CpuStep resource.Quantity `json:"cpuStep"`

// MemoryStep is the incremental value of RAM of the Flavour.
MemoryStep resource.Quantity `json:"memoryStep"`

// PodsStep is the incremental value of pods of the Flavour.
PodsStep resource.Quantity `json:"podsStep"`
}

// Aggregatable represents the aggregation properties of a Flavour, such as the minimum instance count.
Expand Down
7 changes: 5 additions & 2 deletions apis/nodecore/v1alpha1/solver_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ type FlavourSelector struct {

// MatchSelector represents the criteria for selecting Flavours through a strict match.
type MatchSelector struct {
Cpu resource.Quantity `json:"cpu"`
Memory resource.Quantity `json:"memory"`
CPU resource.Quantity `json:"cpu,omitempty"`
Memory resource.Quantity `json:"memory,omitempty"`
Pods resource.Quantity `json:"pods,omitempty"`
Storage resource.Quantity `json:"storage,omitempty"`
EphemeralStorage resource.Quantity `json:"ephemeralStorage,omitempty"`
Gpu resource.Quantity `json:"gpu,omitempty"`
Expand All @@ -65,11 +66,13 @@ type MatchSelector struct {
type RangeSelector struct {
MinCpu resource.Quantity `json:"minCpu,omitempty"`
MinMemory resource.Quantity `json:"minMemory,omitempty"`
MinPods resource.Quantity `json:"minPods,omitempty"`
MinEph resource.Quantity `json:"minEph,omitempty"`
MinStorage resource.Quantity `json:"minStorage,omitempty"`
MinGpu resource.Quantity `json:"minGpu,omitempty"`
MaxCpu resource.Quantity `json:"MaxCpu,omitempty"`
MaxMemory resource.Quantity `json:"MaxMemory,omitempty"`
MaxPods resource.Quantity `json:"MaxPods,omitempty"`
MaxEph resource.Quantity `json:"MaxEph,omitempty"`
MaxStorage resource.Quantity `json:"MaxStorage,omitempty"`
MaxGpu resource.Quantity `json:"MaxGpu,omitempty"`
Expand Down
9 changes: 8 additions & 1 deletion apis/nodecore/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 18 additions & 3 deletions deployments/node/crds/advertisement.fluidos.eu_discoveries.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,18 @@ spec:
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
pods:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
storage:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- cpu
- memory
type: object
rangeSelector:
description: RangeSelector represents the criteria for selecting
Expand Down Expand Up @@ -127,6 +130,12 @@ spec:
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
MaxPods:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
MaxStorage:
anyOf:
- type: integer
Expand Down Expand Up @@ -157,6 +166,12 @@ spec:
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
minPods:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
minStorage:
anyOf:
- type: integer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,19 @@ spec:
storage of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
pods:
anyOf:
- type: integer
- type: string
description: Pods is the maximum number of pods of the
Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- architecture
- cpu
- memory
- pods
type: object
optionalFields:
description: This field is used to specify the optional fields
Expand Down Expand Up @@ -211,11 +220,29 @@ spec:
RAM of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
podsMin:
anyOf:
- type: integer
- type: string
description: PodsMin is the minimum requirable number
of pods of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
podsStep:
anyOf:
- type: integer
- type: string
description: PodsStep is the incremental value of
pods of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- cpuMin
- cpuStep
- memoryMin
- memoryStep
- podsMin
- podsStep
type: object
type: object
price:
Expand Down
35 changes: 35 additions & 0 deletions deployments/node/crds/nodecore.fluidos.eu_allocations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,19 @@ spec:
storage of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
pods:
anyOf:
- type: integer
- type: string
description: Pods is the maximum number of pods of the
Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- architecture
- cpu
- memory
- pods
type: object
optionalFields:
description: This field is used to specify the optional fields
Expand Down Expand Up @@ -217,11 +226,29 @@ spec:
RAM of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
podsMin:
anyOf:
- type: integer
- type: string
description: PodsMin is the minimum requirable number
of pods of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
podsStep:
anyOf:
- type: integer
- type: string
description: PodsStep is the incremental value of
pods of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- cpuMin
- cpuStep
- memoryMin
- memoryStep
- podsMin
- podsStep
type: object
type: object
price:
Expand Down Expand Up @@ -345,10 +372,18 @@ spec:
of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
pods:
anyOf:
- type: integer
- type: string
description: Pods is the maximum number of pods of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- architecture
- cpu
- memory
- pods
type: object
type:
description: 'This specifies the type of the node: Node (Physical
Expand Down
26 changes: 26 additions & 0 deletions deployments/node/crds/nodecore.fluidos.eu_flavours.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,18 @@ spec:
of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
pods:
anyOf:
- type: integer
- type: string
description: Pods is the maximum number of pods of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- architecture
- cpu
- memory
- pods
type: object
optionalFields:
description: This field is used to specify the optional fields that
Expand Down Expand Up @@ -201,11 +209,29 @@ spec:
the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
podsMin:
anyOf:
- type: integer
- type: string
description: PodsMin is the minimum requirable number of pods
of the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
podsStep:
anyOf:
- type: integer
- type: string
description: PodsStep is the incremental value of pods of
the Flavour.
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- cpuMin
- cpuStep
- memoryMin
- memoryStep
- podsMin
- podsStep
type: object
type: object
price:
Expand Down
21 changes: 18 additions & 3 deletions deployments/node/crds/nodecore.fluidos.eu_solvers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,18 @@ spec:
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
pods:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
storage:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
required:
- cpu
- memory
type: object
rangeSelector:
description: RangeSelector represents the criteria for selecting
Expand Down Expand Up @@ -156,6 +159,12 @@ spec:
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
MaxPods:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
MaxStorage:
anyOf:
- type: integer
Expand Down Expand Up @@ -186,6 +195,12 @@ spec:
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
minPods:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
minStorage:
anyOf:
- type: integer
Expand Down
Loading