Trace
Trace is the Schema for the traces API
Version v1alpha1
Example CR
apiVersion: gadget.kinvolk.io/v1alpha1
kind: Trace
metadata:
name: dns
namespace: gadget
spec:
node: minikube
gadget: dns
filter:
namespace: gadget
podname: etcd-minikube
runMode: Manual
outputMode: Stream
Properties
.apiVersion
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
.kind
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
.metadata
.spec
TraceSpec defines the desired state of Trace
.spec.filter
Filter is to tell the gadget to filter events based on namespace, pod name, labels or container name
.spec.filter.containerName
ContainerName selects events from containers with this name
.spec.filter.labels
Labels selects events from pods with these labels
.spec.filter.namespace
Namespace selects events from this pod namespace
.spec.filter.podname
Podname selects events from this pod name
.spec.gadget
Gadget is the name of the gadget such as “seccomp”
.spec.node
Node is the name of the node on which this trace should run
.spec.output
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)
.spec.outputMode
OutputMode is “Status”, “Stream”, “File” or “ExternalResource”
.spec.parameters
Parameters contains gadget specific configurations.
.spec.runMode
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
.status
TraceStatus defines the observed state of Trace
.status.operationError
OperationError is the error returned by the gadget when applying the annotation gadget.kinvolk.io/operation=
.status.operationWarning
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.
.status.output
Output is the output of the gadget
.status.state
State is “Started”, “Stopped” or “Completed”