Documentation ¶
Index ¶
- func AddNewNodeToCr(node v1.Node, crName, namespace string, client runtimeClient.Client) error
- func AddPvToSpecificNode(nodeId, crName, namespace string, storageConfig *v1.StorageConfig, ...) error
- func CheckIfObjectUpdated(log zap.Logger, desiredType reflect.Type, current, desired runtime.Object) bool
- func Cr(name, namespace string, client runtimeClient.Client) (*v1.NifiCluster, error)
- func DeleteStatus(c client.Client, nodeId string, cluster *v1.NifiCluster, ...) error
- func GetAnnotation(annotationKey string, obj runtime.Object) ([]byte, error)
- func IsAlreadyOwnedError(err error) bool
- func IsMarkedForDeletion(m metav1.ObjectMeta) bool
- func IsPodContainsPendingContainer(pod *corev1.Pod) bool
- func IsPodContainsTerminatedContainer(pod *corev1.Pod) bool
- func IsPodTerminatedOrShutdown(pod *corev1.Pod) bool
- func LookupNifiCluster(client runtimeClient.Client, clusterName, clusterNamespace string) (cluster *v1.NifiCluster, err error)
- func LookupNifiDataflow(client runtimeClient.Client, dataflowName, dataflowNamespace string) (dataflow *v1.NifiDataflow, err error)
- func LookupNifiParameterContext(client runtimeClient.Client, ...) (parameterContext *v1.NifiParameterContext, err error)
- func LookupNifiRegistryClient(client runtimeClient.Client, ...) (registryClient *v1.NifiRegistryClient, err error)
- func LookupNifiUser(client runtimeClient.Client, userName, userNamespace string) (user *v1.NifiUser, err error)
- func LookupSecret(client runtimeClient.Client, secretName, secretNamespace string) (secret *corev1.Secret, err error)
- func PodReady(pod *corev1.Pod) bool
- func Reconcile(log zap.Logger, client runtimeClient.Client, desired runtimeClient.Object, ...) error
- func RemoveNodeFromCr(nodeId, crName, namespace string, client runtimeClient.Client) error
- func SetAnnotation(annotationKey string, obj runtime.Object, value []byte) error
- func UpdateCRStatus(c client.Client, cluster *v1.NifiCluster, currentStatus v1.NifiClusterStatus, ...) error
- func UpdateCrWithRollingUpgrade(errorCount int, cr *v1.NifiCluster, client runtimeClient.Client) error
- func UpdateNodeStatus(c client.Client, nodeIds []string, cluster *v1.NifiCluster, ...) error
- func UpdateRollingUpgradeState(c client.Client, cluster *v1.NifiCluster, currentStatus v1.NifiClusterStatus, ...) error
- func UpdateRootProcessGroupIdStatus(c client.Client, cluster *v1.NifiCluster, currentStatus v1.NifiClusterStatus, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNewNodeToCr ¶
AddNewNodeToCr modifies the CR and adds a new node.
func AddPvToSpecificNode ¶
func AddPvToSpecificNode(nodeId, crName, namespace string, storageConfig *v1.StorageConfig, client runtimeClient.Client) error
AddPvToSpecificNode adds a new PV to a specific node.
func CheckIfObjectUpdated ¶
func CheckIfObjectUpdated(log zap.Logger, desiredType reflect.Type, current, desired runtime.Object) bool
CheckIfObjectUpdated checks if the given object is updated using K8sObjectMatcher.
func Cr ¶
func Cr(name, namespace string, client runtimeClient.Client) (*v1.NifiCluster, error)
Cr returns the given cr object.
func DeleteStatus ¶
func DeleteStatus(c client.Client, nodeId string, cluster *v1.NifiCluster, currentStatus v1.NifiClusterStatus, logger zap.Logger) error
DeleteStatus deletes the given node state from the CR.
func GetAnnotation ¶
GetAnnotation get a annotation.
func IsAlreadyOwnedError ¶
IsAlreadyOwnedError checks if a controller already own the instance.
func IsMarkedForDeletion ¶
func IsMarkedForDeletion(m metav1.ObjectMeta) bool
IsMarkedForDeletion determines if the object is marked for deletion.
func LookupNifiCluster ¶
func LookupNifiCluster(client runtimeClient.Client, clusterName, clusterNamespace string) (cluster *v1.NifiCluster, err error)
LookupNifiCluster returns the running cluster instance based on its name and namespace.
func LookupNifiDataflow ¶
func LookupNifiDataflow(client runtimeClient.Client, dataflowName, dataflowNamespace string) (dataflow *v1.NifiDataflow, err error)
LookupNifiDataflow returns the dataflow instance based on its name and namespace.
func LookupNifiParameterContext ¶
func LookupNifiParameterContext(client runtimeClient.Client, parameterContextName, parameterContextNamespace string) (parameterContext *v1.NifiParameterContext, err error)
LookupNifiParameterContext returns the parameter context instance based on its name and namespace.
func LookupNifiRegistryClient ¶
func LookupNifiRegistryClient(client runtimeClient.Client, registryClientName, registryClientNamespace string) (registryClient *v1.NifiRegistryClient, err error)
LookupNifiRegistryClient returns the running registry client instance based on its name and namespace.
func LookupNifiUser ¶
func LookupNifiUser(client runtimeClient.Client, userName, userNamespace string) (user *v1.NifiUser, err error)
LookupNifiUser returns the user instance based on its name and namespace.
func LookupSecret ¶
func LookupSecret(client runtimeClient.Client, secretName, secretNamespace string) (secret *corev1.Secret, err error)
LookupSecret returns the secret instance based on its name and namespace.
func Reconcile ¶
func Reconcile(log zap.Logger, client runtimeClient.Client, desired runtimeClient.Object, cr *nifikopv1.NifiCluster, currentStatus *nifikopv1.NifiClusterStatus) error
Reconcile reconciles K8S resources.
func RemoveNodeFromCr ¶
func RemoveNodeFromCr(nodeId, crName, namespace string, client runtimeClient.Client) error
RemoveNodeFromCr modifies the CR and removes the given node from the cluster.
func SetAnnotation ¶
SetAnnotation set an annotation.
func UpdateCRStatus ¶
func UpdateCRStatus(c client.Client, cluster *v1.NifiCluster, currentStatus v1.NifiClusterStatus, state interface{}, logger zap.Logger) error
UpdateCRStatus updates the cluster state.
func UpdateCrWithRollingUpgrade ¶
func UpdateCrWithRollingUpgrade(errorCount int, cr *v1.NifiCluster, client runtimeClient.Client) error
UpdateCrWithRollingUpgrade modifies CR status.
func UpdateNodeStatus ¶
func UpdateNodeStatus(c client.Client, nodeIds []string, cluster *v1.NifiCluster, currentStatus v1.NifiClusterStatus, state interface{}, logger zap.Logger) error
UpdateNodeStatus updates the node status with rack and configuration infos.
func UpdateRollingUpgradeState ¶
func UpdateRollingUpgradeState(c client.Client, cluster *v1.NifiCluster, currentStatus v1.NifiClusterStatus, time time.Time, logger zap.Logger) error
UpdateRollingUpgradeState updates the state of the cluster with rolling upgrade info.
func UpdateRootProcessGroupIdStatus ¶
func UpdateRootProcessGroupIdStatus(c client.Client, cluster *v1.NifiCluster, currentStatus v1.NifiClusterStatus, id string, logger zap.Logger) error
UpdateRootProcessGroupIdStatus updates the cluster root process group id.
Types ¶
This section is empty.