Skip to content

Commit cadf714

Browse files
authored
✨add ClusterClaimConfiguration to API (#363)
* add clusterclaimconfig type Signed-off-by: Omar Farag <[email protected]> * move ClusterClaimConfiguration to be under RegistrationConfiguration Signed-off-by: Omar Farag <[email protected]> --------- Signed-off-by: Omar Farag <[email protected]>
1 parent 11622a5 commit cadf714

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed

operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,24 @@ spec:
251251
ClusterAnnotations is annotations with the reserve prefix "agent.open-cluster-management.io" set on
252252
ManagedCluster when creating only, other actors can update it afterwards.
253253
type: object
254+
clusterClaimConfiguration:
255+
description: |-
256+
ClusterClaimConfiguration represents the configuration of ClusterClaim
257+
Effective only when the `ClusterClaim` feature gate is enabled.
258+
properties:
259+
maxCustomClusterClaims:
260+
default: 20
261+
description: Maximum number of custom ClusterClaims allowed.
262+
format: int32
263+
type: integer
264+
reservedClusterClaimSuffixes:
265+
description: Custom suffixes for reserved ClusterClaims.
266+
items:
267+
type: string
268+
type: array
269+
required:
270+
- maxCustomClusterClaims
271+
type: object
254272
featureGates:
255273
description: "FeatureGates represents the list of feature gates
256274
for registration\nIf it is set empty, default feature gates

operator/v1/types_klusterlet.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,24 @@ type RegistrationConfiguration struct {
176176
// This provides driver details required to register with hub
177177
// +optional
178178
RegistrationDriver RegistrationDriver `json:"registrationDriver,omitempty"`
179+
180+
// ClusterClaimConfiguration represents the configuration of ClusterClaim
181+
// Effective only when the `ClusterClaim` feature gate is enabled.
182+
// +optional
183+
ClusterClaimConfiguration *ClusterClaimConfiguration `json:"clusterClaimConfiguration,omitempty"`
184+
}
185+
186+
// ClusterClaimConfiguration represents the configuration of ClusterClaim
187+
type ClusterClaimConfiguration struct {
188+
// Maximum number of custom ClusterClaims allowed.
189+
// +kubebuilder:validation:Required
190+
// +kubebuilder:default:=20
191+
// +required
192+
MaxCustomClusterClaims int32 `json:"maxCustomClusterClaims"`
193+
194+
// Custom suffixes for reserved ClusterClaims.
195+
// +optional
196+
ReservedClusterClaimSuffixes []string `json:"reservedClusterClaimSuffixes,omitempty"`
179197
}
180198

181199
type RegistrationDriver struct {

operator/v1/zz_generated.deepcopy.go

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

operator/v1/zz_generated.swagger_doc_generated.go

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

0 commit comments

Comments
 (0)