Skip to content

Commit f28d851

Browse files
authored
Fixed Liqo pods field compatibility (#25)
1 parent ec6c1d6 commit f28d851

26 files changed

+294
-17
lines changed

apis/nodecore/v1alpha1/common.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ type Partition struct {
5252
Architecture string `json:"architecture"`
5353
CPU resource.Quantity `json:"cpu"`
5454
Memory resource.Quantity `json:"memory"`
55+
Pods resource.Quantity `json:"pods"`
5556
Gpu resource.Quantity `json:"gpu,omitempty"`
5657
EphemeralStorage resource.Quantity `json:"ephemeral-storage,omitempty"`
5758
Storage resource.Quantity `json:"storage,omitempty"`

apis/nodecore/v1alpha1/flavour_types.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ type Characteristics struct {
3636
// Memory is the amount of RAM of the Flavour.
3737
Memory resource.Quantity `json:"memory"`
3838

39+
// Pods is the maximum number of pods of the Flavour.
40+
Pods resource.Quantity `json:"pods"`
41+
3942
// GPU is the number of GPU cores of the Flavour.
4043
Gpu resource.Quantity `json:"gpu,omitempty"`
4144

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

69+
// PodsMin is the minimum requirable number of pods of the Flavour.
70+
PodsMin resource.Quantity `json:"podsMin"`
71+
6672
// CpuStep is the incremental value of CPU cores of the Flavour.
6773
CpuStep resource.Quantity `json:"cpuStep"`
6874

6975
// MemoryStep is the incremental value of RAM of the Flavour.
7076
MemoryStep resource.Quantity `json:"memoryStep"`
77+
78+
// PodsStep is the incremental value of pods of the Flavour.
79+
PodsStep resource.Quantity `json:"podsStep"`
7180
}
7281

7382
// Aggregatable represents the aggregation properties of a Flavour, such as the minimum instance count.

apis/nodecore/v1alpha1/solver_types.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,9 @@ type FlavourSelector struct {
5454

5555
// MatchSelector represents the criteria for selecting Flavours through a strict match.
5656
type MatchSelector struct {
57-
Cpu resource.Quantity `json:"cpu"`
58-
Memory resource.Quantity `json:"memory"`
57+
CPU resource.Quantity `json:"cpu,omitempty"`
58+
Memory resource.Quantity `json:"memory,omitempty"`
59+
Pods resource.Quantity `json:"pods,omitempty"`
5960
Storage resource.Quantity `json:"storage,omitempty"`
6061
EphemeralStorage resource.Quantity `json:"ephemeralStorage,omitempty"`
6162
Gpu resource.Quantity `json:"gpu,omitempty"`
@@ -65,11 +66,13 @@ type MatchSelector struct {
6566
type RangeSelector struct {
6667
MinCpu resource.Quantity `json:"minCpu,omitempty"`
6768
MinMemory resource.Quantity `json:"minMemory,omitempty"`
69+
MinPods resource.Quantity `json:"minPods,omitempty"`
6870
MinEph resource.Quantity `json:"minEph,omitempty"`
6971
MinStorage resource.Quantity `json:"minStorage,omitempty"`
7072
MinGpu resource.Quantity `json:"minGpu,omitempty"`
7173
MaxCpu resource.Quantity `json:"MaxCpu,omitempty"`
7274
MaxMemory resource.Quantity `json:"MaxMemory,omitempty"`
75+
MaxPods resource.Quantity `json:"MaxPods,omitempty"`
7376
MaxEph resource.Quantity `json:"MaxEph,omitempty"`
7477
MaxStorage resource.Quantity `json:"MaxStorage,omitempty"`
7578
MaxGpu resource.Quantity `json:"MaxGpu,omitempty"`

apis/nodecore/v1alpha1/zz_generated.deepcopy.go

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deployments/node/crds/advertisement.fluidos.eu_discoveries.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,18 @@ spec:
8989
- type: string
9090
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
9191
x-kubernetes-int-or-string: true
92+
pods:
93+
anyOf:
94+
- type: integer
95+
- type: string
96+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
97+
x-kubernetes-int-or-string: true
9298
storage:
9399
anyOf:
94100
- type: integer
95101
- type: string
96102
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
97103
x-kubernetes-int-or-string: true
98-
required:
99-
- cpu
100-
- memory
101104
type: object
102105
rangeSelector:
103106
description: RangeSelector represents the criteria for selecting
@@ -127,6 +130,12 @@ spec:
127130
- type: string
128131
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
129132
x-kubernetes-int-or-string: true
133+
MaxPods:
134+
anyOf:
135+
- type: integer
136+
- type: string
137+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
138+
x-kubernetes-int-or-string: true
130139
MaxStorage:
131140
anyOf:
132141
- type: integer
@@ -157,6 +166,12 @@ spec:
157166
- type: string
158167
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
159168
x-kubernetes-int-or-string: true
169+
minPods:
170+
anyOf:
171+
- type: integer
172+
- type: string
173+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
174+
x-kubernetes-int-or-string: true
160175
minStorage:
161176
anyOf:
162177
- type: integer

deployments/node/crds/advertisement.fluidos.eu_peeringcandidates.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,19 @@ spec:
117117
storage of the Flavour.
118118
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
119119
x-kubernetes-int-or-string: true
120+
pods:
121+
anyOf:
122+
- type: integer
123+
- type: string
124+
description: Pods is the maximum number of pods of the
125+
Flavour.
126+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
127+
x-kubernetes-int-or-string: true
120128
required:
121129
- architecture
122130
- cpu
123131
- memory
132+
- pods
124133
type: object
125134
optionalFields:
126135
description: This field is used to specify the optional fields
@@ -211,11 +220,29 @@ spec:
211220
RAM of the Flavour.
212221
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
213222
x-kubernetes-int-or-string: true
223+
podsMin:
224+
anyOf:
225+
- type: integer
226+
- type: string
227+
description: PodsMin is the minimum requirable number
228+
of pods of the Flavour.
229+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
230+
x-kubernetes-int-or-string: true
231+
podsStep:
232+
anyOf:
233+
- type: integer
234+
- type: string
235+
description: PodsStep is the incremental value of
236+
pods of the Flavour.
237+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
238+
x-kubernetes-int-or-string: true
214239
required:
215240
- cpuMin
216241
- cpuStep
217242
- memoryMin
218243
- memoryStep
244+
- podsMin
245+
- podsStep
219246
type: object
220247
type: object
221248
price:

deployments/node/crds/nodecore.fluidos.eu_allocations.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,19 @@ spec:
123123
storage of the Flavour.
124124
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
125125
x-kubernetes-int-or-string: true
126+
pods:
127+
anyOf:
128+
- type: integer
129+
- type: string
130+
description: Pods is the maximum number of pods of the
131+
Flavour.
132+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
133+
x-kubernetes-int-or-string: true
126134
required:
127135
- architecture
128136
- cpu
129137
- memory
138+
- pods
130139
type: object
131140
optionalFields:
132141
description: This field is used to specify the optional fields
@@ -217,11 +226,29 @@ spec:
217226
RAM of the Flavour.
218227
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
219228
x-kubernetes-int-or-string: true
229+
podsMin:
230+
anyOf:
231+
- type: integer
232+
- type: string
233+
description: PodsMin is the minimum requirable number
234+
of pods of the Flavour.
235+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
236+
x-kubernetes-int-or-string: true
237+
podsStep:
238+
anyOf:
239+
- type: integer
240+
- type: string
241+
description: PodsStep is the incremental value of
242+
pods of the Flavour.
243+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
244+
x-kubernetes-int-or-string: true
220245
required:
221246
- cpuMin
222247
- cpuStep
223248
- memoryMin
224249
- memoryStep
250+
- podsMin
251+
- podsStep
225252
type: object
226253
type: object
227254
price:
@@ -345,10 +372,18 @@ spec:
345372
of the Flavour.
346373
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
347374
x-kubernetes-int-or-string: true
375+
pods:
376+
anyOf:
377+
- type: integer
378+
- type: string
379+
description: Pods is the maximum number of pods of the Flavour.
380+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
381+
x-kubernetes-int-or-string: true
348382
required:
349383
- architecture
350384
- cpu
351385
- memory
386+
- pods
352387
type: object
353388
type:
354389
description: 'This specifies the type of the node: Node (Physical

deployments/node/crds/nodecore.fluidos.eu_flavours.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,18 @@ spec:
109109
of the Flavour.
110110
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
111111
x-kubernetes-int-or-string: true
112+
pods:
113+
anyOf:
114+
- type: integer
115+
- type: string
116+
description: Pods is the maximum number of pods of the Flavour.
117+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
118+
x-kubernetes-int-or-string: true
112119
required:
113120
- architecture
114121
- cpu
115122
- memory
123+
- pods
116124
type: object
117125
optionalFields:
118126
description: This field is used to specify the optional fields that
@@ -201,11 +209,29 @@ spec:
201209
the Flavour.
202210
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
203211
x-kubernetes-int-or-string: true
212+
podsMin:
213+
anyOf:
214+
- type: integer
215+
- type: string
216+
description: PodsMin is the minimum requirable number of pods
217+
of the Flavour.
218+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
219+
x-kubernetes-int-or-string: true
220+
podsStep:
221+
anyOf:
222+
- type: integer
223+
- type: string
224+
description: PodsStep is the incremental value of pods of
225+
the Flavour.
226+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
227+
x-kubernetes-int-or-string: true
204228
required:
205229
- cpuMin
206230
- cpuStep
207231
- memoryMin
208232
- memoryStep
233+
- podsMin
234+
- podsStep
209235
type: object
210236
type: object
211237
price:

deployments/node/crds/nodecore.fluidos.eu_solvers.yaml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,15 +118,18 @@ spec:
118118
- type: string
119119
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
120120
x-kubernetes-int-or-string: true
121+
pods:
122+
anyOf:
123+
- type: integer
124+
- type: string
125+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
126+
x-kubernetes-int-or-string: true
121127
storage:
122128
anyOf:
123129
- type: integer
124130
- type: string
125131
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
126132
x-kubernetes-int-or-string: true
127-
required:
128-
- cpu
129-
- memory
130133
type: object
131134
rangeSelector:
132135
description: RangeSelector represents the criteria for selecting
@@ -156,6 +159,12 @@ spec:
156159
- type: string
157160
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
158161
x-kubernetes-int-or-string: true
162+
MaxPods:
163+
anyOf:
164+
- type: integer
165+
- type: string
166+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
167+
x-kubernetes-int-or-string: true
159168
MaxStorage:
160169
anyOf:
161170
- type: integer
@@ -186,6 +195,12 @@ spec:
186195
- type: string
187196
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
188197
x-kubernetes-int-or-string: true
198+
minPods:
199+
anyOf:
200+
- type: integer
201+
- type: string
202+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
203+
x-kubernetes-int-or-string: true
189204
minStorage:
190205
anyOf:
191206
- type: integer

0 commit comments

Comments
 (0)