From 0c1571cda0c094def20e82324cab2514b219a537 Mon Sep 17 00:00:00 2001 From: ZhiweiYin Date: Tue, 31 May 2022 15:21:00 +0800 Subject: [PATCH] add args in registrationConfiguration for operator APIs Signed-off-by: ZhiweiYin --- ..._operator.open-cluster-management.io_klusterlets.crd.yaml | 5 +++++ ...rator.open-cluster-management.io_clustermanagers.crd.yaml | 5 +++++ ..._operator.open-cluster-management.io_klusterlets.crd.yaml | 5 +++++ operator/v1/types.go | 4 ++++ operator/v1/zz_generated.deepcopy.go | 5 +++++ operator/v1/zz_generated.swagger_doc_generated.go | 1 + 6 files changed, 25 insertions(+) diff --git a/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml b/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml index 0f8748c3..0284504d 100644 --- a/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml +++ b/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml @@ -93,6 +93,11 @@ spec: description: RegistrationConfiguration contains the configuration of registration type: object properties: + args: + description: Args is list of valid flag arguments that are accepted in registration. The format is only allowed --arg1=xxx. + type: array + items: + type: string featureGates: description: "FeatureGates represents the list of feature gates for registration If it is set empty, default feature gates will be used. If it is set, featuregate/Foo is an example of one item in FeatureGates: 1. If featuregate/Foo does not exist, registration-operator will discard it 2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true] 3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false, \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false." type: array diff --git a/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml b/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml index c40c6471..03b469b2 100644 --- a/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml +++ b/operator/v1/0000_01_operator.open-cluster-management.io_clustermanagers.crd.yaml @@ -124,6 +124,11 @@ spec: description: RegistrationConfiguration contains the configuration of registration type: object properties: + args: + description: Args is list of valid flag arguments that are accepted in registration. The format is only allowed --arg1=xxx. + type: array + items: + type: string featureGates: description: "FeatureGates represents the list of feature gates for registration If it is set empty, default feature gates will be used. If it is set, featuregate/Foo is an example of one item in FeatureGates: 1. If featuregate/Foo does not exist, registration-operator will discard it 2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true] 3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false, \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false." type: array diff --git a/operator/v1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml b/operator/v1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml index e3128426..f067ee48 100644 --- a/operator/v1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml +++ b/operator/v1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml @@ -93,6 +93,11 @@ spec: description: RegistrationConfiguration contains the configuration of registration type: object properties: + args: + description: Args is list of valid flag arguments that are accepted in registration. The format is only allowed --arg1=xxx. + type: array + items: + type: string featureGates: description: "FeatureGates represents the list of feature gates for registration If it is set empty, default feature gates will be used. If it is set, featuregate/Foo is an example of one item in FeatureGates: 1. If featuregate/Foo does not exist, registration-operator will discard it 2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true] 3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false, \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false." type: array diff --git a/operator/v1/types.go b/operator/v1/types.go index 3cdaf424..d3f3557d 100644 --- a/operator/v1/types.go +++ b/operator/v1/types.go @@ -69,6 +69,10 @@ type RegistrationConfiguration struct { // he can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false. // +optional FeatureGates []FeatureGate `json:"featureGates,omitempty"` + + // Args is list of valid flag arguments that are accepted in registration. + // The format is only allowed --arg1=xxx. + Args []string `json:"args,omitempty"` } type FeatureGate struct { diff --git a/operator/v1/zz_generated.deepcopy.go b/operator/v1/zz_generated.deepcopy.go index 95854a09..bd6887e3 100644 --- a/operator/v1/zz_generated.deepcopy.go +++ b/operator/v1/zz_generated.deepcopy.go @@ -377,6 +377,11 @@ func (in *RegistrationConfiguration) DeepCopyInto(out *RegistrationConfiguration *out = make([]FeatureGate, len(*in)) copy(*out, *in) } + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } return } diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index 3b98b32b..2a9a15de 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -169,6 +169,7 @@ func (NodePlacement) SwaggerDoc() map[string]string { var map_RegistrationConfiguration = map[string]string{ "featureGates": "FeatureGates represents the list of feature gates for registration If it is set empty, default feature gates will be used. If it is set, featuregate/Foo is an example of one item in FeatureGates:\n 1. If featuregate/Foo does not exist, registration-operator will discard it\n 2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]\n 3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,\n \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.", + "args": "Args is list of valid flag arguments that are accepted in registration. The format is only allowed --arg1=xxx.", } func (RegistrationConfiguration) SwaggerDoc() map[string]string {