Skip to content

Commit 3fb6c88

Browse files
committed
upgrade addon API to v1beta1
Signed-off-by: Qing Hao <qhao@redhat.com>
1 parent 2337d27 commit 3fb6c88

35 files changed

+4060
-14
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ $(call add-crd-gen,workv1,./work/v1,./work/v1,./work/v1)
3636
$(call add-crd-gen,workv1alpha1,./work/v1alpha1,./work/v1alpha1,./work/v1alpha1)
3737
$(call add-crd-gen,operator,./operator/v1,./operator/v1,./operator/v1)
3838
$(call add-crd-gen,addonv1alpha1,./addon/v1alpha1,./addon/v1alpha1,./addon/v1alpha1)
39+
$(call add-crd-gen,addonv1beta1,./addon/v1alpha1 ./addon/v1beta1,./addon/v1beta1,./addon/v1beta1)
3940

4041
RUNTIME ?= podman
4142
RUNTIME_IMAGE_NAME ?= openshift-api-generator

addon/v1alpha1/0000_00_addon.open-cluster-management.io_clustermanagementaddons.crd.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ spec:
376376
type: object
377377
supportedConfigs:
378378
description: |-
379+
Deprecated: Will be removed and replaced with DefaultConfigs in v1beta1.
379380
supportedConfigs is a list of configuration types supported by add-on.
380381
An empty list means the add-on does not require configurations.
381382
The default is an empty list
@@ -422,7 +423,7 @@ spec:
422423
add-on.
423424
properties:
424425
defaultconfigReferences:
425-
description: defaultconfigReferences is a list of current add-on default
426+
description: DefaultconfigReferences is a list of current add-on default
426427
configuration references.
427428
items:
428429
description: |-

addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,8 @@ spec:
243243
- name
244244
type: object
245245
lastObservedGeneration:
246-
description: |-
247-
Deprecated: Use LastAppliedConfig instead
248-
lastObservedGeneration is the observed generation of the add-on configuration.
246+
description: lastObservedGeneration is the observed generation
247+
of the add-on configuration.
249248
format: int64
250249
type: integer
251250
name:
@@ -302,14 +301,16 @@ spec:
302301
create a csr for the addon agent with the registrationConfig.
303302
properties:
304303
signerName:
305-
description: signerName is the name of signer that addon agent
306-
will use to create csr.
304+
description: |-
305+
Deprecated: Will be replaced with type: kubeClient and type: csr in v1beta1.
306+
signerName is the name of signer that addon agent will use to create csr.
307307
maxLength: 571
308308
minLength: 5
309309
pattern: ^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$
310310
type: string
311311
subject:
312312
description: |-
313+
Deprecated: Will be replaced with type: kubeClient and type: csr in v1beta1.
313314
subject is the user subject of the addon agent to be registered to the hub.
314315
If it is not set, the addon agent will have the default subject
315316
"subject": {

addon/v1alpha1/types_clustermanagementaddon.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ type ClusterManagementAddOnSpec struct {
4545
// +optional
4646
AddOnConfiguration ConfigCoordinates `json:"addOnConfiguration,omitempty"`
4747

48+
// Deprecated: Will be removed and replaced with DefaultConfigs in v1beta1.
4849
// supportedConfigs is a list of configuration types supported by add-on.
4950
// An empty list means the add-on does not require configurations.
5051
// The default is an empty list
@@ -110,7 +111,7 @@ type ConfigGroupResource struct {
110111
// resource of the add-on configuration.
111112
// +required
112113
// +kubebuilder:validation:Required
113-
// +kubebuilder:validation:MinLength:=1
114+
// +kubebuilder:validation:MinLength=1
114115
Resource string `json:"resource"`
115116
}
116117

@@ -124,7 +125,7 @@ type ConfigReferent struct {
124125
// name of the add-on configuration.
125126
// +required
126127
// +kubebuilder:validation:Required
127-
// +kubebuilder:validation:MinLength:=1
128+
// +kubebuilder:validation:MinLength=1
128129
Name string `json:"name"`
129130
}
130131

@@ -170,12 +171,12 @@ type PlacementRef struct {
170171
// Namespace is the namespace of the placement
171172
// +required
172173
// +kubebuilder:validation:Required
173-
// +kubebuilder:validation:MinLength:=1
174+
// +kubebuilder:validation:MinLength=1
174175
Namespace string `json:"namespace"`
175176
// Name is the name of the placement
176177
// +required
177178
// +kubebuilder:validation:Required
178-
// +kubebuilder:validation:MinLength:=1
179+
// +kubebuilder:validation:MinLength=1
179180
Name string `json:"name"`
180181
}
181182

@@ -194,7 +195,7 @@ type PlacementStrategy struct {
194195

195196
// ClusterManagementAddOnStatus represents the current status of cluster management add-on.
196197
type ClusterManagementAddOnStatus struct {
197-
// defaultconfigReferences is a list of current add-on default configuration references.
198+
// DefaultconfigReferences is a list of current add-on default configuration references.
198199
// +optional
199200
DefaultConfigReferences []DefaultConfigReference `json:"defaultconfigReferences,omitempty"`
200201
// installProgression is a list of current add-on configuration references per placement.
@@ -267,7 +268,7 @@ const (
267268
AddonLifecycleAnnotationKey = "addon.open-cluster-management.io/lifecycle"
268269
// AddonLifecycleAddonManagerAnnotationValue is the value of annotation AddonLifecycleAnnotationKey indicating
269270
// that the addon installation and upgrade is handled by the general addon manager. This should be set only
270-
// when featugate AddonManager on hub is enabled
271+
// when featuregate AddonManager on hub is enabled
271272
AddonLifecycleAddonManagerAnnotationValue = "addon-manager"
272273
// AddonLifecycleSelfManageAnnotationValue is the value of annotation AddonLifecycleAnnotationKey indicating
273274
// that the addon installation and upgrade is handled the addon itself. The general addon manager will ignore

addon/v1alpha1/types_managedclusteraddon.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@ type ManagedClusterAddOnSpec struct {
5454
// RegistrationConfig defines the configuration of the addon agent to register to hub. The Klusterlet agent will
5555
// create a csr for the addon agent with the registrationConfig.
5656
type RegistrationConfig struct {
57+
// Deprecated: Will be replaced with type: kubeClient and type: csr in v1beta1.
5758
// signerName is the name of signer that addon agent will use to create csr.
5859
// +required
5960
// +kubebuilder:validation:MaxLength=571
6061
// +kubebuilder:validation:MinLength=5
6162
// +kubebuilder:validation:Pattern=^([a-z0-9][a-z0-9-]*[a-z0-9]\.)+[a-z]+\/[a-z0-9-\.]+$
6263
SignerName string `json:"signerName"`
6364

65+
// Deprecated: Will be replaced with type: kubeClient and type: csr in v1beta1.
6466
// subject is the user subject of the addon agent to be registered to the hub.
6567
// If it is not set, the addon agent will have the default subject
6668
// "subject": {
@@ -191,7 +193,6 @@ type ConfigReference struct {
191193
// defaultConfigs.
192194
ConfigReferent `json:",inline"`
193195

194-
// Deprecated: Use LastAppliedConfig instead
195196
// lastObservedGeneration is the observed generation of the add-on configuration.
196197
LastObservedGeneration int64 `json:"lastObservedGeneration"`
197198

0 commit comments

Comments
 (0)