controllers

package
v0.0.0-...-1e4d469 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateJob

func CreateJob(ctx context.Context, c client.Client, namespacedName types.NamespacedName) (ctrl.Result, error)

CreateJob creates a ZAP instance for a ZAProxy resource as a Job.

func EndDelayZAPJob

func EndDelayZAPJob(ctx context.Context, c client.Client, namespacedName types.NamespacedName) (ctrl.Result, error)

EndDelayZAPJob handles requests to end the ZAP automation plan delay job for a ZAProxy resource.

func WaitForJobReady

func WaitForJobReady(ctx context.Context, c client.Client, namespacedName types.NamespacedName) (ctrl.Result, error)

WaitForJobReady waits for a ZAP instance to be ready.

Types

type ZAProxyReconciler

type ZAProxyReconciler struct {
	client.Client
	Scheme   *runtime.Scheme
	Recorder record.EventRecorder
}

ZAProxyReconciler reconciles a ZAProxy object

func (*ZAProxyReconciler) Reconcile

func (r *ZAProxyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)

Reconcile is part of the main Kubernetes reconciliation loop. It compares the desired state specified by the ZAProxy object against the actual cluster state. It then performs operations to align the cluster state with the desired state. Specifically, it ensures that a ConfigMap and a PersistentVolumeClaim (PVC) exist for each ZAProxy.

For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/controller-runtime@v0.14.1/pkg/reconcile

func (*ZAProxyReconciler) SetupWithManager

func (r *ZAProxyReconciler) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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