diff --git a/crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml b/crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml index 0d94d812f..1c2c60581 100644 --- a/crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml +++ b/crdsv1beta1/0001_00_operator.open-cluster-management.io_klusterlets.crd.yaml @@ -142,6 +142,18 @@ spec: enum: - Enable - Disable + flagOptions: + description: FlagOptions represents a list of flag options for the component binary. The key is the option name, the value is the option value. The FlagOptions can override all configured options including the default options and FeatureGates, etc. + type: array + items: + type: object + properties: + key: + description: Key is the flag option name of the component binary. + type: string + value: + description: Value is the value of the flag option. + type: string registrationImagePullSpec: description: RegistrationImagePullSpec represents the desired image configuration of registration agent. quay.io/open-cluster-management.io/registration:latest will be used if unspecified. type: string @@ -177,6 +189,18 @@ spec: enum: - Enable - Disable + flagOptions: + description: FlagOptions represents a list of flag options for the component binary. The key is the option name, the value is the option value. The FlagOptions can override all configured options including the default options and FeatureGates, etc. + type: array + items: + type: object + properties: + key: + description: Key is the flag option name of the component binary. + type: string + value: + description: Value is the value of the flag option. + type: string workImagePullSpec: description: WorkImagePullSpec represents the desired image configuration of work agent. quay.io/open-cluster-management.io/work:latest will be used if unspecified. type: string 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 11b91da28..2a8e0f009 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 @@ -223,6 +223,22 @@ spec: - feature type: object type: array + flagOptions: + description: FlagOptions represents a list of flag options for + the component binary. The key is the option name, the value + is the option value. The FlagOptions can override all configured + options including the default options and FeatureGates, etc. + items: + properties: + key: + description: Key is the flag option name of the component + binary. + type: string + value: + description: Value is the value of the flag option. + type: string + type: object + type: array type: object registrationImagePullSpec: description: RegistrationImagePullSpec represents the desired image @@ -274,6 +290,22 @@ spec: - feature type: object type: array + flagOptions: + description: FlagOptions represents a list of flag options for + the component binary. The key is the option name, the value + is the option value. The FlagOptions can override all configured + options including the default options and FeatureGates, etc. + items: + properties: + key: + description: Key is the flag option name of the component + binary. + type: string + value: + description: Value is the value of the flag option. + type: string + type: object + type: array type: object workImagePullSpec: description: WorkImagePullSpec represents the desired image configuration 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 b57e95f5f..5e7586f56 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 @@ -75,6 +75,22 @@ spec: - feature type: object type: array + flagOptions: + description: FlagOptions represents a list of flag options for + the component binary. The key is the option name, the value + is the option value. The FlagOptions can override all configured + options including the default options and FeatureGates, etc. + items: + properties: + key: + description: Key is the flag option name of the component + binary. + type: string + value: + description: Value is the value of the flag option. + type: string + type: object + type: array type: object addOnManagerImagePullSpec: default: quay.io/open-cluster-management/addon-manager @@ -253,6 +269,22 @@ spec: - feature type: object type: array + flagOptions: + description: FlagOptions represents a list of flag options for + the component binary. The key is the option name, the value + is the option value. The FlagOptions can override all configured + options including the default options and FeatureGates, etc. + items: + properties: + key: + description: Key is the flag option name of the component + binary. + type: string + value: + description: Value is the value of the flag option. + type: string + type: object + type: array type: object registrationImagePullSpec: default: quay.io/open-cluster-management/registration @@ -293,6 +325,22 @@ spec: - feature type: object type: array + flagOptions: + description: FlagOptions represents a list of flag options for + the component binary. The key is the option name, the value + is the option value. The FlagOptions can override all configured + options including the default options and FeatureGates, etc. + items: + properties: + key: + description: Key is the flag option name of the component + binary. + type: string + value: + description: Value is the value of the flag option. + type: string + type: object + type: array type: object workImagePullSpec: default: quay.io/open-cluster-management/work diff --git a/operator/v1/types_clustermanager.go b/operator/v1/types_clustermanager.go index e833fa7bf..50c1b9eca 100644 --- a/operator/v1/types_clustermanager.go +++ b/operator/v1/types_clustermanager.go @@ -102,6 +102,12 @@ type RegistrationHubConfiguration 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"` + + // FlagOptions represents a list of flag options for the component binary. + // The key is the option name, the value is the option value. + // The FlagOptions can override all configured options including the default options and FeatureGates, etc. + // +optional + FlagOptions []FlagOptions `json:"flagOptions,omitempty"` } type WorkConfiguration struct { @@ -114,6 +120,12 @@ type WorkConfiguration 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"` + + // FlagOptions represents a list of flag options for the component binary. + // The key is the option name, the value is the option value. + // The FlagOptions can override all configured options including the default options and FeatureGates, etc. + // +optional + FlagOptions []FlagOptions `json:"flagOptions,omitempty"` } type AddOnManagerConfiguration struct { @@ -126,6 +138,12 @@ type AddOnManagerConfiguration 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"` + + // FlagOptions represents a list of flag options for the component binary. + // The key is the option name, the value is the option value. + // The FlagOptions can override all configured options including the default options and FeatureGates, etc. + // +optional + FlagOptions []FlagOptions `json:"flagOptions,omitempty"` } type FeatureGate struct { @@ -152,6 +170,13 @@ const ( FeatureGateModeTypeDisable FeatureGateModeType = "Disable" ) +type FlagOptions struct { + // Key is the flag option name of the component binary. + Key string `json:"key,omitempty"` + // Value is the value of the flag option. + Value string `json:"value,omitempty"` +} + // HostedClusterManagerConfiguration represents customized configurations we need to set for clustermanager in the Hosted mode. type HostedClusterManagerConfiguration struct { // RegistrationWebhookConfiguration represents the customized webhook-server configuration of registration. diff --git a/operator/v1/types_klusterlet.go b/operator/v1/types_klusterlet.go index 31014edca..4ca58875a 100644 --- a/operator/v1/types_klusterlet.go +++ b/operator/v1/types_klusterlet.go @@ -157,6 +157,12 @@ type RegistrationConfiguration struct { // ManagedCluster when creating only, other actors can update it afterwards. // +optional ClusterAnnotations map[string]string `json:"clusterAnnotations,omitempty"` + + // FlagOptions represents a list of flag options for the component binary. + // The key is the option name, the value is the option value. + // The FlagOptions can override all configured options including the default options and FeatureGates, etc. + // +optional + FlagOptions []FlagOptions `json:"flagOptions,omitempty"` } const ( diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index 752ffe2c2..cc84de1b0 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -13,6 +13,7 @@ package v1 // AUTO-GENERATED FUNCTIONS START HERE var map_AddOnManagerConfiguration = map[string]string{ "featureGates": "FeatureGates represents the list of feature gates for addon manager 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.", + "flagOptions": "FlagOptions represents a list of flag options for the component binary. The key is the option name, the value is the option value. The FlagOptions can override all configured options including the default options and FeatureGates, etc.", } func (AddOnManagerConfiguration) SwaggerDoc() map[string]string { @@ -87,6 +88,15 @@ func (FeatureGate) SwaggerDoc() map[string]string { return map_FeatureGate } +var map_FlagOptions = map[string]string{ + "key": "Key is the flag option name of the component binary.", + "value": "Value is the value of the flag option.", +} + +func (FlagOptions) SwaggerDoc() map[string]string { + return map_FlagOptions +} + var map_GenerationStatus = map[string]string{ "": "GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. The definition matches the GenerationStatus defined in github.com/openshift/api/v1", "group": "group is the group of the resource that you're tracking", @@ -124,6 +134,7 @@ func (NodePlacement) SwaggerDoc() map[string]string { var map_RegistrationHubConfiguration = map[string]string{ "autoApproveUsers": "AutoApproveUser represents a list of users that can auto approve CSR and accept client. If the credential of the bootstrap-hub-kubeconfig matches to the users, the cluster created by the bootstrap-hub-kubeconfig will be auto-registered into the hub cluster. This takes effect only when ManagedClusterAutoApproval feature gate is enabled.", "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.", + "flagOptions": "FlagOptions represents a list of flag options for the component binary. The key is the option name, the value is the option value. The FlagOptions can override all configured options including the default options and FeatureGates, etc.", } func (RegistrationHubConfiguration) SwaggerDoc() map[string]string { @@ -155,6 +166,7 @@ func (WebhookConfiguration) SwaggerDoc() map[string]string { var map_WorkConfiguration = map[string]string{ "featureGates": "FeatureGates represents the list of feature gates for work 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.", + "flagOptions": "FlagOptions represents a list of flag options for the component binary. The key is the option name, the value is the option value. The FlagOptions can override all configured options including the default options and FeatureGates, etc.", } func (WorkConfiguration) SwaggerDoc() map[string]string { @@ -236,6 +248,7 @@ var map_RegistrationConfiguration = map[string]string{ "clientCertExpirationSeconds": "clientCertExpirationSeconds represents the seconds of a client certificate to expire. If it is not set or 0, the default duration seconds will be set by the hub cluster. If the value is larger than the max signing duration seconds set on the hub cluster, the max signing duration seconds will be set.", "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.", "clusterAnnotations": "ClusterAnnotations is annotations with the reserve prefix \"agent.open-cluster-management.io\" set on ManagedCluster when creating only, other actors can update it afterwards.", + "flagOptions": "FlagOptions represents a list of flag options for the component binary. The key is the option name, the value is the option value. The FlagOptions can override all configured options including the default options and FeatureGates, etc.", } func (RegistrationConfiguration) SwaggerDoc() map[string]string {