googlecloudlogk8saudit_impl

package
v0.49.1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

GCPK8sAuditLogSourceTask creates an AuditLogParserLogSource for GCP Kubernetes audit logs. It retrieves the logs from the K8sAuditQueryTask and provides them along with a GCP-specific field extractor to downstream parsing tasks.

K8sAuditQueryTask is a query generator task that creates a Google Cloud Logging query to fetch Kubernetes audit logs for a specific cluster.

View Source
var RegisterK8sAuditTasks coreinspection.InspectionRegistrationFunc = func(registry coreinspection.InspectionTaskRegistry) error {
	err := registry.AddTask(GCPK8sAuditLogSourceTask)
	if err != nil {
		return err
	}

	manager := recorder.NewAuditRecorderTaskManager(googlecloudlogk8saudit_contract.K8sAuditParseTaskID, "gke")
	err = commonrecorder.Register(manager)
	if err != nil {
		return err
	}
	err = statusrecorder.Register(manager)
	if err != nil {
		return err
	}
	err = bindingrecorder.Register(manager)
	if err != nil {
		return err
	}
	err = endpointslicerecorder.Register(manager)
	if err != nil {
		return err
	}
	err = ownerreferencerecorder.Register(manager)
	if err != nil {
		return err
	}
	err = containerstatusrecorder.Register(manager)
	if err != nil {
		return err
	}
	err = noderecorder.Register(manager)
	if err != nil {
		return err
	}

	err = snegrecorder.Register(manager)
	if err != nil {
		return err
	}

	err = manager.Register(registry, googlecloudinspectiontypegroup_contract.GCPK8sClusterInspectionTypes...)
	if err != nil {
		return err
	}
	return nil
}

RegisterK8sAuditTasks registers all the tasks required for parsing GKE Kubernetes audit logs. This includes the common audit log recorders as well as GKE-specific ones like the SNEG recorder.

Functions

func GenerateK8sAuditQuery

func GenerateK8sAuditQuery(clusterName string, auditKindFilter *gcpqueryutil.SetFilterParseResult, namespaceFilter *gcpqueryutil.SetFilterParseResult) string

GenerateK8sAuditQuery constructs a Google Cloud Logging query string for fetching Kubernetes audit logs based on cluster name, kind filters, and namespace filters.

func Register

func Register(registry coreinspection.InspectionTaskRegistry) error

Register registers all tasks related to GKE Kubernetes audit log.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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