diff --git a/go.mod b/go.mod index 3f56b1f93..bfd5215a7 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,7 @@ require ( k8s.io/kubectl v0.34.3 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 open-cluster-management.io/addon-framework v1.1.1-0.20251222073158-b5846d76add9 - open-cluster-management.io/api v1.1.1-0.20260116065909-8307845802e0 + open-cluster-management.io/api v1.1.1-0.20260126032025-b449b3b4e4b9 open-cluster-management.io/sdk-go v1.1.1-0.20260120013142-6d087c9a2a3d sigs.k8s.io/about-api v0.0.0-20250131010323-518069c31c03 sigs.k8s.io/cluster-inventory-api v0.0.0-20251124125836-445319b6307a diff --git a/go.sum b/go.sum index 540dac96b..1245d41d8 100644 --- a/go.sum +++ b/go.sum @@ -585,8 +585,8 @@ k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 h1:hwvWFiBzdWw1FhfY1FooPn3kzWuJ8 k8s.io/utils v0.0.0-20250604170112-4c0f3b243397/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= open-cluster-management.io/addon-framework v1.1.1-0.20251222073158-b5846d76add9 h1:Ll4rTS7hlg9PvEZwVjfpRqvG+Vywclcw1B08Vnf0w3E= open-cluster-management.io/addon-framework v1.1.1-0.20251222073158-b5846d76add9/go.mod h1:St9LTEuZ5ADLY9cVXSp+rVE/ZbPJ+hzNQ7/YcsiQVd8= -open-cluster-management.io/api v1.1.1-0.20260116065909-8307845802e0 h1:FLYkctX92dosLXm8+SQhfXm3h9K4iiKAKUwJiK88bF4= -open-cluster-management.io/api v1.1.1-0.20260116065909-8307845802e0/go.mod h1:YcmA6SpGEekIMxdoeVIIyOaBhMA6ImWRLXP4g8n8T+4= +open-cluster-management.io/api v1.1.1-0.20260126032025-b449b3b4e4b9 h1:H20ld7TL3HLhvTMz8DHCZkcQTqnnHuJtWrBICbwsCUw= +open-cluster-management.io/api v1.1.1-0.20260126032025-b449b3b4e4b9/go.mod h1:YcmA6SpGEekIMxdoeVIIyOaBhMA6ImWRLXP4g8n8T+4= open-cluster-management.io/sdk-go v1.1.1-0.20260120013142-6d087c9a2a3d h1:V+2LZY0aPOStdRxnFvW+yL4y5UqC97R9x4lTQdjLVfg= open-cluster-management.io/sdk-go v1.1.1-0.20260120013142-6d087c9a2a3d/go.mod h1:4haPv/uuKqQ3gxi62/PPknlrUFi132ga0KYLwj5tpx0= sigs.k8s.io/about-api v0.0.0-20250131010323-518069c31c03 h1:1ShFiMjGQOR/8jTBkmZrk1gORxnvMwm1nOy2/DbHg4U= diff --git a/manifests/cluster-manager/hub/crds/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml b/manifests/cluster-manager/hub/crds/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml index 0eb6527f0..719cf75f2 100644 --- a/manifests/cluster-manager/hub/crds/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml +++ b/manifests/cluster-manager/hub/crds/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml @@ -303,6 +303,14 @@ spec: - type type: object type: array + feedbackScrapeType: + default: Poll + description: FeedbackScrapeType represents the way to monitor + resource, it could be Poll or Watch + enum: + - Poll + - Watch + type: string resourceIdentifier: description: |- ResourceIdentifier represents the group, resource, name and namespace of a resoure. diff --git a/manifests/cluster-manager/hub/crds/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml b/manifests/cluster-manager/hub/crds/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml index ec633851a..de71427c2 100644 --- a/manifests/cluster-manager/hub/crds/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml +++ b/manifests/cluster-manager/hub/crds/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml @@ -269,6 +269,14 @@ spec: - type type: object type: array + feedbackScrapeType: + default: Poll + description: FeedbackScrapeType represents the way to monitor + resource, it could be Poll or Watch + enum: + - Poll + - Watch + type: string resourceIdentifier: description: |- ResourceIdentifier represents the group, resource, name and namespace of a resoure. diff --git a/manifests/cluster-manager/hub/crds/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml b/manifests/cluster-manager/hub/crds/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml index 0645b3d21..4d9765b68 100644 --- a/manifests/cluster-manager/hub/crds/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml +++ b/manifests/cluster-manager/hub/crds/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml @@ -295,6 +295,16 @@ spec: - Customized type: string type: object + kubeClientDriver: + description: |- + kubeClientDriver specifies the authentication driver used by the ManagedClusterAddOn + for kubeClient registration when the signer name is `kubernetes.io/kube-apiserver-client`. + Supported values are `csr` and `token`. + The field is set by the agent to declare which authentication driver it is using. + enum: + - csr + - token + type: string namespace: description: |- namespace is the namespace on the managedcluster to put registration secret or lease for the addon. It is @@ -316,18 +326,6 @@ spec: RegistrationConfig defines the configuration of the addon agent to register to hub. The Klusterlet agent will create a csr for the addon agent with the registrationConfig. properties: - driver: - description: |- - driver specifies the authentication driver used by the ManagedClusterAddOn - for this registration configuration when the signer name is - `kubernetes.io/kube-apiserver-client`. - This field is ignored for other signer names. - Supported values are `csr` and `token`. - The field is set by the agent to declare which authentication driver it is using. - enum: - - csr - - token - type: string signerName: description: |- Deprecated: Will be replaced with type: kubeClient and type: csr in v1beta1. diff --git a/manifests/cluster-manager/hub/crds/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml b/manifests/cluster-manager/hub/crds/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml index 892b3e162..d2431361b 100644 --- a/manifests/cluster-manager/hub/crds/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml +++ b/manifests/cluster-manager/hub/crds/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml @@ -284,6 +284,14 @@ spec: - type type: object type: array + feedbackScrapeType: + default: Poll + description: FeedbackScrapeType represents the way to monitor + resource, it could be Poll or Watch + enum: + - Poll + - Watch + type: string resourceIdentifier: description: |- ResourceIdentifier represents the group, resource, name and namespace of a resoure. diff --git a/vendor/modules.txt b/vendor/modules.txt index ded27c63b..05812f19b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1888,7 +1888,7 @@ open-cluster-management.io/addon-framework/pkg/agent open-cluster-management.io/addon-framework/pkg/assets open-cluster-management.io/addon-framework/pkg/index open-cluster-management.io/addon-framework/pkg/utils -# open-cluster-management.io/api v1.1.1-0.20260116065909-8307845802e0 +# open-cluster-management.io/api v1.1.1-0.20260126032025-b449b3b4e4b9 ## explicit; go 1.25.0 open-cluster-management.io/api/addon/v1alpha1 open-cluster-management.io/api/addon/v1beta1 diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml index ff8d9d4d8..b26fa1245 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml @@ -282,6 +282,16 @@ spec: - Customized type: string type: object + kubeClientDriver: + description: |- + kubeClientDriver specifies the authentication driver used by the ManagedClusterAddOn + for kubeClient registration when the signer name is `kubernetes.io/kube-apiserver-client`. + Supported values are `csr` and `token`. + The field is set by the agent to declare which authentication driver it is using. + enum: + - csr + - token + type: string namespace: description: |- namespace is the namespace on the managedcluster to put registration secret or lease for the addon. It is @@ -303,18 +313,6 @@ spec: RegistrationConfig defines the configuration of the addon agent to register to hub. The Klusterlet agent will create a csr for the addon agent with the registrationConfig. properties: - driver: - description: |- - driver specifies the authentication driver used by the ManagedClusterAddOn - for this registration configuration when the signer name is - `kubernetes.io/kube-apiserver-client`. - This field is ignored for other signer names. - Supported values are `csr` and `token`. - The field is set by the agent to declare which authentication driver it is using. - enum: - - csr - - token - type: string signerName: description: |- Deprecated: Will be replaced with type: kubeClient and type: csr in v1beta1. diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml index 892b3e162..d2431361b 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/0000_03_addon.open-cluster-management.io_addontemplates.crd.yaml @@ -284,6 +284,14 @@ spec: - type type: object type: array + feedbackScrapeType: + default: Poll + description: FeedbackScrapeType represents the way to monitor + resource, it could be Poll or Watch + enum: + - Poll + - Watch + type: string resourceIdentifier: description: |- ResourceIdentifier represents the group, resource, name and namespace of a resoure. diff --git a/vendor/open-cluster-management.io/api/addon/v1alpha1/types_managedclusteraddon.go b/vendor/open-cluster-management.io/api/addon/v1alpha1/types_managedclusteraddon.go index 6cf60cdee..5e8b400db 100644 --- a/vendor/open-cluster-management.io/api/addon/v1alpha1/types_managedclusteraddon.go +++ b/vendor/open-cluster-management.io/api/addon/v1alpha1/types_managedclusteraddon.go @@ -73,16 +73,6 @@ type RegistrationConfig struct { // // +optional Subject Subject `json:"subject,omitempty"` - - // driver specifies the authentication driver used by the ManagedClusterAddOn - // for this registration configuration when the signer name is - // `kubernetes.io/kube-apiserver-client`. - // This field is ignored for other signer names. - // Supported values are `csr` and `token`. - // The field is set by the agent to declare which authentication driver it is using. - // +optional - // +kubebuilder:validation:Enum=csr;token - Driver string `json:"driver,omitempty"` } type AddOnConfig struct { @@ -170,6 +160,14 @@ type ManagedClusterAddOnStatus struct { // set by each addon implementation, by default, the lease mode will be used. // +optional HealthCheck HealthCheck `json:"healthCheck,omitempty"` + + // kubeClientDriver specifies the authentication driver used by the ManagedClusterAddOn + // for kubeClient registration when the signer name is `kubernetes.io/kube-apiserver-client`. + // Supported values are `csr` and `token`. + // The field is set by the agent to declare which authentication driver it is using. + // +optional + // +kubebuilder:validation:Enum=csr;token + KubeClientDriver string `json:"kubeClientDriver,omitempty"` } // ObjectReference contains enough information to let you inspect or modify the referred object. diff --git a/vendor/open-cluster-management.io/api/addon/v1beta1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml b/vendor/open-cluster-management.io/api/addon/v1beta1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml index 1f3954341..0d3e09284 100644 --- a/vendor/open-cluster-management.io/api/addon/v1beta1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml +++ b/vendor/open-cluster-management.io/api/addon/v1beta1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml @@ -282,6 +282,16 @@ spec: - Customized type: string type: object + kubeClientDriver: + description: |- + kubeClientDriver specifies the authentication driver used by the ManagedClusterAddOn + for kubeClient registration when the signer name is `kubernetes.io/kube-apiserver-client`. + Supported values are `csr` and `token`. + The field is set by the agent to declare which authentication driver it is using. + enum: + - csr + - token + type: string namespace: description: |- namespace is the namespace on the managedcluster to put registration secret or lease for the addon. It is @@ -303,18 +313,6 @@ spec: RegistrationConfig defines the configuration of the addon agent to register to hub. The Klusterlet agent will create a csr for the addon agent with the registrationConfig. properties: - driver: - description: |- - driver specifies the authentication driver used by the ManagedClusterAddOn - for this registration configuration when the signer name is - `kubernetes.io/kube-apiserver-client`. - This field is ignored for other signer names. - Supported values are `csr` and `token`. - The field is set by the agent to declare which authentication driver it is using. - enum: - - csr - - token - type: string signerName: description: |- Deprecated: Will be replaced with type: kubeClient and type: csr in v1beta1. diff --git a/vendor/open-cluster-management.io/api/addon/v1beta1/conversion.go b/vendor/open-cluster-management.io/api/addon/v1beta1/conversion.go index f56ff4656..1c990f57d 100644 --- a/vendor/open-cluster-management.io/api/addon/v1beta1/conversion.go +++ b/vendor/open-cluster-management.io/api/addon/v1beta1/conversion.go @@ -99,11 +99,39 @@ func Convert_v1alpha1_ManagedClusterAddOnSpec_To_v1beta1_ManagedClusterAddOnSpec return nil } +func Convert_v1beta1_ManagedClusterAddOnStatus_To_v1alpha1_ManagedClusterAddOnStatus(in *ManagedClusterAddOnStatus, out *v1alpha1.ManagedClusterAddOnStatus, s conversion.Scope) error { + if err := autoConvert_v1beta1_ManagedClusterAddOnStatus_To_v1alpha1_ManagedClusterAddOnStatus(in, out, s); err != nil { + return err + } + + // Extract the kubeClientDriver from kubeClient registration config to status level + for i := range in.Registrations { + if in.Registrations[i].Type == KubeClient && in.Registrations[i].KubeClient != nil { + out.KubeClientDriver = in.Registrations[i].KubeClient.Driver + break + } + } + + return nil +} + func Convert_v1alpha1_ManagedClusterAddOnStatus_To_v1beta1_ManagedClusterAddOnStatus(in *v1alpha1.ManagedClusterAddOnStatus, out *ManagedClusterAddOnStatus, s conversion.Scope) error { if err := autoConvert_v1alpha1_ManagedClusterAddOnStatus_To_v1beta1_ManagedClusterAddOnStatus(in, out, s); err != nil { return err } + // Set the kubeClientDriver from status level to the kubeClient registration config + if in.KubeClientDriver != "" { + for i := range out.Registrations { + if out.Registrations[i].Type == KubeClient { + if out.Registrations[i].KubeClient == nil { + out.Registrations[i].KubeClient = &KubeClientConfig{} + } + out.Registrations[i].KubeClient.Driver = in.KubeClientDriver + } + } + } + return nil } @@ -118,7 +146,7 @@ func Convert_v1beta1_RegistrationConfig_To_v1alpha1_RegistrationConfig(in *Regis User: in.KubeClient.Subject.User, Groups: in.KubeClient.Subject.Groups, } - out.Driver = in.KubeClient.Driver + // Driver is now handled at status level, not in RegistrationConfig } else { if in.CustomSigner == nil { return fmt.Errorf("nil CustomSigner") @@ -143,7 +171,7 @@ func Convert_v1alpha1_RegistrationConfig_To_v1beta1_RegistrationConfig(in *v1alp Groups: in.Subject.Groups, }, }, - Driver: in.Driver, + // Driver is now handled at status level, not in RegistrationConfig } } else { out.Type = CustomSigner diff --git a/vendor/open-cluster-management.io/api/addon/v1beta1/zz_generated.conversion.go b/vendor/open-cluster-management.io/api/addon/v1beta1/zz_generated.conversion.go index 15a94ce13..8bd908e69 100644 --- a/vendor/open-cluster-management.io/api/addon/v1beta1/zz_generated.conversion.go +++ b/vendor/open-cluster-management.io/api/addon/v1beta1/zz_generated.conversion.go @@ -243,11 +243,6 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } - if err := s.AddGeneratedConversionFunc((*ManagedClusterAddOnStatus)(nil), (*v1alpha1.ManagedClusterAddOnStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ManagedClusterAddOnStatus_To_v1alpha1_ManagedClusterAddOnStatus(a.(*ManagedClusterAddOnStatus), b.(*v1alpha1.ManagedClusterAddOnStatus), scope) - }); err != nil { - return err - } if err := s.AddGeneratedConversionFunc((*NodePlacement)(nil), (*v1alpha1.NodePlacement)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_NodePlacement_To_v1alpha1_NodePlacement(a.(*NodePlacement), b.(*v1alpha1.NodePlacement), scope) }); err != nil { @@ -333,6 +328,11 @@ func RegisterConversions(s *runtime.Scheme) error { }); err != nil { return err } + if err := s.AddConversionFunc((*ManagedClusterAddOnStatus)(nil), (*v1alpha1.ManagedClusterAddOnStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { + return Convert_v1beta1_ManagedClusterAddOnStatus_To_v1alpha1_ManagedClusterAddOnStatus(a.(*ManagedClusterAddOnStatus), b.(*v1alpha1.ManagedClusterAddOnStatus), scope) + }); err != nil { + return err + } if err := s.AddConversionFunc((*RegistrationConfig)(nil), (*v1alpha1.RegistrationConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { return Convert_v1beta1_RegistrationConfig_To_v1alpha1_RegistrationConfig(a.(*RegistrationConfig), b.(*v1alpha1.RegistrationConfig), scope) }); err != nil { @@ -1013,11 +1013,6 @@ func autoConvert_v1beta1_ManagedClusterAddOnStatus_To_v1alpha1_ManagedClusterAdd return nil } -// Convert_v1beta1_ManagedClusterAddOnStatus_To_v1alpha1_ManagedClusterAddOnStatus is an autogenerated conversion function. -func Convert_v1beta1_ManagedClusterAddOnStatus_To_v1alpha1_ManagedClusterAddOnStatus(in *ManagedClusterAddOnStatus, out *v1alpha1.ManagedClusterAddOnStatus, s conversion.Scope) error { - return autoConvert_v1beta1_ManagedClusterAddOnStatus_To_v1alpha1_ManagedClusterAddOnStatus(in, out, s) -} - func autoConvert_v1alpha1_ManagedClusterAddOnStatus_To_v1beta1_ManagedClusterAddOnStatus(in *v1alpha1.ManagedClusterAddOnStatus, out *ManagedClusterAddOnStatus, s conversion.Scope) error { out.Conditions = *(*[]v1.Condition)(unsafe.Pointer(&in.Conditions)) out.RelatedObjects = *(*[]ObjectReference)(unsafe.Pointer(&in.RelatedObjects)) @@ -1052,6 +1047,7 @@ func autoConvert_v1alpha1_ManagedClusterAddOnStatus_To_v1beta1_ManagedClusterAdd if err := Convert_v1alpha1_HealthCheck_To_v1beta1_HealthCheck(&in.HealthCheck, &out.HealthCheck, s); err != nil { return err } + // WARNING: in.KubeClientDriver requires manual conversion: does not exist in peer-type return nil } @@ -1189,7 +1185,6 @@ func autoConvert_v1beta1_RegistrationConfig_To_v1alpha1_RegistrationConfig(in *R func autoConvert_v1alpha1_RegistrationConfig_To_v1beta1_RegistrationConfig(in *v1alpha1.RegistrationConfig, out *RegistrationConfig, s conversion.Scope) error { // WARNING: in.SignerName requires manual conversion: does not exist in peer-type // WARNING: in.Subject requires manual conversion: does not exist in peer-type - // WARNING: in.Driver requires manual conversion: does not exist in peer-type return nil } diff --git a/vendor/open-cluster-management.io/api/operator/v1/types_klusterlet.go b/vendor/open-cluster-management.io/api/operator/v1/types_klusterlet.go index 27a0f8a7b..f55e05fe7 100644 --- a/vendor/open-cluster-management.io/api/operator/v1/types_klusterlet.go +++ b/vendor/open-cluster-management.io/api/operator/v1/types_klusterlet.go @@ -184,7 +184,7 @@ type RegistrationConfiguration struct { // This provides driver details required to register add-ons with hub for kubeClient type // +optional - AddOnKubeClientRegistrationDriver AddOnRegistrationDriver `json:"addOnKubeClientRegistrationDriver,omitempty"` + AddOnKubeClientRegistrationDriver *AddOnRegistrationDriver `json:"addOnKubeClientRegistrationDriver,omitempty"` // ClusterClaimConfiguration represents the configuration of ClusterClaim // Effective only when the `ClusterClaim` feature gate is enabled. diff --git a/vendor/open-cluster-management.io/api/operator/v1/zz_generated.deepcopy.go b/vendor/open-cluster-management.io/api/operator/v1/zz_generated.deepcopy.go index 811cfc5e2..7ec2aa53e 100644 --- a/vendor/open-cluster-management.io/api/operator/v1/zz_generated.deepcopy.go +++ b/vendor/open-cluster-management.io/api/operator/v1/zz_generated.deepcopy.go @@ -851,7 +851,11 @@ func (in *RegistrationConfiguration) DeepCopyInto(out *RegistrationConfiguration } in.BootstrapKubeConfigs.DeepCopyInto(&out.BootstrapKubeConfigs) in.RegistrationDriver.DeepCopyInto(&out.RegistrationDriver) - in.AddOnKubeClientRegistrationDriver.DeepCopyInto(&out.AddOnKubeClientRegistrationDriver) + if in.AddOnKubeClientRegistrationDriver != nil { + in, out := &in.AddOnKubeClientRegistrationDriver, &out.AddOnKubeClientRegistrationDriver + *out = new(AddOnRegistrationDriver) + (*in).DeepCopyInto(*out) + } if in.ClusterClaimConfiguration != nil { in, out := &in.ClusterClaimConfiguration, &out.ClusterClaimConfiguration *out = new(ClusterClaimConfiguration) diff --git a/vendor/open-cluster-management.io/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml b/vendor/open-cluster-management.io/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml index ec633851a..de71427c2 100644 --- a/vendor/open-cluster-management.io/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml +++ b/vendor/open-cluster-management.io/api/work/v1/0000_00_work.open-cluster-management.io_manifestworks.crd.yaml @@ -269,6 +269,14 @@ spec: - type type: object type: array + feedbackScrapeType: + default: Poll + description: FeedbackScrapeType represents the way to monitor + resource, it could be Poll or Watch + enum: + - Poll + - Watch + type: string resourceIdentifier: description: |- ResourceIdentifier represents the group, resource, name and namespace of a resoure. diff --git a/vendor/open-cluster-management.io/api/work/v1/types.go b/vendor/open-cluster-management.io/api/work/v1/types.go index d50734341..d45eca581 100644 --- a/vendor/open-cluster-management.io/api/work/v1/types.go +++ b/vendor/open-cluster-management.io/api/work/v1/types.go @@ -117,6 +117,12 @@ type ManifestConfigOption struct { // +listMapKey:=condition // +optional ConditionRules []ConditionRule `json:"conditionRules,omitempty"` + + // FeedbackScrapeType represents the way to monitor resource, it could be Poll or Watch + // +kubebuilder:validation:Enum=Poll;Watch + // +kubebuilder:default=Poll + // +optional + FeedbackScrapeType FeedbackScrapeType `json:"feedbackScrapeType,omitempty"` } // +kubebuilder:validation:XValidation:rule="self.type != 'CEL' || self.condition != \"\"",message="Condition is required for CEL rules" @@ -168,6 +174,17 @@ const ( CelConditionExpressionsType ConditionRuleType = "CEL" ) +// FeedbackScrapeType represents the type of method to monitor resource and feedback +type FeedbackScrapeType string + +const ( + // FeedbackPollType indicates checking resource in polling way + FeedbackPollType FeedbackScrapeType = "Poll" + + // FeedbackWatchType indicates watching resource + FeedbackWatchType FeedbackScrapeType = "Watch" +) + // ManifestWorkExecutor is the executor that applies the resources to the managed cluster. i.e. the // work agent. type ManifestWorkExecutor struct { diff --git a/vendor/open-cluster-management.io/api/work/v1alpha1/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml b/vendor/open-cluster-management.io/api/work/v1alpha1/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml index 0eb6527f0..719cf75f2 100644 --- a/vendor/open-cluster-management.io/api/work/v1alpha1/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml +++ b/vendor/open-cluster-management.io/api/work/v1alpha1/0000_00_work.open-cluster-management.io_manifestworkreplicasets.crd.yaml @@ -303,6 +303,14 @@ spec: - type type: object type: array + feedbackScrapeType: + default: Poll + description: FeedbackScrapeType represents the way to monitor + resource, it could be Poll or Watch + enum: + - Poll + - Watch + type: string resourceIdentifier: description: |- ResourceIdentifier represents the group, resource, name and namespace of a resoure.