Skip to content

Commit 906c708

Browse files
committed
feat(tenant): add available classes as status fields
Signed-off-by: Oliver Bähler <[email protected]>
1 parent e0fa635 commit 906c708

File tree

17 files changed

+1328
-305
lines changed

17 files changed

+1328
-305
lines changed

api/v1beta2/gateway_options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import (
88
)
99

1010
type GatewayOptions struct {
11-
AllowedClasses *api.SelectionListWithDefaultSpec `json:"allowedClasses,omitempty"`
11+
AllowedClasses *api.DefaultAllowedListSpec `json:"allowedClasses,omitempty"`
1212
}

api/v1beta2/tenant_status.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ const (
2121
type TenantStatus struct {
2222
// Allowed Cluster Objects within Tenant
2323
TenantAvailableStatus `json:",inline"`
24+
2425
// +kubebuilder:default=Active
2526
// The operational state of the Tenant. Possible values are "Active", "Cordoned".
2627
State tenantState `json:"state"`
@@ -37,8 +38,6 @@ type TenantStatus struct {
3738
type TenantAvailableStatus struct {
3839
// Available Class Types within Tenant
3940
Classes TenantAvailableClassesStatus `json:"classes,omitempty"`
40-
// Available Nodes for Scheduling
41-
Nodes []string `json:"nodes,omitempty"`
4241
}
4342

4443
type TenantAvailableClassesStatus struct {

api/v1beta2/zz_generated.deepcopy.go

Lines changed: 1 addition & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/capsule/crds/capsule.clastix.io_tenants.yaml

Lines changed: 52 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,13 @@ spec:
123123
can use only one of the allowed trusted registries. Optional.
124124
properties:
125125
allowed:
126+
description: Match exact elements which are allowed as class names
127+
within this tenant
126128
items:
127129
type: string
128130
type: array
129131
allowedRegex:
132+
description: Match elements by regex (DEPRECATED)
130133
type: string
131134
type: object
132135
imagePullPolicies:
@@ -151,10 +154,13 @@ spec:
151154
Optional.
152155
properties:
153156
allowed:
157+
description: Match exact elements which are allowed as class
158+
names within this tenant
154159
items:
155160
type: string
156161
type: array
157162
allowedRegex:
163+
description: Match elements by regex (DEPRECATED)
158164
type: string
159165
type: object
160166
allowedHostnames:
@@ -164,10 +170,13 @@ spec:
164170
Optional.
165171
properties:
166172
allowed:
173+
description: Match exact elements which are allowed as class
174+
names within this tenant
167175
items:
168176
type: string
169177
type: array
170178
allowedRegex:
179+
description: Match elements by regex (DEPRECATED)
171180
type: string
172181
type: object
173182
hostnameCollisionScope:
@@ -840,10 +849,13 @@ spec:
840849
can use only one of the allowed PriorityClasses. Optional.
841850
properties:
842851
allowed:
852+
description: Match exact elements which are allowed as class names
853+
within this tenant
843854
items:
844855
type: string
845856
type: array
846857
allowedRegex:
858+
description: Match elements by regex (DEPRECATED)
847859
type: string
848860
type: object
849861
resourceQuotas:
@@ -1012,10 +1024,13 @@ spec:
10121024
Optional.
10131025
properties:
10141026
allowed:
1027+
description: Match exact elements which are allowed as class names
1028+
within this tenant
10151029
items:
10161030
type: string
10171031
type: array
10181032
allowedRegex:
1033+
description: Match elements by regex (DEPRECATED)
10191034
type: string
10201035
type: object
10211036
required:
@@ -1164,10 +1179,13 @@ spec:
11641179
can use only one of the allowed trusted registries. Optional.
11651180
properties:
11661181
allowed:
1182+
description: Match exact elements which are allowed as class names
1183+
within this tenant
11671184
items:
11681185
type: string
11691186
type: array
11701187
allowedRegex:
1188+
description: Match elements by regex (DEPRECATED)
11711189
type: string
11721190
type: object
11731191
cordoned:
@@ -1191,7 +1209,18 @@ spec:
11911209
properties:
11921210
allowedClasses:
11931211
properties:
1212+
allowed:
1213+
description: Match exact elements which are allowed as class
1214+
names within this tenant
1215+
items:
1216+
type: string
1217+
type: array
1218+
allowedRegex:
1219+
description: Match elements by regex (DEPRECATED)
1220+
type: string
11941221
default:
1222+
description: Default class for tenant, when no class is set.
1223+
This may overwrite even the global default.
11951224
type: string
11961225
matchExpressions:
11971226
description: matchExpressions is a list of label selector
@@ -1264,12 +1293,17 @@ spec:
12641293
Optional.
12651294
properties:
12661295
allowed:
1296+
description: Match exact elements which are allowed as class
1297+
names within this tenant
12671298
items:
12681299
type: string
12691300
type: array
12701301
allowedRegex:
1302+
description: Match elements by regex (DEPRECATED)
12711303
type: string
12721304
default:
1305+
description: Default class for tenant, when no class is set.
1306+
This may overwrite even the global default.
12731307
type: string
12741308
matchExpressions:
12751309
description: matchExpressions is a list of label selector
@@ -1321,10 +1355,13 @@ spec:
13211355
Optional.
13221356
properties:
13231357
allowed:
1358+
description: Match exact elements which are allowed as class
1359+
names within this tenant
13241360
items:
13251361
type: string
13261362
type: array
13271363
allowedRegex:
1364+
description: Match elements by regex (DEPRECATED)
13281365
type: string
13291366
type: object
13301367
hostnameCollisionScope:
@@ -2139,12 +2176,17 @@ spec:
21392176
Optional.
21402177
properties:
21412178
allowed:
2179+
description: Match exact elements which are allowed as class names
2180+
within this tenant
21422181
items:
21432182
type: string
21442183
type: array
21452184
allowedRegex:
2185+
description: Match elements by regex (DEPRECATED)
21462186
type: string
21472187
default:
2188+
description: Default class for tenant, when no class is set. This
2189+
may overwrite even the global default.
21482190
type: string
21492191
matchExpressions:
21502192
description: matchExpressions is a list of label selector requirements.
@@ -2283,12 +2325,17 @@ spec:
22832325
Optional.
22842326
properties:
22852327
allowed:
2328+
description: Match exact elements which are allowed as class names
2329+
within this tenant
22862330
items:
22872331
type: string
22882332
type: array
22892333
allowedRegex:
2334+
description: Match elements by regex (DEPRECATED)
22902335
type: string
22912336
default:
2337+
description: Default class for tenant, when no class is set. This
2338+
may overwrite even the global default.
22922339
type: string
22932340
matchExpressions:
22942341
description: matchExpressions is a list of label selector requirements.
@@ -2413,12 +2460,17 @@ spec:
24132460
Optional.
24142461
properties:
24152462
allowed:
2463+
description: Match exact elements which are allowed as class names
2464+
within this tenant
24162465
items:
24172466
type: string
24182467
type: array
24192468
allowedRegex:
2469+
description: Match elements by regex (DEPRECATED)
24202470
type: string
24212471
default:
2472+
description: Default class for tenant, when no class is set. This
2473+
may overwrite even the global default.
24222474
type: string
24232475
matchExpressions:
24242476
description: matchExpressions is a list of label selector requirements.
@@ -2554,11 +2606,6 @@ spec:
25542606
items:
25552607
type: string
25562608
type: array
2557-
nodes:
2558-
description: Available Nodes for Scheduling
2559-
items:
2560-
type: string
2561-
type: array
25622609
size:
25632610
description: How many namespaces are assigned to the Tenant.
25642611
type: integer

0 commit comments

Comments
 (0)