controllers

package
v1.7.0-release Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ClusterRefLabel = "nifiCluster"

Functions

func ApplyClusterRefLabel

func ApplyClusterRefLabel(cluster *v1.NifiCluster, labels map[string]string) map[string]string

applyClusterRefLabel ensures a map of labels contains a reference to a parent nifi cluster.

func ApplyClusterReferenceLabel

func ApplyClusterReferenceLabel(cluster clientconfig.ClusterConnect, labels map[string]string) map[string]string

applyClusterRefLabel ensures a map of labels contains a reference to a parent nifi cluster.

func CheckNodeConnectionError

func CheckNodeConnectionError(logger zap.Logger, err error) (ctrl.Result, error)

checkNodeConnectionError is a convenience wrapper for returning from common node connection errors.

func ClusterLabelString

func ClusterLabelString(cluster *v1.NifiCluster) string

clusterLabelString returns the label value for a cluster reference.

func GetClusterRefNamespace

func GetClusterRefNamespace(ns string, ref v1.ClusterReference) string

getClusterRefNamespace returns the expected namespace for a Nifi cluster referenced by a user/dataflow CR. It takes the namespace of the CR as the first argument and the reference itself as the second.

func GetComponentRefNamespace

func GetComponentRefNamespace(ns string, ref v1alpha1.ComponentReference) string

getComponentRefNamespace returns the expected namespace for a Nifi cluster referenced by a user/dataflow CR. It takes the namespace of the CR as the first argument and the reference itself as the second.

func GetLogConstructor

func GetLogConstructor(mgr manager.Manager, obj runtime.Object) (func(*reconcile.Request) logr.Logger, error)

func GetParameterContextRefNamespace

func GetParameterContextRefNamespace(ns string, ref v1.ParameterContextReference) string

GetParameterContextRefNamespace returns the expected namespace for a Nifi parameter context referenced by a dataflow CR. It takes the namespace of the CR as the first argument and the reference itself as the second.

func GetRegistryClientRefNamespace

func GetRegistryClientRefNamespace(ns string, ref v1.RegistryClientReference) string

GetRegistryClientRefNamespace returns the expected namespace for a Nifi registry client referenced by a dataflow CR. It takes the namespace of the CR as the first argument and the reference itself as the second.

func GetSecretRefNamespace

func GetSecretRefNamespace(ns string, ref v1.SecretReference) string

GetSecretRefNamespace returns the expected namespace for a Nifi secret referenced by a parameter context CR. It takes the namespace of the CR as the first argument and the reference itself as the second.

func GetUserRefNamespace

func GetUserRefNamespace(ns string, ref v1.UserReference) string

GetUserRefNamespace returns the expected namespace for a Nifi user referenced by a parameter context CR. It takes the namespace of the CR as the first argument and the reference itself as the second.

func Reconciled

func Reconciled() (reconcile.Result, error)

reconciled returns an empty result with nil error to signal a successful reconcile to the controller manager.

func Requeue

func Requeue() (reconcile.Result, error)

func RequeueAfter

func RequeueAfter(time time.Duration) (reconcile.Result, error)

func RequeueWithError

func RequeueWithError(logger zap.Logger, msg string, err error) (reconcile.Result, error)

requeueWithError is a convenience wrapper around logging an error message separate from the stacktrace and then passing the error through to the controller manager.

Types

type NifiClusterReconciler

type NifiClusterReconciler struct {
	client.Client
	DirectClient     client.Reader
	Log              zap.Logger
	Scheme           *runtime.Scheme
	Namespaces       []string
	Recorder         record.EventRecorder
	RequeueIntervals map[string]int
	RequeueOffset    int
}

NifiClusterReconciler reconciles a NifiCluster object.

func (*NifiClusterReconciler) Reconcile

func (r *NifiClusterReconciler) 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 NifiCluster 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.7.0/pkg/reconcile

