Documentation ¶
Index ¶
Constants ¶
View Source
const ( AnnotationNTP = "harvesterhci.io/ntp-service" Disabled = "disabled" Unsynced = "unsynced" Synced = "synced" Unknown = "unknown" )
View Source
const (
HarvesterNS = "harvester-system"
)
Variables ¶
View Source
var DefaultNTPCheckInterval = 15 * time.Minute
View Source
var MAXNTPCheckInterval = 24 * 365 * time.Hour
View Source
var NTPSyncTimeout = 45 * time.Minute
NTPSyncTimeout is 45 minutes because the NTPUpdate should be triggered around 30 minutes
Functions ¶
func InitServiceMonitor ¶
func StartsAllMonitors ¶
func StartsAllMonitors(monitors []interface{})
Types ¶
type CloudInitMonitor ¶ added in v0.1.9
type CloudInitMonitor struct {
// contains filtered or unexported fields
}
func NewCloudInitMonitor ¶ added in v0.1.9
func NewCloudInitMonitor(ctx context.Context, monitorName, nodeName string, cloudinits ctrlv1.CloudInitController, nodeCache ctlnodev1.NodeCache) *CloudInitMonitor
type ConfigFileMonitor ¶
type ConfigFileMonitor struct { Context context.Context MonitorName string NodeName string MonitorTargets []string NodeConfigCtl ctlv1.NodeConfigController }
func NewConfigFileMonitor ¶
func NewConfigFileMonitor(ctx context.Context, nodecfg ctlv1.NodeConfigController, nodeName, monitorName string) *ConfigFileMonitor
type NTPMessage ¶
type NTPMessage struct { Leap uint32 Version uint32 Mode uint32 Stratum uint32 Precision int32 RootDelay uint64 RootDispersion uint64 Reference interface{} OriginateTimestamp uint64 ReceiveTimestamp uint64 TransmitTimestamp uint64 DestinationTimestamp uint64 Ignored bool PacketCount uint64 Jitter uint64 }
type NTPMonitor ¶
type NTPMonitor struct { Context context.Context MonitorName string NodeName string NodeNTPAnnotation *NTPStatusAnnotation NodeClient ctlnode.NodeClient NodeConfigCtl ctlv1.NodeConfigController // contains filtered or unexported fields }
func NewNTPMonitor ¶
func NewNTPMonitor(ctx context.Context, mtx *sync.Mutex, nodecfg ctlv1.NodeConfigController, nodes ctlnode.NodeController, nodeName, monitorName string) *NTPMonitor
type NTPStatusAnnotation ¶
type NTPStatusAnnotation utils.NTPStatusAnnotation
type Template ¶
type Template struct {
// contains filtered or unexported fields
}
func NewMonitorTemplate ¶
func NewMonitorTemplate(ctx context.Context, mtx *sync.Mutex, nodecfg ctlv1.NodeConfigController, nodes ctlnode.NodeController, cloudinits ctlv1.CloudInitController, nodeName string) *Template
Click to show internal directories.
Click to hide internal directories.