tracingpolicy

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func PolicyDir added in v1.4.0

func PolicyDir(namespace, policyName string) string

PolicyDir returns the directory of the policy in tetragon's bpf fs hierearchy

func PolicyYAMLSetMode added in v1.4.0

func PolicyYAMLSetMode(data []byte, mode string) ([]byte, error)

PolicyYAMLSetMode modifies a yaml file to set the mode of the policy

func TpLongname added in v1.5.0

func TpLongname(tp TracingPolicy) string

TpLongname returns a long name of a tracing policy: name if the policy is not namespaced, or namespace/name if it is

Types

type GenericTracingPolicy added in v0.10.0

type GenericTracingPolicy struct {
	TypeMeta
	Metadata ObjectMeta                 `json:"metadata"`
	Spec     v1alpha1.TracingPolicySpec `json:"spec"`
}

GenericTracingPolicy represents TracingPolicy CRD. It implements TracingPolicy and CRDObject interfaces with pointer receivers.

func (*GenericTracingPolicy) GetObjectMetaStruct added in v1.4.0

func (gtp *GenericTracingPolicy) GetObjectMetaStruct() *metav1.ObjectMeta

func (*GenericTracingPolicy) TpInfo added in v0.10.0

func (gtp *GenericTracingPolicy) TpInfo() string

func (*GenericTracingPolicy) TpName added in v0.10.0

func (gtp *GenericTracingPolicy) TpName() string

func (*GenericTracingPolicy) TpNamespace added in v1.7.0

func (gtp *GenericTracingPolicy) TpNamespace() string

func (*GenericTracingPolicy) TpSpec added in v0.10.0

type GenericTracingPolicyNamespaced added in v0.10.0

type GenericTracingPolicyNamespaced struct {
	metav1.TypeMeta
	Metadata metav1.ObjectMeta          `json:"metadata"`
	Spec     v1alpha1.TracingPolicySpec `json:"spec"`
}

GenericTracingPolicyNamespaced represents TracingPolicyNamespaced CRD. It implements TracingPolicy and CRDObject interfaces with pointer receivers.

func (*GenericTracingPolicyNamespaced) GetObjectMetaStruct added in v1.4.0

func (gtp *GenericTracingPolicyNamespaced) GetObjectMetaStruct() *metav1.ObjectMeta

func (*GenericTracingPolicyNamespaced) TpInfo added in v0.10.0

func (gtp *GenericTracingPolicyNamespaced) TpInfo() string

func (*GenericTracingPolicyNamespaced) TpName added in v0.10.0

func (gtp *GenericTracingPolicyNamespaced) TpName() string

func (*GenericTracingPolicyNamespaced) TpNamespace added in v0.10.0

func (gtp *GenericTracingPolicyNamespaced) TpNamespace() string

func (*GenericTracingPolicyNamespaced) TpSpec added in v0.10.0

type ObjectMeta added in v1.7.0

type ObjectMeta = metav1.ObjectMeta

type PolicyEvent added in v0.10.0

type PolicyEvent interface {
	PolicyInfo() PolicyInfo
}

type PolicyInfo added in v0.10.0

type PolicyInfo struct {
	Name string
	Hook string
}

type TracingPolicy

type TracingPolicy interface {
	// TpName returns the name of the policy.
	TpName() string
	// TpSpec  returns the specification of the policy
	TpSpec() *v1alpha1.TracingPolicySpec
	// TpInfo returns a description of the policy
	TpInfo() string
	TpNamespace() string
}

TracingPolicy is a tracing policy interface. It is implemented by v1alpha1.types.TracingPolicy and config.GenericTracingConf. The former is what is the k8s API server uses, and the latter is used when we load files directly (e.g., via the cli).

func FromFile added in v1.0.0

func FromFile(path string) (TracingPolicy, error)

FromFile loads a CRD object from a YAML file at the given path.

func FromYAML added in v1.0.0

func FromYAML(data string) (TracingPolicy, error)

FromYAML inspects the YAML input to determine the kind, then dispatches to the generic FromYAML function.

type TypeMeta added in v1.7.0

type TypeMeta = metav1.TypeMeta

type Unstructured added in v1.7.0

type Unstructured struct {
	Object map[string]any
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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