func (*NifiClusterReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NifiClusterTaskReconciler

type NifiClusterTaskReconciler struct {
	client.Client
	Log              zap.Logger
	Scheme           *runtime.Scheme
	Recorder         record.EventRecorder
	RequeueIntervals map[string]int
	RequeueOffset    int
}

NifiClusterTaskReconciler reconciles.

func (*NifiClusterTaskReconciler) Reconcile

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 NifiUserGroup 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.7.0/pkg/reconcile

func (*NifiClusterTaskReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NifiConnectionReconciler

type NifiConnectionReconciler struct {
	client.Client
	Log             zap.Logger
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	RequeueInterval int
	RequeueOffset   int
}

NifiConnectionReconciler reconciles a NifiConnection object.

func (*NifiConnectionReconciler) DeleteConnection

func (r *NifiConnectionReconciler) DeleteConnection(ctx context.Context, clientConfig *clientconfig.NifiConfig,
	original *v1alpha1.NifiConnection, instance *v1alpha1.NifiConnection) error

Delete the connection.

func (*NifiConnectionReconciler) ForceStartDataflowComponent

func (r *NifiConnectionReconciler) ForceStartDataflowComponent(ctx context.Context, c v1alpha1.ComponentReference) error

Set the maintenance label to force the start of a dataflow.

func (*NifiConnectionReconciler) GetDataflowComponentInformation

func (r *NifiConnectionReconciler) GetDataflowComponentInformation(c v1alpha1.ComponentReference, isSource bool) (*v1alpha1.ComponentInformation, error)

Retrieve port information from a NifiDataflow.

func (*NifiConnectionReconciler) Reconcile

Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.

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

func (*NifiConnectionReconciler) RetrieveNifiClusterRef

Retrieve the clusterRef based on the source and the destination of the connection.

func (*NifiConnectionReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

func (*NifiConnectionReconciler) StopDataflowComponent

func (r *NifiConnectionReconciler) StopDataflowComponent(ctx context.Context, c v1alpha1.ComponentReference, isSource bool) error

Set the maintenance label to force the stop of a port.

func (*NifiConnectionReconciler) UnForceStartDataflowComponent

func (r *NifiConnectionReconciler) UnForceStartDataflowComponent(ctx context.Context, c v1alpha1.ComponentReference) error

Unset the maintenance label to force the start of a dataflow.

func (*NifiConnectionReconciler) UnStopDataflowComponent

func (r *NifiConnectionReconciler) UnStopDataflowComponent(ctx context.Context, c v1alpha1.ComponentReference, isSource bool) error

Unset the maintenance label to force the stop of a port.

type NifiDataflowReconciler

type NifiDataflowReconciler struct {
	client.Client
	Log             zap.Logger
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	RequeueInterval int
	RequeueOffset   int
}

NifiDataflowReconciler reconciles a NifiDataflow object.

func (*NifiDataflowReconciler) Reconcile

func (r *NifiDataflowReconciler) 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 NifiDataflow 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.7.0/pkg/reconcile

func (*NifiDataflowReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NifiNodeGroupAutoscalerReconciler

type NifiNodeGroupAutoscalerReconciler struct {
	runtimeClient.Client
	APIReader       runtimeClient.Reader
	Scheme          *runtime.Scheme
	Log             zap.Logger
	Recorder        record.EventRecorder
	RequeueInterval int
	RequeueOffset   int
}

NifiNodeGroupAutoscalerReconciler reconciles a NifiNodeGroupAutoscaler object.

func (*NifiNodeGroupAutoscalerReconciler) Reconcile

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 NifiNodeGroupAutoscaler 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.0/pkg/reconcile

func (*NifiNodeGroupAutoscalerReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NifiParameterContextReconciler

type NifiParameterContextReconciler struct {
	client.Client
	Log             zap.Logger
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	RequeueInterval int
	RequeueOffset   int
}

NifiParameterContextReconciler reconciles a NifiParameterContext object.

func (*NifiParameterContextReconciler) Reconcile

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 NifiParameterContext 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.7.0/pkg/reconcile

func (*NifiParameterContextReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NifiRegistryClientReconciler

type NifiRegistryClientReconciler struct {
	client.Client
	Log             zap.Logger
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	RequeueInterval int
	RequeueOffset   int
}

NifiRegistryClientReconciler reconciles a NifiRegistryClient object.

func (*NifiRegistryClientReconciler) Reconcile

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 NifiRegistryClient 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.7.0/pkg/reconcile

func (*NifiRegistryClientReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NifiUserGroupReconciler

type NifiUserGroupReconciler struct {
	client.Client
	Log             zap.Logger
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	RequeueInterval int
	RequeueOffset   int
}

NifiUserGroupReconciler reconciles a NifiUserGroup object.

func (*NifiUserGroupReconciler) Reconcile

func (r *NifiUserGroupReconciler) 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 NifiUserGroup 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.7.0/pkg/reconcile

func (*NifiUserGroupReconciler) SetupWithManager

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

SetupWithManager sets up the controller with the Manager.

type NifiUserReconciler

type NifiUserReconciler struct {
	client.Client
	Log             zap.Logger
	Scheme          *runtime.Scheme
	Recorder        record.EventRecorder
	RequeueInterval int
	RequeueOffset   int
}

NifiUserReconciler reconciles a NifiUser object.

func (*NifiUserReconciler) Reconcile

func (r *NifiUserReconciler) 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 NifiUser 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.7.0/pkg/reconcile

func (*NifiUserReconciler) SetupWithManager

func (r *NifiUserReconciler) SetupWithManager(mgr ctrl.Manager, certManagerEnabled bool) 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