status

package
v0.0.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStatusFilePath

func GetStatusFilePath() string

GetStatusFilePath returns the appropriate status directory path Uses /run/aks-flex-node/status.json when running as aks-flex-node user (systemd service) Uses /tmp/aks-flex-node/status.json for direct user execution (testing/development)

Types

type ArcStatus

type ArcStatus struct {
	Registered    bool      `json:"registered"`
	Connected     bool      `json:"connected"`
	MachineName   string    `json:"machineName"`
	ResourceID    string    `json:"resourceId,omitempty"`
	Location      string    `json:"location,omitempty"`
	ResourceGroup string    `json:"resourceGroup,omitempty"`
	LastHeartbeat time.Time `json:"lastHeartbeat,omitempty"`
	AgentVersion  string    `json:"agentVersion,omitempty"`
}

ArcStatus contains Azure Arc machine registration and connection status

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector collects system and node status information

func NewCollector

func NewCollector(cfg *config.Config, logger *logrus.Logger, agentVersion string) *Collector

NewCollector creates a new status collector

func (*Collector) CollectStatus

func (c *Collector) CollectStatus(ctx context.Context) (*NodeStatus, error)

CollectStatus collects essential node status information

func (*Collector) NeedsBootstrap

func (c *Collector) NeedsBootstrap(ctx context.Context) bool

NeedsBootstrap checks if the node needs to be (re)bootstrapped based on status file

type NodeStatus

type NodeStatus struct {
	// Component versions
	KubeletVersion    string `json:"kubeletVersion"`
	RuncVersion       string `json:"runcVersion"`
	ContainerdVersion string `json:"containerdVersion"`

	// Service status
	KubeletRunning bool   `json:"kubeletRunning"`
	KubeletReady   string `json:"kubeletReady"`

	ContainerdRunning bool `json:"containerdRunning"`

	// Azure Arc status
	ArcStatus ArcStatus `json:"arcStatus"`

	// Metadata
	LastUpdated  time.Time `json:"lastUpdated"`
	AgentVersion string    `json:"agentVersion"`
}

NodeStatus represents the current status and health information of the AKS edge node

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL