Skip to content

Commit

Permalink
more addon status condition types
Browse files Browse the repository at this point in the history
Signed-off-by: yue9944882 <[email protected]>
  • Loading branch information
yue9944882 committed Feb 16, 2022
1 parent 3297cac commit b797065
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,17 @@ 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:
certificateStatus:
description: certificateStatus actively tracks the status of the certificate used by the addon.
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
Expand Down
22 changes: 22 additions & 0 deletions addon/v1alpha1/types_managedclusteraddon.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ type RegistrationConfig struct {
//
// +optional
Subject Subject `json:"subject,omitempty"`

// certificateStatus actively tracks the status of the certificate used by the addon.
CertificateStatus *RegistrationConfigCertificateStatus `json:"certificateStatus,omitempty"`
}

type RegistrationConfigCertificateStatus struct {
// 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.
Expand Down Expand Up @@ -126,6 +138,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.
Expand Down
16 changes: 13 additions & 3 deletions addon/v1alpha1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b797065

Please sign in to comment.