upgrade to the latest api (#1349)
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m17s
Post / coverage (push) Failing after 7m19s
Post / images (amd64, registration) (push) Failing after 47s
Post / images (amd64, registration-operator) (push) Failing after 41s
Post / images (amd64, work) (push) Failing after 39s
Post / images (amd64, placement) (push) Failing after 8m13s
Post / images (arm64, addon-manager) (push) Failing after 43s
Post / images (arm64, registration) (push) Failing after 41s
Post / images (arm64, registration-operator) (push) Failing after 41s
Post / images (arm64, work) (push) Failing after 40s
Post / images (amd64, addon-manager) (push) Failing after 15m57s
Post / images (arm64, placement) (push) Failing after 7m30s
Post / image manifest (addon-manager) (push) Has been skipped
Post / image manifest (placement) (push) Has been skipped
Post / image manifest (registration) (push) Has been skipped
Post / image manifest (registration-operator) (push) Has been skipped
Post / image manifest (work) (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 4s

Signed-off-by: Yang Le <yangle@redhat.com>
This commit is contained in:
Yang Le
2026-01-26 04:21:04 +00:00
committed by GitHub
parent 9b010ef622
commit e421f20040
18 changed files with 149 additions and 65 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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=
@@ -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.
@@ -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.
@@ -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.
@@ -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.
+1 -1
View File
@@ -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
@@ -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.
@@ -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.
@@ -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.
@@ -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.
+30 -2
View File
@@ -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
@@ -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
}
+1 -1
View File
@@ -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.
@@ -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)
@@ -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.
+17
View File
@@ -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 {
@@ -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.