Skip to content

Commit 90e67a9

Browse files
committed
Move internal types from finalizers to terminators
On-behalf-of: SAP <[email protected]> Signed-off-by: Simon Bein <[email protected]>
1 parent 1985671 commit 90e67a9

32 files changed

+347
-347
lines changed

config/crds/core.kcp.io_logicalclusters.yaml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,6 @@ spec:
6969
DirectlyDeletable indicates that this logical cluster can be directly deleted by the user
7070
from within by deleting the LogicalCluster object.
7171
type: boolean
72-
finalizers:
73-
description: |-
74-
Finalizers are set on creation by the system and copied to status when
75-
finalization starts.
76-
items:
77-
description: |-
78-
LogicalClusterFinalizer is a unique string corresponding to a logical cluster
79-
finalizer controller.
80-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
81-
type: string
82-
type: array
8372
initializers:
8473
description: |-
8574
initializers are set on creation by the system and copied to status when
@@ -130,6 +119,17 @@ spec:
130119
- resource
131120
- uid
132121
type: object
122+
terminators:
123+
description: |-
124+
Terminators are set on creation by the system and copied to status when
125+
termination starts.
126+
items:
127+
description: |-
128+
LogicalClusterTerminator is a unique string corresponding to a logical cluster
129+
terminator controller.
130+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
131+
type: string
132+
type: array
133133
type: object
134134
status:
135135
default: {}
@@ -187,18 +187,6 @@ spec:
187187
- type
188188
type: object
189189
type: array
190-
finalizers:
191-
description: |-
192-
Finalizers are set on creation by the system and must be cleared
193-
by a controller before the logical cluster can be deleted. The LogicalCluster object
194-
will stay in the phase "Deleting" until all finalizers are cleared.
195-
items:
196-
description: |-
197-
LogicalClusterFinalizer is a unique string corresponding to a logical cluster
198-
finalizer controller.
199-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
200-
type: string
201-
type: array
202190
initializers:
203191
description: |-
204192
initializers are set on creation by the system and must be cleared
@@ -220,6 +208,18 @@ spec:
220208
- Ready
221209
- Unavailable
222210
type: string
211+
terminator:
212+
description: |-
213+
Terminators are set on creation by the system and must be cleared
214+
by a controller before the logical cluster can be deleted. The LogicalCluster object
215+
will stay in the phase "Deleting" until all terminator are cleared.
216+
items:
217+
description: |-
218+
LogicalClusterTerminator is a unique string corresponding to a logical cluster
219+
terminator controller.
220+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
221+
type: string
222+
type: array
223223
type: object
224224
type: object
225225
served: true

config/crds/tenancy.kcp.io_workspaces.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -279,17 +279,6 @@ spec:
279279
- type
280280
type: object
281281
type: array
282-
finalizers:
283-
description: |-
284-
finalizers must be cleared by a controller before the workspace is being
285-
deleted.
286-
items:
287-
description: |-
288-
LogicalClusterFinalizer is a unique string corresponding to a logical cluster
289-
finalizer controller.
290-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
291-
type: string
292-
type: array
293282
initializers:
294283
description: |-
295284
initializers must be cleared by a controller before the workspace is ready
@@ -310,6 +299,17 @@ spec:
310299
- Ready
311300
- Unavailable
312301
type: string
302+
terminators:
303+
description: |-
304+
terminators must be cleared by a controller before the workspace is being
305+
deleted.
306+
items:
307+
description: |-
308+
LogicalClusterTerminator is a unique string corresponding to a logical cluster
309+
terminator controller.
310+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
311+
type: string
312+
type: array
313313
type: object
314314
required:
315315
- spec

