Skip to content

Commit 6c045d4

Browse files
committed
more addon status condition types
Signed-off-by: yue9944882 <[email protected]>
1 parent 3297cac commit 6c045d4

4 files changed

+70
-3
lines changed

addon/v1alpha1/0000_01_addon.open-cluster-management.io_managedclusteraddons.crd.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ spec:
137137
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.
138138
type: object
139139
properties:
140+
certificateStatus:
141+
description: certificateStatus actively tracks the status of the certificate used by the addon.
142+
type: object
143+
properties:
144+
expiringTimestamp:
145+
description: expiringTimestamp records the next time certificate will expire.
146+
type: string
147+
format: date-time
148+
lastRenewedTimestamp:
149+
description: lastRenewedTimestamp records the last timestamp when we approved/renewed certificates for the addon agents.
150+
type: string
151+
format: date-time
140152
signerName:
141153
description: signerName is the name of signer that addon agent will use to create csr.
142154
type: string

addon/v1alpha1/types_managedclusteraddon.go

+22
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ type RegistrationConfig struct {
5858
//
5959
// +optional
6060
Subject Subject `json:"subject,omitempty"`
61+
62+
// certificateStatus actively tracks the status of the certificate used by the addon.
63+
CertificateStatus *RegistrationConfigCertificateStatus `json:"certificateStatus,omitempty"`
64+
}
65+
66+
type RegistrationConfigCertificateStatus struct {
67+
// lastRenewedTimestamp records the last timestamp when we approved/renewed certificates
68+
// for the addon agents.
69+
LastRenewedTimestamp metav1.Time `json:"lastRenewedTimestamp,omitempty"`
70+
71+
// expiringTimestamp records the next time certificate will expire.
72+
ExpiringTimestamp metav1.Time `json:"expiringTimestamp,omitempty"`
6173
}
6274

6375
// Subject is the user subject of the addon agent to be registered to the hub.
@@ -126,6 +138,16 @@ const (
126138
// ManagedClusterAddOnConditionDegraded represents that the addon agent is providing degraded service on
127139
// the managed cluster.
128140
ManagedClusterAddOnConditionDegraded string = "Degraded"
141+
142+
// ManagedClusterAddOConditionTypeRegistrationApplied represents that whether the addon agent finished
143+
// its registration into the hub control plane, including finishing CSR approval, signing, permission
144+
// configuration, etc.
145+
ManagedClusterAddOConditionTypeRegistrationApplied = "RegistrationApplied"
146+
147+
// ManagedClusterAddOConditionTypeManifestApplied represents that whether the corresponding resources are
148+
// applied to the hub cluster as a ManifestWork resource. Note that it doesn't imply the applied ManifestWork
149+
// is successfully delivered/executed by the work agent.
150+
ManagedClusterAddOConditionTypeManifestApplied = "ManifestApplied"
129151
)
130152

131153
// ObjectReference contains enough information to let you inspect or modify the referred object.

addon/v1alpha1/zz_generated.deepcopy.go

+23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

addon/v1alpha1/zz_generated.swagger_doc_generated.go

+13-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)