Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FieldSetReaderTask = inspectiontaskbase.NewFieldSetReadTask(googlecloudlogk8scontainer_contract.FieldSetReaderTaskID, googlecloudlogk8scontainer_contract.ListLogEntriesTaskID.Ref(), []log.FieldSetReader{ &googlecloudlogk8scontainer_contract.K8sContainerLogFieldSetReader{}, })
View Source
var HistoryModifierTask = inspectiontaskbase.NewHistoryModifierTask[struct{}](googlecloudlogk8scontainer_contract.HistoryModifierTaskID, &containerLogHistoryModifierSetting{}, inspectioncore_contract.FeatureTaskLabel(`Kubernetes container logs`, `Gather stdout/stderr logs of containers on the cluster to visualize them on the timeline under an associated Pod. Log volume can be huge when the cluster has many Pods.`, enum.LogTypeContainer, 4000, false, googlecloudinspectiontypegroup_contract.GCPK8sClusterInspectionTypes...), )
View Source
var InputContainerQueryNamespaceFilterTask = formtask.NewTextFormTaskBuilder(googlecloudlogk8scontainer_contract.InputContainerQueryNamespacesTaskID, priorityForContainerGroup+1000, "Namespaces(Container logs)"). WithDefaultValueConstant("@managed", true). WithDescription(`Container logs tend to be a lot and take very long time to query. Specify the space splitted namespace lists to query container logs only in the specific namespaces.`). WithValidator(func(ctx context.Context, value string) (string, error) { result, err := gcpqueryutil.ParseSetFilter(value, inputNamespacesAliasMap, true, true, true) if err != nil { return "", err } return result.ValidationError, nil }). WithConverter(func(ctx context.Context, value string) (*gcpqueryutil.SetFilterParseResult, error) { result, err := gcpqueryutil.ParseSetFilter(value, inputNamespacesAliasMap, true, true, true) if err != nil { return nil, err } return result, nil }). Build()
InputContainerQueryNamespaceFilterTask is a form task that allows users to specify which namespaces to query for container logs.
View Source
var InputContainerQueryPodNamesFilterMask = formtask.NewTextFormTaskBuilder(googlecloudlogk8scontainer_contract.InputContainerQueryPodNamesTaskID, priorityForContainerGroup+2000, "Pod names(Container logs)"). WithDefaultValueConstant("@any", true). WithDescription(`Container logs tend to be a lot and take very long time to query. Specify the space splitted pod names lists to query container logs only in the specific pods. This parameter is evaluated as the partial match not the perfect match. You can use the prefix of the pod names.`). WithValidator(func(ctx context.Context, value string) (string, error) { result, err := gcpqueryutil.ParseSetFilter(value, inputPodNamesAliasMap, true, true, true) if err != nil { return "", err } return result.ValidationError, nil }). WithConverter(func(ctx context.Context, value string) (*gcpqueryutil.SetFilterParseResult, error) { result, err := gcpqueryutil.ParseSetFilter(value, inputPodNamesAliasMap, true, true, true) if err != nil { return nil, err } return result, nil }). Build()
InputContainerQueryPodNamesFilterMask is a form task that allows users to specify which pod names to query for container logs.
View Source
var ListLogEntriesTask = googlecloudcommon_contract.NewListLogEntriesTask(&containerListLogEntriesTaskSetting{})
View Source
var LogGrouperTask = inspectiontaskbase.NewLogGrouperTask(googlecloudlogk8scontainer_contract.LogGrouperTaskID, googlecloudlogk8scontainer_contract.FieldSetReaderTaskID.Ref(), func(ctx context.Context, l *log.Log) string { containerFields, err := log.GetFieldSet(l, &googlecloudlogk8scontainer_contract.K8sContainerLogFieldSet{}) if err != nil { return "unknown" } return containerFields.ResourcePath().Path })
Functions ¶
func GenerateK8sContainerQuery ¶
func GenerateK8sContainerQuery(clusterName string, namespacesFilter *gcpqueryutil.SetFilterParseResult, podNamesFilter *gcpqueryutil.SetFilterParseResult) string
GenerateK8sContainerQuery generates a Cloud Logging query for Kubernetes container logs.
func Register ¶
func Register(registry coreinspection.InspectionTaskRegistry) error
Register registers all googlecloudlogk8scontainer inspection tasks to the registry.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.