controllers

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2025 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package controllers implements controllers.

Index

Constants

View Source
const APIKeyFinalizer = "apikey.resource.streamnative.io/finalizer"
View Source
const ServiceAccountBindingFinalizer = "serviceaccountbinding.resource.streamnative.io/finalizer"
View Source
const ServiceAccountFinalizer = "serviceaccount.resource.streamnative.io/finalizer"

Variables

This section is empty.

Functions

func ConnectionRefMapper

func ConnectionRefMapper(ctx context.Context, object client.Object) []reconcile.Request

ConnectionRefMapper maps resource object to PulsarConnection request

func DecryptToken added in v0.10.0

func DecryptToken(priv *rsa.PrivateKey, encryptedToken cloudapi.EncryptedToken) (string, error)

DecryptToken decrypts an encrypted token using the provided private key This function is a utility and not part of the Reconciler methods. It's kept here for potential direct use or if it was previously used by other parts of the codebase.

Types

type APIKeyReconciler added in v0.10.0

type APIKeyReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	ConnectionManager *ConnectionManager
}

APIKeyReconciler reconciles a StreamNative Cloud APIKey object

func (*APIKeyReconciler) Reconcile added in v0.10.0

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

Reconcile handles the reconciliation of APIKey objects

func (*APIKeyReconciler) SetupWithManager added in v0.10.0

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

SetupWithManager sets up the controller with the Manager.

type APIServerConnectionReconciler added in v0.8.0

type APIServerConnectionReconciler struct {
	client.Client
	Scheme *runtime.Scheme
	// ConnectionManager manages the API server connections
	ConnectionManager *ConnectionManager
}

APIServerConnectionReconciler reconciles a APIServerConnection object

func (*APIServerConnectionReconciler) Reconcile added in v0.8.0

func (*APIServerConnectionReconciler) SetupWithManager added in v0.8.0

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

SetupWithManager sets up the controller with the Manager.

type ConnectionManager added in v0.8.0

type ConnectionManager struct {
	client.Client
	// contains filtered or unexported fields
}

ConnectionManager manages API connections

func NewConnectionManager added in v0.8.0

func NewConnectionManager(client client.Client) *ConnectionManager

NewConnectionManager creates a new connection manager

func (*ConnectionManager) Close added in v0.8.0

func (m *ConnectionManager) Close() error

Close closes all connections

func (*ConnectionManager) CloseConnection added in v0.8.0

func (m *ConnectionManager) CloseConnection(name string) error

CloseConnection closes and removes a connection

func (*ConnectionManager) GetOrCreateConnection added in v0.8.0

GetOrCreateConnection gets or creates a connection

type FlinkDeploymentReconciler added in v0.8.0

type FlinkDeploymentReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	ConnectionManager *ConnectionManager
}

FlinkDeploymentReconciler reconciles a FlinkDeployment object

func (*FlinkDeploymentReconciler) Reconcile added in v0.8.0

Reconcile handles the reconciliation of FlinkDeployment objects

func (*FlinkDeploymentReconciler) SetupWithManager added in v0.8.0

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

SetupWithManager sets up the controller with the Manager.

type NotInitializedError added in v0.8.0

type NotInitializedError struct {
	// contains filtered or unexported fields
}

NotInitializedError represents an error when the connection is not fully initialized

func (*NotInitializedError) Error added in v0.8.0

func (e *NotInitializedError) Error() string

type PulsarConnectionReconciler

type PulsarConnectionReconciler struct {
	client.Client
	Scheme             *runtime.Scheme
	Log                logr.Logger
	Recorder           record.EventRecorder
	PulsarAdminCreator admin.PulsarAdminCreator
	Retryer            *utils.ReconcileRetryer
}

PulsarConnectionReconciler reconciles a PulsarConnection object

func (*PulsarConnectionReconciler) 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 PulsarConnection 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 (*PulsarConnectionReconciler) SetupWithManager

func (r *PulsarConnectionReconciler) SetupWithManager(mgr ctrl.Manager, options controller.Options) error

SetupWithManager sets up the controller with the Manager.

type PulsarConnectionRefMapper

type PulsarConnectionRefMapper struct {
}

PulsarConnectionRefMapper maps resource requests to PulsarConnection

func (*PulsarConnectionRefMapper) Map

Map maps resource object to PulsarConnection request

type SecretReconciler added in v0.9.0

type SecretReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	ConnectionManager *ConnectionManager
}

SecretReconciler reconciles a StreamNative Cloud Secret object

func (*SecretReconciler) Reconcile added in v0.9.0

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

Reconcile handles the reconciliation of Secret objects

func (*SecretReconciler) SetupWithManager added in v0.9.0

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

SetupWithManager sets up the controller with the Manager.

type ServiceAccountBindingReconciler added in v0.10.0

type ServiceAccountBindingReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	ConnectionManager *ConnectionManager
}

ServiceAccountBindingReconciler reconciles a StreamNative Cloud ServiceAccountBinding object

func (*ServiceAccountBindingReconciler) Reconcile added in v0.10.0

Reconcile handles the reconciliation of ServiceAccountBinding objects

func (*ServiceAccountBindingReconciler) SetupWithManager added in v0.10.0

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

SetupWithManager sets up the controller with the Manager.

type ServiceAccountReconciler added in v0.10.0

type ServiceAccountReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	ConnectionManager *ConnectionManager
}

ServiceAccountReconciler reconciles a StreamNative Cloud ServiceAccount object

func (*ServiceAccountReconciler) Reconcile added in v0.10.0

Reconcile handles the reconciliation of ServiceAccount objects

func (*ServiceAccountReconciler) SetupWithManager added in v0.10.0

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

SetupWithManager sets up the controller with the Manager.

type WorkspaceReconciler added in v0.8.0

type WorkspaceReconciler struct {
	client.Client
	Scheme            *runtime.Scheme
	ConnectionManager *ConnectionManager
}

WorkspaceReconciler reconciles a Workspace object

func (*WorkspaceReconciler) Reconcile added in v0.8.0

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

Reconcile handles the reconciliation of Workspace objects

func (*WorkspaceReconciler) SetupWithManager added in v0.8.0

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