pod

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Flag = "attribute"
)

Variables

This section is empty.

Functions

func ToArgs

func ToArgs(attributes Attributes) ([]string, error)

ToArgs is a helper func to convert an pod.Attributes to a list of args that can be put into a Pod Template

Types

type Attributes

type Attributes struct {
	UserDefined  map[string]string `json:"-"`
	PodInfo      `json:",inline"`
	WorkloadInfo `json:",inline"`
	ClusterInfo  `json:",inline"`
}

func ParseAttributes

func ParseAttributes(rawAttributes []string) (Attributes, error)

func (Attributes) ToMap

func (attr Attributes) ToMap() (map[string]string, error)

type ClusterInfo

type ClusterInfo struct {
	ClusterUID      string `json:"k8s.cluster.uid"`
	ClusterName     string `json:"k8s.cluster.name"`
	DTClusterEntity string `json:"dt.entity.kubernetes_cluster"`
}

type PodInfo

type PodInfo struct {
	PodName       string `json:"k8s.pod.name"`
	PodUID        string `json:"k8s.pod.uid"`
	NodeName      string `json:"k8s.node.name"`
	NamespaceName string `json:"k8s.namespace.name"`
}

type WorkloadInfo

type WorkloadInfo struct {
	WorkloadKind string `json:"k8s.workload.kind"`
	WorkloadName string `json:"k8s.workload.name"`
}

Jump to

Keyboard shortcuts

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