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 86c6b43
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 17 additions & 0 deletions addon/v1alpha1/types_managedclusteraddon.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 5 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 86c6b43

Please sign in to comment.