googlecloudk8scommon_contract

package
v0.55.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

AutocompleteClusterIdentityTaskID is the task ID for returning cluster name candidates as AutocompleteClusterNameList.

AutocompleteLocationForClusterTaskID is the task ID for overriding the default location autocomplete by returning the location of the given cluster.

View Source
var AutocompleteMetricsK8sContainerTaskID = taskid.NewDefaultImplementationID[string](GoogleCloudCommonK8STaskIDPrefix + "autocomplete/metrics/k8s_container")

AutocompleteMetricsK8sContainerTaskID is the task ID for returning metrics type returning k8s_container resource type.

View Source
var AutocompleteMetricsK8sNodeTaskID = taskid.NewDefaultImplementationID[string](GoogleCloudCommonK8STaskIDPrefix + "autocomplete/metrics/k8s_node")

AutocompleteMetricsK8sNodeTaskID is the task ID for returning metrics type returning k8s_node resource type.

AutocompleteNamespacesTaskID is the task ID for returning namespace candidates as AutocompleteResult.

AutocompleteNodeNamesTaskID is the task ID for returning node name candidates as AutocompleteResult.

AutocompletePodNamesTaskID is the task ID for returning pod name candidates as AutocompleteResult.

ClusterIdentityTaskID is the task ID for getting the cluster identity. Fields are usually from form inputs.

View Source
var ClusterNamePrefixTaskRef = taskid.NewTaskReference[ClusterPrefixPolicy](GoogleCloudCommonK8STaskIDPrefix + "cluster-name-prefix")

ClusterNamePrefixTaskRef is the task reference ID for generating the cluster name prefix used in query. For GKE, it's just a task to return empty prefix policy always. For Anthos on AWS, it should return "awsClusters/". For Anthos on Azure, it will be "azureClusters/".

View Source
var GoogleCloudCommonK8STaskIDPrefix = "cloud.google.com/k8s/"

GoogleCloudCommonK8STaskIDPrefix is the prefix for common task used for K8s on Google Cloud related tasks IDs.

View Source
var HeaderSuggestedFileNameTaskID = taskid.NewDefaultImplementationID[struct{}](GoogleCloudCommonK8STaskIDPrefix + "header-suggested-file-name")

HeaderSuggestedFileNameTaskID is the task ID for the suggested file name of the inspection file included in the header metadata. This name is used for the default name of downloaded file.

View Source
var InputClusterNameTaskID = taskid.NewDefaultImplementationID[string](GoogleCloudCommonK8STaskIDPrefix + "input-cluster-name")

InputClusterNameTaskID is the task ID for the cluster name.

InputKindFilterTaskID is the task ID for the kind filter.

InputNamespaceFilterTaskID is the task ID for the namespace filter.

View Source
var InputNodeNameFilterTaskID = taskid.NewDefaultImplementationID[[]string](GoogleCloudCommonK8STaskIDPrefix + "input/node-name-filter")

InputNodeNameFilterTaskID receives space splitted node names to filter node specific logs.

NEGNamesDiscoveryTaskID is the task ID for extracting NEG names from audit logs.

NEGToBackendServiceInventoryBuilder is the inventory task builder for NEG to BackendService mappings.

View Source
var NEGToBackendServiceInventoryTaskID = taskid.NewDefaultImplementationID[NEGToBackendServiceMap](GoogleCloudCommonK8STaskIDPrefix + "neg-to-backend-service-inventory")

NEGToBackendServiceInventoryTaskID is the task ID for the inventory task that provides NEG to BackendService mappings.

Functions

func ExtractNEGToBackendService added in v0.54.0

func ExtractNEGToBackendService(message string) (negName string, backendServiceName string)

ExtractNEGToBackendService extracts the NEG name and BackendService name from a given message.

Types

type ClusterNameUsage added in v0.55.2

type ClusterNameUsage string

ClusterNameUsage represents a usage context layer of a cluster name.

const (
	// ClusterNameUsageK8sCluster is the usage context for Kubernetes internal common logs.
	ClusterNameUsageK8sCluster ClusterNameUsage = "k8s_cluster"
	// ClusterNameUsageK8sPlatformAudit is the usage context for Kubernetes platform management audit logs.
	ClusterNameUsageK8sPlatformAudit ClusterNameUsage = "k8s_platform_audit"
	// ClusterNameUsageCSM is the usage context for Cloud Service Mesh logs.
	ClusterNameUsageCSM ClusterNameUsage = "csm"
)

type ClusterPrefixPolicy added in v0.55.2

type ClusterPrefixPolicy struct {
	// Prefix is the single cluster prefix string.
	Prefix string
	// RequiredUsages represents the list of usages that require the prefix.
	RequiredUsages []ClusterNameUsage
}

ClusterPrefixPolicy defines a policy to apply a prefix to a cluster name based on the usage context.

func (ClusterPrefixPolicy) Apply added in v0.55.2

func (c ClusterPrefixPolicy) Apply(usage ClusterNameUsage, clusterName string) string

Apply applies the prefix to the given cluster name if the usage is listed in RequiredUsages.

func (ClusterPrefixPolicy) PrefixFor added in v0.55.2

func (c ClusterPrefixPolicy) PrefixFor(usage ClusterNameUsage) string

PrefixFor returns the prefix for the given usage context if the usage is listed in RequiredUsages.

type GoogleCloudClusterIdentity added in v0.52.0

type GoogleCloudClusterIdentity struct {
	// ProjectID is the project ID of the cluster.
	ProjectID string
	// PrefixPolicy is the prefix policy applied to the cluster name.
	PrefixPolicy ClusterPrefixPolicy
	// ClusterName is the name of the cluster.
	ClusterName string
	// Location is the location of the cluster.
	Location string
}

GoogleCloudClusterIdentity is the tuple identify a cluster in Google Cloud.

func (*GoogleCloudClusterIdentity) NameFor added in v0.55.2

NameFor returns the cluster name representation for the given usage context.

func (*GoogleCloudClusterIdentity) PrefixFor added in v0.55.2

PrefixFor returns the cluster prefix for the given usage context.

func (*GoogleCloudClusterIdentity) UniqueDigest added in v0.52.0

func (g *GoogleCloudClusterIdentity) UniqueDigest() string

UniqueDigest returns an unique string for the cluster identity. This can be used as the cache key depending on a cluster.

type NEGNameToResourceIdentityMap added in v0.50.0

type NEGNameToResourceIdentityMap = map[string]commonlogk8saudit_contract.ResourceIdentity

type NEGToBackendServiceMap added in v0.54.0

type NEGToBackendServiceMap = map[string]string

NEGToBackendServiceMap is a map from NEG name to BackendService name.

Jump to

Keyboard shortcuts

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