diff --git a/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml b/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml index 614048d1e..17116419a 100644 --- a/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml +++ b/addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml @@ -137,6 +137,13 @@ spec: description: 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. type: object properties: + lastRenewedTimestamp: + description: lastRenewedTimestamp records the last timestamp when we approved/renewed certificates for the addon agents. + type: string + format: date-time + lastRenewedValidity: + description: lastRenewedValidity records the last renewing certificate validity. + type: string signerName: description: signerName is the name of signer that addon agent will use to create csr. type: string diff --git a/addon/v1alpha1/types_managedclusteraddon.go b/addon/v1alpha1/types_managedclusteraddon.go index 7c20d159c..d2a8f0ccb 100644 --- a/addon/v1alpha1/types_managedclusteraddon.go +++ b/addon/v1alpha1/types_managedclusteraddon.go @@ -58,6 +58,13 @@ type RegistrationConfig struct { // // +optional Subject Subject `json:"subject,omitempty"` + + // lastRenewedTimestamp records the last timestamp when we approved/renewed certificates + // for the addon agents. + LastRenewedTimestamp *metav1.Time `json:"lastRenewedTimestamp,omitempty"` + + // lastRenewedValidity records the last renewing certificate validity. + LastRenewedValidity *metav1.Duration `json:"lastRenewedValidity,omitempty"` } // Subject is the user subject of the addon agent to be registered to the hub. @@ -126,6 +133,16 @@ const ( // ManagedClusterAddOnConditionDegraded represents that the addon agent is providing degraded service on // the managed cluster. ManagedClusterAddOnConditionDegraded string = "Degraded" + + // ManagedClusterAddOConditionTypeRegistrationApplied represents that whether the addon agent finished + // its registration into the hub control plane, including finishing CSR approval, signing, permission + // configuration, etc. + ManagedClusterAddOConditionTypeRegistrationApplied = "RegistrationApplied" + + // ManagedClusterAddOConditionTypeManifestApplied represents that whether the corresponding resources are + // applied to the hub cluster as a ManifestWork resource. Note that it doesn't imply the applied ManifestWork + // is successfully delivered/executed by the work agent. + ManagedClusterAddOConditionTypeManifestApplied = "ManifestApplied" ) // ObjectReference contains enough information to let you inspect or modify the referred object. diff --git a/addon/v1alpha1/zz_generated.swagger_doc_generated.go b/addon/v1alpha1/zz_generated.swagger_doc_generated.go index b8dbd2192..33eb55a50 100644 --- a/addon/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/addon/v1alpha1/zz_generated.swagger_doc_generated.go @@ -132,9 +132,11 @@ func (ObjectReference) SwaggerDoc() map[string]string { } var map_RegistrationConfig = map[string]string{ - "": "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.", - "signerName": "signerName is the name of signer that addon agent will use to create csr.", - "subject": "subject is the user subject of the addon agent to be registered to the hub. If it is not set, the addon agent will have the default subject \"subject\": {\n\t\"user\": \"system:open-cluster-management:addon:{addonName}:{clusterName}:{agentName}\",\n\t\"groups: [\"system:open-cluster-management:addon\", \"system:open-cluster-management:addon:{addonName}\", \"system:authenticated\"]\n}", + "": "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.", + "signerName": "signerName is the name of signer that addon agent will use to create csr.", + "subject": "subject is the user subject of the addon agent to be registered to the hub. If it is not set, the addon agent will have the default subject \"subject\": {\n\t\"user\": \"system:open-cluster-management:addon:{addonName}:{clusterName}:{agentName}\",\n\t\"groups: [\"system:open-cluster-management:addon\", \"system:open-cluster-management:addon:{addonName}\", \"system:authenticated\"]\n}", + "lastRenewedTimestamp": "lastRenewedTimestamp records the last timestamp when we approved/renewed certificates for the addon agents.", + "lastRenewedValidity": "lastRenewedValidity records the last renewing certificate validity.", } func (RegistrationConfig) SwaggerDoc() map[string]string {