agent

package
v2.26.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAgentConfigMapInNamespace

func CreateAgentConfigMapInNamespace(
	ctx context.Context,
	client client.Client,
	instance *agentv1alpha1.Agent,
	namespace string,
) *corev1.ConfigMap

CreateAgentConfigMapInNamespace creates the Agent ConfigMap in the given namespace instead of the default one.

func CreateAgentControllerClientCertConfigMapInNamespace

func CreateAgentControllerClientCertConfigMapInNamespace(
	ctx context.Context,
	client client.Client,
	instance *agentv1alpha1.Agent,
	namespace string,
) *corev1.ConfigMap

CreateAgentControllerClientCertConfigMapInNamespace creates the Agent ConfigMap for Controller client certificate in the given namespace instead of the default one.

func CreateAgentSecretInNamespace

func CreateAgentSecretInNamespace(instance *agentv1alpha1.Agent, namespace string) (*corev1.Secret, error)

CreateAgentSecretInNamespace creates the Agent Secret for ApiKey in the given namespace instead of the default one.

func CreateConfigMapForAgent

func CreateConfigMapForAgent(
	client client.Client, recorder record.EventRecorder, configMap *corev1.ConfigMap, ctx context.Context, instance *agentv1alpha1.Agent) (
	controllerutil.OperationResult, error,
)

CreateConfigMapForAgent calls the Kubernetes API to create the provided Agent ConfigMap resource.

func CreateSecretForAgent

func CreateSecretForAgent(
	client client.Client,
	recorder record.EventRecorder,
	secret *corev1.Secret,
	ctx context.Context,
	instance *agentv1alpha1.Agent,
) (controllerutil.OperationResult, error)

CreateSecretForAgent calls the Kubernetes API to create the provided Agent Secret resource.

Types

type AgentHooks

type AgentHooks struct{}

AgentHooks injects the default spec of Aperture Agent in CR.

func (*AgentHooks) Handle

func (agentHooks *AgentHooks) Handle(ctx context.Context, req admission.Request) admission.Response

Handle receives incoming requests from MutatingWebhook for newly created Agents, set defaults and validates them.

type AgentReconciler

type AgentReconciler struct {
	client.Client
	DynamicClient         dynamic.Interface
	Scheme                *runtime.Scheme
	Recorder              record.EventRecorder
	ApertureInjector      *mutatingwebhook.ApertureInjector
	MultipleAgentsEnabled bool
	// contains filtered or unexported fields
}

AgentReconciler reconciles a Agent object.

func (*AgentReconciler) Reconcile

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

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Agent object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.

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

func (*AgentReconciler) RemoveFinalizerFromAgentCR added in v2.10.1

func (r *AgentReconciler) RemoveFinalizerFromAgentCR(ctx context.Context, setupLog logr.Logger)

RemoveFinalizerFromAgentCR removes the finalizer from the Agent CR when the operator is getting deleted.

func (*AgentReconciler) SetupWithManager

func (r *AgentReconciler) 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