v1alpha1

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the gadget v1alpha1 API group +kubebuilder:object:generate=true +groupName=gadget.kinvolk.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeGroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "gadget.kinvolk.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type ContainerFilter

type ContainerFilter struct {
	// Namespace selects events from this pod namespace
	Namespace string `json:"namespace,omitempty"`

	// Podname selects events from this pod name
	Podname string `json:"podname,omitempty"`

	// Labels selects events from pods with these labels
	Labels map[string]string `json:"labels,omitempty"`

	// ContainerName selects events from containers with this name
	ContainerName string `json:"containerName,omitempty"`
}

ContainerFilter filters events based on different criteria

func (*ContainerFilter) DeepCopy

func (in *ContainerFilter) DeepCopy() *ContainerFilter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerFilter.

func (*ContainerFilter) DeepCopyInto

func (in *ContainerFilter) DeepCopyInto(out *ContainerFilter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Operation added in v0.8.0

type Operation string

Operation defines the gadget operation applied to the trace

const (
	// OperationStart indicates to start the trace
	OperationStart Operation = "start"
	// OperationStop indicates to stop the trace
	OperationStop Operation = "stop"
	// OperationGenerate indicates to generate the trace
	// output e.g seccomp profile
	OperationGenerate Operation = "generate"
	// OperationCollect indicates capturing system state
	// at a specific point in time
	OperationCollect Operation = "collect"
)

type RunMode added in v0.8.0

type RunMode string

RunMode defines running mode for the Trace +kubebuilder:validation:Enum=Auto;Manual

const (
	// RunModeAuto automatically starts the trace as soon
	// as the resource is created.
	RunModeAuto RunMode = "Auto"
	// RunModeManual allows the trace to be controlled by the
	// "gadget.kinvolk.io/operation" annotation.
	RunModeManual RunMode = "Manual"
)

type Trace

type Trace struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   TraceSpec   `json:"spec,omitempty"`
	Status TraceStatus `json:"status,omitempty"`
}

Trace is the Schema for the traces API

func (*Trace) DeepCopy

func (in *Trace) DeepCopy() *Trace

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Trace.

func (*Trace) DeepCopyInto

func (in *Trace) DeepCopyInto(out *Trace)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Trace) DeepCopyObject

func (in *Trace) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TraceList

type TraceList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Trace `json:"items"`
}

TraceList contains a list of Trace

func (*TraceList) DeepCopy

func (in *TraceList) DeepCopy() *TraceList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraceList.

func (*TraceList) DeepCopyInto

func (in *TraceList) DeepCopyInto(out *TraceList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*TraceList) DeepCopyObject

func (in *TraceList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type TraceOutputMode added in v0.8.0

type TraceOutputMode string

TraceOutputMode defines output mode for the Trace +kubebuilder:validation:Enum=Status;Stream;File;ExternalResource

const (
	// TraceOutputModeStatus indicates to store the output in the trace "Status.Output" field
	TraceOutputModeStatus TraceOutputMode = "Status"
	// TraceOutputModeStream indicates to stream events. This stream can be accessed through the Stream() api on the gadget tracer manager
	TraceOutputModeStream TraceOutputMode = "Stream"
	// TraceOutputModeFile indicates to save output into a file
	TraceOutputModeFile TraceOutputMode = "File"
	// TraceOutputModeExternalResource indicates to create an external resource, as a seccomp profile
	TraceOutputModeExternalResource TraceOutputMode = "ExternalResource"
)

type TraceSpec

type TraceSpec struct {

	// Node is the name of the node on which this trace should run
	Node string `json:"node,omitempty"`

	// Gadget is the name of the gadget such as "seccomp"
	Gadget string `json:"gadget,omitempty"`

	// RunMode is "Auto" to automatically start the trace as soon as the
	// resource is created, or "Manual" to be controlled by the
	// "gadget.kinvolk.io/operation" annotation
	RunMode RunMode `json:"runMode,omitempty"`

	// Filter is to tell the gadget to filter events based on namespace,
	// pod name, labels or container name
	Filter *ContainerFilter `json:"filter,omitempty"`

	// OutputMode is "Status", "Stream", "File" or "ExternalResource"
	OutputMode TraceOutputMode `json:"outputMode,omitempty"`

	// Output allows a gadget to output the results in the specified
	// location.
	// * With OutputMode=Status|Stream, Output is unused
	// * With OutputMode=File, Output specifies the file path
	// * With OutputMode=ExternalResource, Output specifies the external
	//   resource (such as
	//   seccompprofiles.security-profiles-operator.x-k8s.io for the
	//   seccomp gadget)
	Output string `json:"output,omitempty"`

	// Parameters contains gadget specific configurations.
	Parameters map[string]string `json:"parameters,omitempty"`
}

TraceSpec defines the desired state of Trace

func (*TraceSpec) DeepCopy

func (in *TraceSpec) DeepCopy() *TraceSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraceSpec.

func (*TraceSpec) DeepCopyInto

func (in *TraceSpec) DeepCopyInto(out *TraceSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TraceState added in v0.8.0

type TraceState string

TraceState defines state for the trace +kubebuilder:validation:Enum=Started;Stopped;Completed

const (
	// TraceStateStarted indicates trace is in started state
	TraceStateStarted TraceState = "Started"
	// TraceStateStopped indicates trace is in stopped state
	TraceStateStopped TraceState = "Stopped"
	// TraceStateCompleted indicates trace is in completed state
	TraceStateCompleted TraceState = "Completed"
)

type TraceStatus

type TraceStatus struct {

	// State is "Started", "Stopped" or "Completed"
	State TraceState `json:"state,omitempty"`

	// Output is the output of the gadget
	Output string `json:"output,omitempty"`

	// OperationError is the error returned by the gadget when applying the
	// annotation gadget.kinvolk.io/operation=
	OperationError string `json:"operationError,omitempty"`

	// OperationWarning is returned by the gadget to notify about a malfunction
	// when applying the annotation gadget.kinvolk.io/operation=. Unlike the
	// OperationError that represents a fatal error, the OperationWarning could
	// be ignored according to the context.
	OperationWarning string `json:"operationWarning,omitempty"`
}

TraceStatus defines the observed state of Trace

func (*TraceStatus) DeepCopy

func (in *TraceStatus) DeepCopy() *TraceStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TraceStatus.

func (*TraceStatus) DeepCopyInto

func (in *TraceStatus) DeepCopyInto(out *TraceStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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