Documentation
¶
Overview ¶
Package controllers implements controllers.
Index ¶
- Constants
- func ConnectionRefMapper(ctx context.Context, object client.Object) []reconcile.Request
- func DecryptToken(priv *rsa.PrivateKey, encryptedToken cloudapi.EncryptedToken) (string, error)
- type APIKeyReconciler
- type APIServerConnectionReconciler
- type ConnectionManager
- type FlinkDeploymentReconciler
- type NotInitializedError
- type PulsarConnectionReconciler
- type PulsarConnectionRefMapper
- type SecretReconciler
- type ServiceAccountBindingReconciler
- type ServiceAccountReconciler
- type WorkspaceReconciler
Constants ¶
const APIKeyFinalizer = "apikey.resource.streamnative.io/finalizer"
const ServiceAccountBindingFinalizer = "serviceaccountbinding.resource.streamnative.io/finalizer"
const ServiceAccountFinalizer = "serviceaccount.resource.streamnative.io/finalizer"
Variables ¶
This section is empty.
Functions ¶
func ConnectionRefMapper ¶
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
Types ¶
type APIKeyReconciler ¶ added in v0.10.0
type APIKeyReconciler struct {
client.Client
Scheme *runtime.Scheme
ConnectionManager *ConnectionManager
// contains filtered or unexported fields
}
APIKeyReconciler reconciles a StreamNative Cloud APIKey object
func (*APIKeyReconciler) Reconcile ¶ added in v0.10.0
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) 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
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
func (m *ConnectionManager) GetOrCreateConnection( apiConn *resourcev1alpha1.StreamNativeCloudConnection, creds *resourcev1alpha1.ServiceAccountCredentials, ) (*controllers2.APIConnection, error)
GetOrCreateConnection gets or creates a connection
type FlinkDeploymentReconciler ¶ added in v0.8.0
type FlinkDeploymentReconciler struct {
client.Client
Scheme *runtime.Scheme
ConnectionManager *ConnectionManager
// contains filtered or unexported fields
}
FlinkDeploymentReconciler reconciles a FlinkDeployment object
func (*FlinkDeploymentReconciler) Reconcile ¶ added in v0.8.0
func (r *FlinkDeploymentReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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 ¶
func (r *PulsarConnectionReconciler) 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 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
type SecretReconciler ¶ added in v0.9.0
type SecretReconciler struct {
client.Client
Scheme *runtime.Scheme
ConnectionManager *ConnectionManager
// contains filtered or unexported fields
}
SecretReconciler reconciles a StreamNative Cloud Secret object
func (*SecretReconciler) Reconcile ¶ added in v0.9.0
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
// contains filtered or unexported fields
}
ServiceAccountBindingReconciler reconciles a StreamNative Cloud ServiceAccountBinding object
func (*ServiceAccountBindingReconciler) Reconcile ¶ added in v0.10.0
func (r *ServiceAccountBindingReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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
// contains filtered or unexported fields
}
ServiceAccountReconciler reconciles a StreamNative Cloud ServiceAccount object
func (*ServiceAccountReconciler) Reconcile ¶ added in v0.10.0
func (r *ServiceAccountReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
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
// contains filtered or unexported fields
}
WorkspaceReconciler reconciles a Workspace object
func (*WorkspaceReconciler) Reconcile ¶ added in v0.8.0
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.