controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddProbeToCluster

func AddProbeToCluster(cluster *kubeproberv1.Cluster, probe *kubeproberv1.Probe) error

add probe to cluster

func DeleteProbeOfCluster

func DeleteProbeOfCluster(cluster *kubeproberv1.Cluster, probeName string) error

delete probe of cluster

func GenerateProbeClient

func GenerateProbeClient(cluster *kubeproberv1.Cluster) (client.Client, error)

Generate k8sclient of cluster

func GetProbeOfCluster

func GetProbeOfCluster(cluster *kubeproberv1.Cluster, probeName string) (*kubeproberv1.Probe, error)

get probe of cluster

func IsContain

func IsContain(items []string, item string) bool

func UpdateProbeOfCluster

func UpdateProbeOfCluster(cluster *kubeproberv1.Cluster, probe *kubeproberv1.Probe) error

update probe of cluster

Types

type ClusterPredicate

type ClusterPredicate struct {
	predicate.Funcs
}

func (*ClusterPredicate) Create

func (rl *ClusterPredicate) Create(e event.CreateEvent) bool

func (*ClusterPredicate) Delete

func (rl *ClusterPredicate) Delete(e event.DeleteEvent) bool

func (*ClusterPredicate) Generic

func (rl *ClusterPredicate) Generic(e event.GenericEvent) bool

func (*ClusterPredicate) Update

func (rl *ClusterPredicate) Update(e event.UpdateEvent) bool

type ClusterReconciler

type ClusterReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Log    logr.Logger
}

ClusterReconciler reconciles a Cluster object

func (*ClusterReconciler) Reconcile

func (r *ClusterReconciler) 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 Cluster 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.8.3/pkg/reconcile

func (*ClusterReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type ProbePredicate

type ProbePredicate struct {
	predicate.Funcs
}

func (*ProbePredicate) Create

func (rl *ProbePredicate) Create(e event.CreateEvent) bool

func (*ProbePredicate) Delete

func (rl *ProbePredicate) Delete(e event.DeleteEvent) bool

func (*ProbePredicate) Generic

func (rl *ProbePredicate) Generic(e event.GenericEvent) bool

func (*ProbePredicate) Update

func (rl *ProbePredicate) Update(e event.UpdateEvent) bool

type ProbeReconciler

type ProbeReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	Log    logr.Logger
}

ProbeReconciler reconciles a Probe object

func (*ProbeReconciler) Reconcile

func (r *ProbeReconciler) 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 probe closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the Probe object against the actual probe state, and then perform operations to make the probe 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.8.3/pkg/reconcile

func (*ProbeReconciler) SetupWithManager

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

SetupWithManager sets up the controller wibth the Manager.

Jump to

Keyboard shortcuts

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