agent

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 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 added in v1.5.0

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 {
	// contains filtered or unexported fields
}

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.

func (*AgentHooks) InjectDecoder

func (agentHooks *AgentHooks) InjectDecoder(d *admission.Decoder) error

InjectDecoder injects the decoder.

type AgentReconciler

type AgentReconciler struct {
	client.Client
	DynamicClient    dynamic.Interface
	Scheme           *runtime.Scheme
	Recorder         record.EventRecorder
	ApertureInjector *mutatingwebhook.ApertureInjector
	// 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) 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