googlecloudlogk8snode_contract

package
v0.56.4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package googlecloudlogk8snode_contract defines the contract for the googlecloudlogk8snode task.

Index

Constants

View Source
const (
	// TaskIDPrefix is the prefix for all task IDs in this package.
	TaskIDPrefix = "cloud.google.com/log/k8s-node/"
)

Variables

View Source
var (
	// RevisionStateComponentRunning represents that a node component is running successfully.
	RevisionStateComponentRunning = style.MustRegisterRevisionState(
		"Component is running",
		"check_circle",
		"The node component (e.g., kubelet, kube-proxy) is running normally.",
		style.MustForceConvertSRGBHex("#00cc66"),
		pb.RevisionStateStyle_REVISION_STATE_STYLE_NORMAL,
	)

	// RevisionStateComponentTerminated represents that a node component has terminated or stopped.
	RevisionStateComponentTerminated = style.MustRegisterRevisionState(
		"Component is terminated",
		"cancel",
		"The node component has terminated or stopped.",
		style.MustForceConvertSRGBHex("#ff3333"),
		pb.RevisionStateStyle_REVISION_STATE_STYLE_DELETED,
	)
)

ClusterIdentityTaskID is the task id for aliasing the cluster identity.

View Source
var CommonFieldsetReaderTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "common-fieldset-reader")

CommonFieldsetReaderTaskID is the ID for a task to read the fieldset used by all parsers in node log parsers later.

View Source
var ContainerdLogFilterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "containerd-log-filter")

ContainerdLogFilterTaskID is the ID for a task to filter only the logs for containerd.

View Source
var ContainerdLogGroupTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.LogGroupMap](TaskIDPrefix + "containerd-log-group")

ContainerdLogGroupTaskID is the ID for a task to group containerd related logs based on instance names.

View Source
var ContainerdLogLogToTimelineMapperTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.TimelineMapperResult](TaskIDPrefix + "containerd-log-timeline-mapper")

ContainerdLogLogToTimelineMapperTaskID is the ID for a task to add events or revisions based on containerd logs.

View Source
var KubeletLogFilterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "kubelet-log-filter")

KubeletLogFilterTaskID is the ID for a task to filter only the logs for kubelet.

View Source
var KubeletLogGroupTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.LogGroupMap](TaskIDPrefix + "kubelet-log-group")

KubeletLogGroupTaskID is the ID for a task to group kubelet related logs based on instance names.

View Source
var KubeletLogLogToTimelineMapperTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.TimelineMapperResult](TaskIDPrefix + "kubelet-log-timeline-mapper")

KubeletLogLogToTimelineMapperTaskID is the ID for a task to add events or revisions based on kubelet logs.

View Source
var ListLogEntriesTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "query")

ListLogEntriesTaskID is the task id for the task that queries k8s node logs from Cloud Logging.

View Source
var LogIngesterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "log-ingester")

LogIngesterTaskID is the task ID to finalize the logs to be included in the final output.

View Source
var (
	LogTypeNode = style.MustRegisterLogType("k8s node", "Kubernetes Node Logs", style.MustForceConvertSRGBHex("#0077CC"), style.ColorWhite)
)

The following block defines the registered timeline style LogTypes. These are registered as package-level variables so they are initialized immediately when this package is imported.

View Source
var OtherLogFilterTaskID = taskid.NewDefaultImplementationID[[]*log.Log](TaskIDPrefix + "other-log-filter")

OtherLogFilterTaskID is the task ID for filtering other logs.

OtherLogGroupTaskID is the ID for a task to group other related logs based on instance names and component name.

View Source
var OtherLogLogToTimelineMapperTaskID = taskid.NewDefaultImplementationID[inspectiontaskbase.TimelineMapperResult](TaskIDPrefix + "other-log-timeline-mapper")

OtherLogLogToTimelineMapperTaskID is the task ID for a task to add events or revisions based on other logs.

View Source
var PodSandboxIDDiscoveryTaskID = taskid.NewDefaultImplementationID[patternfinder.PatternFinder[*PodSandboxIDInfo]](TaskIDPrefix + "containerd-id-discovery")

PodSandboxIDDiscoveryTaskID is the ID for a task to extract pod sandbox IDs for the other parsers to corelate a log to Pods.

View Source
var TailTaskID = taskid.NewDefaultImplementationID[struct{}](TaskIDPrefix + "tail")

TailTaskID is a nop task just to require all child parsers.

View Source
var (
	TimelineTypeNodeComponent = style.MustRegisterTimelineType(
		"node-component",
		"Logs of non-containerized system components on the node",
		"manufacturing",
		0.6,
		style.ColorWhite,
		style.ColorBlack,
		style.MustForceConvertSRGBHex("#0077CC"),
		style.ColorWhite,
		true,
		6000,
		style.AlphabeticalSortPolicy(),
	)
)

The following block defines the registered timeline style TimelineTypes. These are registered as package-level variables so they are initialized immediately when this package is imported.

Functions

func MustNodeComponentTimeline added in v0.56.0

func MustNodeComponentTimeline(ctx context.Context, nodeTimeline *khifilev6.TimelinePath, componentName string) *khifilev6.TimelinePath

MustNodeComponentTimeline returns the timeline path for a node component (e.g., containerd, kubelet).

Types

type K8sNodeLogCommonFieldSet

type K8sNodeLogCommonFieldSet struct {
	Message   *logutil.ParseStructuredLogResult
	Component string
	NodeName  string
}

func (*K8sNodeLogCommonFieldSet) Kind

func (k *K8sNodeLogCommonFieldSet) Kind() string

Kind implements log.FieldSet.

func (*K8sNodeLogCommonFieldSet) ParserType

type K8sNodeLogCommonFieldSetReader

type K8sNodeLogCommonFieldSetReader struct {
	StructuredLogParser logutil.StructuredLogParser
}

func (*K8sNodeLogCommonFieldSetReader) FieldSetKind

func (k *K8sNodeLogCommonFieldSetReader) FieldSetKind() string

FieldSetKind implements log.FieldSetReader.

func (*K8sNodeLogCommonFieldSetReader) Read

Read implements log.FieldSetReader.

type K8sNodeParserType

type K8sNodeParserType string
var (
	Containerd K8sNodeParserType = "containerd"
	Kubelet    K8sNodeParserType = "kubelet"
	Other      K8sNodeParserType = "other"
)

type PodSandboxIDInfo

type PodSandboxIDInfo struct {
	PodName      string
	PodNamespace string
	PodSandboxID string
}

Jump to

Keyboard shortcuts

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