config/crds/tenancy.kcp.io_workspacetypes.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,6 @@ spec:
157157
type: object
158158
type: array
159159
type: object
160-
finalizer:
161-
description: |-
162-
Finalizer determines if this WorkspaceType has an associated finalizing
163-
controller. These controllers are used to add functionality to a Workspace;
164-
all controllers must finish their work before the Workspace is being deleted.
165-
166-
One finalizing controller is supported per WorkspaceType; the identifier
167-
for this finalizer will be a colon-delimited string using the workspace in which
168-
the WorkspaceType is defined, and the type's name. For example, if a
169-
WorkspaceType `example` is created in the `root:org` workspace, the implicit
170-
finalizer name is `root:org:example`.
171-
type: boolean
172160
initializer:
173161
description: |-
174162
initializer determines if this WorkspaceType has an associated initializing
@@ -261,6 +249,18 @@ spec:
261249
minItems: 1
262250
type: array
263251
type: object
252+
terminator:
253+
description: |-
254+
Terminator determines if this WorkspaceType has an associated terminating
255+
controller. These controllers are used to add functionality to a Workspace;
256+
all controllers must finish their work before the Workspace is being deleted.
257+
258+
One terminating controller is supported per WorkspaceType; the identifier
259+
for this terminator will be a colon-delimited string using the workspace in which
260+
the WorkspaceType is defined, and the type's name. For example, if a
261+
WorkspaceType `example` is created in the `root:org` workspace, the implicit
262+
terminator name is `root:org:example`.
263+
type: boolean
264264
type: object
265265
status:
266266
description: WorkspaceTypeStatus defines the observed state of WorkspaceType.

config/root-phase0/apiexport-tenancy.kcp.io.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ spec:
1414
crd: {}
1515
- group: tenancy.kcp.io
1616
name: workspaces
17-
schema: v250820-d9a41c325.workspaces.tenancy.kcp.io
17+
schema: v251015-1d163d0e5.workspaces.tenancy.kcp.io
1818
storage:
1919
crd: {}
2020
- group: tenancy.kcp.io
2121
name: workspacetypes
22-
schema: v250603-d4d365c8e.workspacetypes.tenancy.kcp.io
22+
schema: v251015-1d163d0e5.workspacetypes.tenancy.kcp.io
2323
storage:
2424
crd: {}
2525
status: {}

config/root-phase0/apiresourceschema-logicalclusters.core.kcp.io.yaml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apis.kcp.io/v1alpha1
22
kind: APIResourceSchema
33
metadata:
44
creationTimestamp: null
5-
name: v250820-d9a41c325.logicalclusters.core.kcp.io
5+
name: v251015-1d163d0e5.logicalclusters.core.kcp.io
66
spec:
77
group: core.kcp.io
88
names:
@@ -67,17 +67,6 @@ spec:
6767
DirectlyDeletable indicates that this logical cluster can be directly deleted by the user
6868
from within by deleting the LogicalCluster object.
6969
type: boolean
70-
finalizers:
71-
description: |-
72-
Finalizers are set on creation by the system and copied to status when
73-
finalization starts.
74-
items:
75-
description: |-
76-
LogicalClusterFinalizer is a unique string corresponding to a logical cluster
77-
finalizer controller.
78-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
79-
type: string
80-
type: array
8170
initializers:
8271
description: |-
8372
initializers are set on creation by the system and copied to status when
@@ -128,6 +117,17 @@ spec:
128117
- resource
129118
- uid
130119
type: object
120+
terminators:
121+
description: |-
122+
Terminators are set on creation by the system and copied to status when
123+
termination starts.
124+
items:
125+
description: |-
126+
LogicalClusterTerminator is a unique string corresponding to a logical cluster
127+
terminator controller.
128+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
129+
type: string
130+
type: array
131131
type: object
132132
status:
133133
default: {}
@@ -185,18 +185,6 @@ spec:
185185
- type
186186
type: object
187187
type: array
188-
finalizers:
189-
description: |-
190-
Finalizers are set on creation by the system and must be cleared
191-
by a controller before the logical cluster can be deleted. The LogicalCluster object
192-
will stay in the phase "Deleting" until all finalizers are cleared.
193-
items:
194-
description: |-
195-
LogicalClusterFinalizer is a unique string corresponding to a logical cluster
196-
finalizer controller.
197-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
198-
type: string
199-
type: array
200188
initializers:
201189
description: |-
202190
initializers are set on creation by the system and must be cleared
@@ -218,6 +206,18 @@ spec:
218206
- Ready
219207
- Unavailable
220208
type: string
209+
terminator:
210+
description: |-
211+
Terminators are set on creation by the system and must be cleared
212+
by a controller before the logical cluster can be deleted. The LogicalCluster object
213+
will stay in the phase "Deleting" until all terminator are cleared.
214+
items:
215+
description: |-
216+
LogicalClusterTerminator is a unique string corresponding to a logical cluster
217+
terminator controller.
218+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
219+
type: string
220+
type: array
221221
type: object
222222
type: object
223223
served: true

