Documentation
¶
Index ¶
- Constants
- func CreateClientSet(insideCluster bool) (clientset kubernetes.Interface, err error)
- func FuzzPod(pod *v1.Pod) error
- func FuzzPodWithClientset(clientSet kubernetes.Interface, pod *v1.Pod) error
- func FuzzPodWithName(namespace string, podName string) (err error)
- func HandlePodEvent(clientSet kubernetes.Interface, repositories *repository.Repositories, ...)
- func StartInformers(repos *repository.Repositories) (err error)
- type Annotations
- type EventHandler
Constants ¶
const ( AnnotationPrefix = "cnfuzz" IgnoreMeAnno = "ignore" FuzzMeAnno = "enable" OpenApiDocAnno = "open-api-doc" SecretAnno = "secret" UsernameAnno = "username" )
Variables ¶
This section is empty.
Functions ¶
func CreateClientSet ¶
func CreateClientSet(insideCluster bool) (clientset kubernetes.Interface, err error)
CreateClientSet create a client to interact with the Kubernetes API
func FuzzPodWithClientset ¶
func FuzzPodWithClientset(clientSet kubernetes.Interface, pod *v1.Pod) error
FuzzPodWithClientset start the fuzzing process for a pod
func FuzzPodWithName ¶
FuzzPodWithName fuzz a pod from just its name and namespace
func HandlePodEvent ¶
func HandlePodEvent(clientSet kubernetes.Interface, repositories *repository.Repositories, pod *apiv1.Pod)
HandlePodEvent method that handles an event for a pod it decides if the pod needs to be fuzzed and can start the fuzzing process when the pod is ready
func StartInformers ¶
func StartInformers(repos *repository.Repositories) (err error)
StartInformers start informers that listen for Kubernetes events and let the EventHandler react on the events
Types ¶
type Annotations ¶
type Annotations struct {
IgnoreMe bool
FuzzMe bool
OpenApiDocLocation string
Secret string
Username string
}
Annotations annotation values for annotations to be used inside Kubernetes configurations
func GetAnnotations ¶
func GetAnnotations(objectMeta *metav1.ObjectMeta) Annotations
GetAnnotations gather annotations inside the metadata of a Kubernetes object
func (Annotations) SetConfigRegister ¶
func (annos Annotations) SetConfigRegister()
SetConfigRegister looks in the annotations object for empty values and tries to fill them with values from the config register
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
EventHandler that handles Kubernetes events if it detects a pod with an image that hasn't been fuzzed yet, it will try to fuzz the pod
func NewEventHandler ¶
func NewEventHandler(clientset kubernetes.Interface, repositories *repository.Repositories) *EventHandler
NewEventHandler creates a new EventHandler
func (EventHandler) OnDelete ¶
func (handler EventHandler) OnDelete(obj any)
OnDelete handles a delete event
func (EventHandler) OnUpdate ¶
func (handler EventHandler) OnUpdate(oldObj any, newObj any)
OnUpdate handles an update event