config/root-phase0/apiresourceschema-workspaces.tenancy.kcp.io.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apis.kcp.io/v1alpha1
22
kind: APIResourceSchema
33
metadata:
44
creationTimestamp: null
5-
name: v250820-d9a41c325.workspaces.tenancy.kcp.io
5+
name: v251015-1d163d0e5.workspaces.tenancy.kcp.io
66
spec:
77
group: tenancy.kcp.io
88
names:
@@ -277,17 +277,6 @@ spec:
277277
- type
278278
type: object
279279
type: array
280-
finalizers:
281-
description: |-
282-
finalizers must be cleared by a controller before the workspace is being
283-
deleted.
284-
items:
285-
description: |-
286-
LogicalClusterFinalizer is a unique string corresponding to a logical cluster
287-
finalizer controller.
288-
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
289-
type: string
290-
type: array
291280
initializers:
292281
description: |-
293282
initializers must be cleared by a controller before the workspace is ready
@@ -308,6 +297,17 @@ spec:
308297
- Ready
309298
- Unavailable
310299
type: string
300+
terminators:
301+
description: |-
302+
terminators must be cleared by a controller before the workspace is being
303+
deleted.
304+
items:
305+
description: |-
306+
LogicalClusterTerminator is a unique string corresponding to a logical cluster
307+
terminator controller.
308+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(:[a-z0-9]([-a-z0-9]*[a-z0-9])?)*(:[a-z0-9][a-z0-9]([-a-z0-9]*[a-z0-9])?))|(system:.+)$
309+
type: string
310+
type: array
311311
type: object
312312
required:
313313
- spec

config/root-phase0/apiresourceschema-workspacetypes.tenancy.kcp.io.yaml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apis.kcp.io/v1alpha1
22
kind: APIResourceSchema
33
metadata:
44
creationTimestamp: null
5-
name: v250603-d4d365c8e.workspacetypes.tenancy.kcp.io
5+
name: v251015-1d163d0e5.workspacetypes.tenancy.kcp.io
66
spec:
77
group: tenancy.kcp.io
88
names:
@@ -155,18 +155,6 @@ spec:
155155
type: object
156156
type: array
157157
type: object
158-
finalizer:
159-
description: |-
160-
Finalizer determines if this WorkspaceType has an associated finalizing
161-
controller. These controllers are used to add functionality to a Workspace;
162-
all controllers must finish their work before the Workspace is being deleted.
163-
164-
One finalizing controller is supported per WorkspaceType; the identifier
165-
for this finalizer will be a colon-delimited string using the workspace in which
166-
the WorkspaceType is defined, and the type's name. For example, if a
167-
WorkspaceType `example` is created in the `root:org` workspace, the implicit
168-
finalizer name is `root:org:example`.
169-
type: boolean
170158
initializer:
171159
description: |-
172160
initializer determines if this WorkspaceType has an associated initializing
@@ -259,6 +247,18 @@ spec:
259247
minItems: 1
260248
type: array
261249
type: object
250+
terminator:
251+
description: |-
252+
Terminator determines if this WorkspaceType has an associated terminating
253+
controller. These controllers are used to add functionality to a Workspace;
254+
all controllers must finish their work before the Workspace is being deleted.
255+
256+
One terminating controller is supported per WorkspaceType; the identifier
257+
for this terminator will be a colon-delimited string using the workspace in which
258+
the WorkspaceType is defined, and the type's name. For example, if a
259+
WorkspaceType `example` is created in the `root:org` workspace, the implicit
260+
terminator name is `root:org:example`.
261+
type: boolean
262262
type: object
263263
status:
264264
description: WorkspaceTypeStatus defines the observed state of WorkspaceType.

pkg/admission/logicalcluster/admission.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ func (o *plugin) Admit(ctx context.Context, a admission.Attributes, _ admission.
111111

112112
logicalCluster.Status.Initializers = logicalCluster.Spec.Initializers
113113

114-
logicalCluster.Status.Finalizers = logicalCluster.Spec.Finalizers
114+
logicalCluster.Status.Terminators = logicalCluster.Spec.Terminators
115115

116116
return updateUnstructured(u, logicalCluster)
117117
}

pkg/openapi/zz_generated.openapi.go

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

0 commit comments

Comments
 (0)