Documentation
¶
Index ¶
- Constants
- func ClickhouseRoleExists(ctx context.Context, avnGen avngen.Client, r *v1alpha1.ClickhouseRole) error
- func CreateUserConfiguration(userConfig any) (map[string]any, error)
- func GetClickhouseDatabaseByName(ctx context.Context, avnGen avngen.Client, project, service, name string) (*clickhouse.DatabaseOut, error)
- func GetDatabaseByName(ctx context.Context, avnGen avngen.Client, ...) (*service.DatabaseOut, error)
- func GetIsRunningAnnotation(o client.Object) string
- func GetKafkaConnectorByName(ctx context.Context, avnGen avngen.Client, ...) (*kafkaconnect.ConnectorOut, error)
- func GetPasswordFromSecret(ctx context.Context, k8sClient client.Client, resource PasswordSource) (string, error)
- func IsReadyToUse(o client.Object) bool
- func NewAivenGeneratedClient(token, kubeVersion, operatorVersion string) (avngen.Client, error)
- func NewNotFound(msg string) error
- func NilIfZero[T comparable](v T) *T
- func SetupControllers(mgr ctrl.Manager, defaultToken, kubeVersion, operatorVersion string) error
- func SetupControllersWithConfig(mgr ctrl.Manager, cfg SetupConfig) error
- func UpdateUserConfiguration(userConfig any) (map[string]any, error)
- type AivenController
- type AlloyDBOmniReconciler
- type CassandraReconciler
- type ClickhouseDatabaseHandler
- type ClickhouseDatabaseReconciler
- type ClickhouseGrantHandler
- type ClickhouseGrantReconciler
- type ClickhouseReconciler
- type ClickhouseRoleReconciler
- type ClickhouseUserController
- func (r *ClickhouseUserController) Create(ctx context.Context, user *v1alpha1.ClickhouseUser) (CreateResult, error)
- func (r *ClickhouseUserController) Delete(ctx context.Context, user *v1alpha1.ClickhouseUser) error
- func (r *ClickhouseUserController) Observe(ctx context.Context, user *v1alpha1.ClickhouseUser) (Observation, error)
- func (r *ClickhouseUserController) Update(ctx context.Context, user *v1alpha1.ClickhouseUser) (UpdateResult, error)
- type ConnectionPoolHandler
- type ConnectionPoolReconciler
- type Controller
- type CreateResult
- type DatabaseHandler
- type DatabaseReconciler
- type ErrRequeueNeeded
- type FlinkReconciler
- type GrafanaReconciler
- type Handlers
- type KafkaACLHandler
- type KafkaACLReconciler
- type KafkaConnectReconciler
- type KafkaConnectorHandler
- type KafkaConnectorReconciler
- type KafkaNativeACLHandler
- type KafkaNativeACLReconciler
- type KafkaReconciler
- type KafkaSchemaHandler
- type KafkaSchemaReconciler
- type KafkaSchemaRegistryACLHandler
- type KafkaSchemaRegistryACLReconciler
- type KafkaTopicHandler
- type KafkaTopicReconciler
- type MySQLReconciler
- type Observation
- type OpenSearchHandler
- type OpenSearchReconciler
- type PasswordSource
- type PostgreSQLReconciler
- type ProjectHandler
- type ProjectReconciler
- type ProjectVPCHandler
- type ProjectVPCReconciler
- type Reconciler
- type SecretDetails
- type SecretFinalizerGCController
- type SecretSourceResource
- type SecretWatchController
- type ServiceIntegrationEndpointHandler
- type ServiceIntegrationEndpointReconciler
- type ServiceIntegrationHandler
- type ServiceIntegrationReconciler
- type ServiceUserHandler
- type ServiceUserReconciler
- type SetupConfig
- type UpdateResult
- type ValkeyHandler
- type ValkeyReconciler
Constants ¶
const (
ConditionTypeError = "Error"
)
Variables ¶
This section is empty.
Functions ¶
func ClickhouseRoleExists ¶ added in v0.19.0
func CreateUserConfiguration ¶ added in v0.14.0
func GetClickhouseDatabaseByName ¶ added in v0.30.0
func GetClickhouseDatabaseByName(ctx context.Context, avnGen avngen.Client, project, service, name string) (*clickhouse.DatabaseOut, error)
func GetDatabaseByName ¶ added in v0.30.0
func GetIsRunningAnnotation ¶ added in v0.30.0
GetIsRunningAnnotation returns "true" for running/rebalancing resources, and "false" for powered-off resources.
func GetKafkaConnectorByName ¶ added in v0.30.0
func GetKafkaConnectorByName(ctx context.Context, avnGen avngen.Client, projectName, serviceName, name string) (*kafkaconnect.ConnectorOut, error)
func GetPasswordFromSecret ¶ added in v0.31.0
func GetPasswordFromSecret(ctx context.Context, k8sClient client.Client, resource PasswordSource) (string, error)
GetPasswordFromSecret retrieves and validates the password from connInfoSecretSource
func IsReadyToUse ¶ added in v0.30.0
IsReadyToUse returns true when the client.Object's controller has processed the latest manifest changes and the resource is in a running state in Aiven. For services, this includes both running and powered-off states. This indicates the resource is ready for use and has reached its desired state.
func NewAivenGeneratedClient ¶ added in v0.18.0
NewAivenGeneratedClient returns Aiven generated client client (aiven/go-client-codegen)
func NewNotFound ¶ added in v0.18.0
func NilIfZero ¶ added in v0.29.0
func NilIfZero[T comparable](v T) *T
NilIfZero returns a pointer to the value, or nil if the value equals its zero value
func SetupControllers ¶ added in v0.9.0
func SetupControllersWithConfig ¶ added in v0.35.0
func SetupControllersWithConfig(mgr ctrl.Manager, cfg SetupConfig) error
Types ¶
type AivenController ¶ added in v0.35.0
type AivenController[T v1alpha1.AivenManagedObject] interface { // Observe the external resource and return its current state. // This method should: // - Check if the resource exists on Aiven side // - Verify preconditions (e.g., parent service is running) // - Determine if the resource is up-to-date with the desired state // - Fetch connection details (credentials, etc.) // - Update status fields on the object if needed // // Observe should be idempotent and not modify the external resource. Observe(ctx context.Context, obj T) (Observation, error) // Create a new resource. // This is called when Observe indicates the resource doesn't exist. // It may return optional information about the created external resource (for example, connection details). Create(ctx context.Context, obj T) (CreateResult, error) // Update an existing resource. // This is called when Observe indicates the resource exists but is not up-to-date. Update(ctx context.Context, obj T) (UpdateResult, error) // Delete the resource. // This is called when the Kubernetes object is being deleted. // If the resource is already deleted (not found), should return nil. Delete(ctx context.Context, obj T) error }
AivenController manages the lifecycle of a resource. Controllers implement this interface to define how to process their specific resource type. Implementations are expected to update status fields and annotations directly on obj.
type AlloyDBOmniReconciler ¶ added in v0.28.0
type AlloyDBOmniReconciler struct {
Controller
}
AlloyDBOmniReconciler reconciles a AlloyDBOmni object
func (*AlloyDBOmniReconciler) SetupWithManager ¶ added in v0.28.0
func (r *AlloyDBOmniReconciler) SetupWithManager(mgr ctrl.Manager) error
type CassandraReconciler ¶ added in v0.7.0
type CassandraReconciler struct {
Controller
}
CassandraReconciler reconciles a Cassandra object
func (*CassandraReconciler) SetupWithManager ¶ added in v0.7.0
func (r *CassandraReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ClickhouseDatabaseHandler ¶ added in v0.18.0
type ClickhouseDatabaseHandler struct{}
ClickhouseDatabaseHandler handles an Aiven ClickhouseDatabase
type ClickhouseDatabaseReconciler ¶ added in v0.18.0
type ClickhouseDatabaseReconciler struct {
Controller
}
ClickhouseDatabaseReconciler reconciles a ClickhouseDatabase object
func (*ClickhouseDatabaseReconciler) SetupWithManager ¶ added in v0.18.0
func (r *ClickhouseDatabaseReconciler) SetupWithManager(mgr ctrl.Manager) error
type ClickhouseGrantHandler ¶ added in v0.21.0
type ClickhouseGrantHandler struct{}
ClickhouseGrantHandler handles an Aiven ClickhouseGrant
type ClickhouseGrantReconciler ¶ added in v0.21.0
type ClickhouseGrantReconciler struct {
Controller
}
ClickhouseGrantReconciler reconciles a ClickhouseGrant object
func (*ClickhouseGrantReconciler) SetupWithManager ¶ added in v0.21.0
func (r *ClickhouseGrantReconciler) SetupWithManager(mgr ctrl.Manager) error
type ClickhouseReconciler ¶ added in v0.3.0
type ClickhouseReconciler struct {
Controller
}
ClickhouseReconciler reconciles a Clickhouse object
func (*ClickhouseReconciler) SetupWithManager ¶ added in v0.3.0
func (r *ClickhouseReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ClickhouseRoleReconciler ¶ added in v0.19.0
type ClickhouseRoleReconciler struct {
Controller
}
ClickhouseRoleReconciler reconciles a ClickhouseRole object
func (*ClickhouseRoleReconciler) Reconcile ¶ added in v0.19.0
func (r *ClickhouseRoleReconciler) 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.
func (*ClickhouseRoleReconciler) SetupWithManager ¶ added in v0.19.0
func (r *ClickhouseRoleReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ClickhouseUserController ¶ added in v0.35.0
ClickhouseUserController reconciles a ClickhouseUser object
func (*ClickhouseUserController) Create ¶ added in v0.35.0
func (r *ClickhouseUserController) Create(ctx context.Context, user *v1alpha1.ClickhouseUser) (CreateResult, error)
func (*ClickhouseUserController) Delete ¶ added in v0.35.0
func (r *ClickhouseUserController) Delete(ctx context.Context, user *v1alpha1.ClickhouseUser) error
func (*ClickhouseUserController) Observe ¶ added in v0.35.0
func (r *ClickhouseUserController) Observe(ctx context.Context, user *v1alpha1.ClickhouseUser) (Observation, error)
func (*ClickhouseUserController) Update ¶ added in v0.35.0
func (r *ClickhouseUserController) Update(ctx context.Context, user *v1alpha1.ClickhouseUser) (UpdateResult, error)
type ConnectionPoolHandler ¶
type ConnectionPoolHandler struct{}
ConnectionPoolHandler handles an Aiven ConnectionPool
type ConnectionPoolReconciler ¶
type ConnectionPoolReconciler struct {
Controller
}
ConnectionPoolReconciler reconciles a ConnectionPool object
func (*ConnectionPoolReconciler) SetupWithManager ¶
func (r *ConnectionPoolReconciler) SetupWithManager(mgr ctrl.Manager) error
type Controller ¶
type Controller struct {
client.Client
Log logr.Logger
Scheme *runtime.Scheme
Recorder record.EventRecorder
DefaultToken string
KubeVersion string
OperatorVersion string
PollInterval time.Duration
}
Controller reconciles the Aiven objects
type CreateResult ¶ added in v0.35.0
type CreateResult = Observation
CreateResult is returned from Create and carries optional information about the created external resource (for example, connection details).
type DatabaseReconciler ¶
type DatabaseReconciler struct {
Controller
}
DatabaseReconciler reconciles a Database object
func (*DatabaseReconciler) SetupWithManager ¶
func (r *DatabaseReconciler) SetupWithManager(mgr ctrl.Manager) error
type ErrRequeueNeeded ¶ added in v0.35.0
type ErrRequeueNeeded struct {
OriginalError error
}
ErrRequeueNeeded is an error type that indicates that the reconciliation should be requeued. It is used to handle errors that are expected to be resolved on a subsequent retries.
func (ErrRequeueNeeded) Error ¶ added in v0.35.0
func (e ErrRequeueNeeded) Error() string
func (ErrRequeueNeeded) Unwrap ¶ added in v0.35.0
func (e ErrRequeueNeeded) Unwrap() error
type FlinkReconciler ¶ added in v0.26.0
type FlinkReconciler struct {
Controller
}
FlinkReconciler reconciles a Flink object
func (*FlinkReconciler) SetupWithManager ¶ added in v0.26.0
func (r *FlinkReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type GrafanaReconciler ¶ added in v0.7.0
type GrafanaReconciler struct {
Controller
}
GrafanaReconciler reconciles a Grafana object
func (*GrafanaReconciler) SetupWithManager ¶ added in v0.7.0
func (r *GrafanaReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type Handlers ¶
type Handlers interface {
// contains filtered or unexported methods
}
Handlers represents Aiven API handlers It intended to be a layer between Kubernetes and Aiven API that handles all aspects of the Aiven services lifecycle.
type KafkaACLHandler ¶
type KafkaACLHandler struct{}
type KafkaACLReconciler ¶
type KafkaACLReconciler struct {
Controller
}
KafkaACLReconciler reconciles a KafkaACL object
func (*KafkaACLReconciler) SetupWithManager ¶
func (r *KafkaACLReconciler) SetupWithManager(mgr ctrl.Manager) error
type KafkaConnectReconciler ¶
type KafkaConnectReconciler struct {
Controller
}
KafkaConnectReconciler reconciles a KafkaConnect object
func (*KafkaConnectReconciler) SetupWithManager ¶
func (r *KafkaConnectReconciler) SetupWithManager(mgr ctrl.Manager) error
type KafkaConnectorHandler ¶
type KafkaConnectorHandler struct {
// contains filtered or unexported fields
}
type KafkaConnectorReconciler ¶
type KafkaConnectorReconciler struct {
Controller
}
KafkaConnectorReconciler reconciles a KafkaConnector object
func (*KafkaConnectorReconciler) SetupWithManager ¶
func (r *KafkaConnectorReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type KafkaNativeACLHandler ¶ added in v0.30.0
type KafkaNativeACLHandler struct{}
type KafkaNativeACLReconciler ¶ added in v0.30.0
type KafkaNativeACLReconciler struct {
Controller
}
KafkaNativeACLReconciler reconciles a KafkaNativeACL object
func (*KafkaNativeACLReconciler) SetupWithManager ¶ added in v0.30.0
func (r *KafkaNativeACLReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type KafkaReconciler ¶
type KafkaReconciler struct {
Controller
}
KafkaReconciler reconciles a Kafka object
func (*KafkaReconciler) SetupWithManager ¶
func (r *KafkaReconciler) SetupWithManager(mgr ctrl.Manager) error
type KafkaSchemaHandler ¶
type KafkaSchemaHandler struct{}
type KafkaSchemaReconciler ¶
type KafkaSchemaReconciler struct {
Controller
}
KafkaSchemaReconciler reconciles a KafkaSchema object
func (*KafkaSchemaReconciler) SetupWithManager ¶
func (r *KafkaSchemaReconciler) SetupWithManager(mgr ctrl.Manager) error
type KafkaSchemaRegistryACLHandler ¶ added in v0.18.0
type KafkaSchemaRegistryACLHandler struct{}
type KafkaSchemaRegistryACLReconciler ¶ added in v0.18.0
type KafkaSchemaRegistryACLReconciler struct {
Controller
}
KafkaSchemaRegistryACLReconciler reconciles a KafkaSchemaRegistryACL object
func (*KafkaSchemaRegistryACLReconciler) SetupWithManager ¶ added in v0.18.0
func (r *KafkaSchemaRegistryACLReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type KafkaTopicHandler ¶
type KafkaTopicHandler struct{}
type KafkaTopicReconciler ¶
type KafkaTopicReconciler struct {
Controller
MaxConcurrentReconciles int
}
KafkaTopicReconciler reconciles a KafkaTopic object
func (*KafkaTopicReconciler) SetupWithManager ¶
func (r *KafkaTopicReconciler) SetupWithManager(mgr ctrl.Manager) error
type MySQLReconciler ¶ added in v0.6.0
type MySQLReconciler struct {
Controller
}
MySQLReconciler reconciles a MySQL object
func (*MySQLReconciler) SetupWithManager ¶ added in v0.6.0
func (r *MySQLReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type Observation ¶ added in v0.35.0
type Observation struct {
// ResourceExists indicates whether the external resource exists on Aiven side.
ResourceExists bool
// ResourceUpToDate indicates whether the external resource matches the desired state.
// Only meaningful when ResourceExists is true.
ResourceUpToDate bool
// SecretDetails contains secret data for the resource (credentials, endpoints, CA certs, etc.).
// Will be written to the connInfoSecretTarget if not nil and not empty.
// Keys should NOT include prefixes - the reconciler will apply the appropriate prefix.
// Example keys: "HOST", "PORT", "USERNAME", "PASSWORD", "CA_CERT"
SecretDetails SecretDetails
}
Observation is the result of observing the resource. Can be extended with additional fields as needed.
type OpenSearchHandler ¶ added in v0.3.0
type OpenSearchHandler struct{}
type OpenSearchReconciler ¶ added in v0.3.0
type OpenSearchReconciler struct {
Controller
}
OpenSearchReconciler reconciles a OpenSearch object
func (*OpenSearchReconciler) SetupWithManager ¶ added in v0.3.0
func (r *OpenSearchReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PasswordSource ¶ added in v0.31.0
type PasswordSource interface {
metav1.Object
GetConnInfoSecretSource() *v1alpha1.ConnInfoSecretSource
}
PasswordSource defines an interface for resources that can provide password sources
type PostgreSQLReconciler ¶
type PostgreSQLReconciler struct {
Controller
}
PostgreSQLReconciler reconciles a PostgreSQL object
func (*PostgreSQLReconciler) SetupWithManager ¶
func (r *PostgreSQLReconciler) SetupWithManager(mgr ctrl.Manager) error
type ProjectReconciler ¶
type ProjectReconciler struct {
Controller
}
ProjectReconciler reconciles a Project object
func (*ProjectReconciler) SetupWithManager ¶
func (r *ProjectReconciler) SetupWithManager(mgr ctrl.Manager) error
type ProjectVPCHandler ¶
type ProjectVPCHandler struct {
// contains filtered or unexported fields
}
type ProjectVPCReconciler ¶
type ProjectVPCReconciler struct {
Controller
}
ProjectVPCReconciler reconciles a ProjectVPC object
func (*ProjectVPCReconciler) SetupWithManager ¶
func (r *ProjectVPCReconciler) SetupWithManager(mgr ctrl.Manager) error
type Reconciler ¶ added in v0.35.0
type Reconciler[T v1alpha1.AivenManagedObject] struct { Controller // contains filtered or unexported fields }
Reconciler handles the boilerplate reconciliation logic for Aiven resources. It orchestrates the ExternalClient lifecycle methods and manages: - Finalizers - Status conditions - Secrets (connection details) - Events - Requeue logic
func (*Reconciler[T]) Reconcile ¶ added in v0.35.0
func (r *Reconciler[T]) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl.Result, err error)
Reconcile performs the full reconciliation loop for a managed resource.
func (*Reconciler[T]) SetupWithManager ¶ added in v0.35.0
func (r *Reconciler[T]) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type SecretDetails ¶ added in v0.35.0
type SecretFinalizerGCController ¶
SecretFinalizerGCController manages the protection finalizer of the client token secrets, to give the controllers a chance to delete the aiven instances
func (*SecretFinalizerGCController) SetupWithManager ¶
func (c *SecretFinalizerGCController) SetupWithManager(mgr ctrl.Manager, hasDefaultToken bool) error
type SecretSourceResource ¶ added in v0.32.0
type SecretSourceResource interface {
client.Object
GetConnInfoSecretSource() *v1alpha1.ConnInfoSecretSource
}
SecretSourceResource defines an interface for resources that can have connInfoSecretSource
type SecretWatchController ¶ added in v0.32.0
SecretWatchController watches for changes to secrets referenced by connInfoSecretSource and triggers reconciliation of the dependent resources
func (*SecretWatchController) SetupWithManager ¶ added in v0.32.0
func (c *SecretWatchController) SetupWithManager(mgr ctrl.Manager) error
type ServiceIntegrationEndpointHandler ¶ added in v0.20.0
type ServiceIntegrationEndpointHandler struct{}
type ServiceIntegrationEndpointReconciler ¶ added in v0.20.0
type ServiceIntegrationEndpointReconciler struct {
Controller
}
ServiceIntegrationEndpointReconciler reconciles a ServiceIntegrationEndpoint object
func (*ServiceIntegrationEndpointReconciler) Reconcile ¶ added in v0.20.0
func (r *ServiceIntegrationEndpointReconciler) 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.
func (*ServiceIntegrationEndpointReconciler) SetupWithManager ¶ added in v0.20.0
func (r *ServiceIntegrationEndpointReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type ServiceIntegrationHandler ¶
type ServiceIntegrationHandler struct{}
type ServiceIntegrationReconciler ¶
type ServiceIntegrationReconciler struct {
Controller
}
ServiceIntegrationReconciler reconciles a ServiceIntegration object
func (*ServiceIntegrationReconciler) SetupWithManager ¶
func (r *ServiceIntegrationReconciler) SetupWithManager(mgr ctrl.Manager) error
type ServiceUserHandler ¶
type ServiceUserHandler struct {
// contains filtered or unexported fields
}
type ServiceUserReconciler ¶
type ServiceUserReconciler struct {
Controller
}
ServiceUserReconciler reconciles a ServiceUser object
func (*ServiceUserReconciler) SetupWithManager ¶
func (r *ServiceUserReconciler) SetupWithManager(mgr ctrl.Manager) error
type SetupConfig ¶ added in v0.35.0
type UpdateResult ¶ added in v0.35.0
type UpdateResult = Observation
UpdateResult is returned from Update and carries optional information about the external resource (for example, connection details).
type ValkeyHandler ¶ added in v0.27.0
type ValkeyHandler struct{}
type ValkeyReconciler ¶ added in v0.27.0
type ValkeyReconciler struct {
Controller
}
ValkeyReconciler reconciles a Valkey object
func (*ValkeyReconciler) SetupWithManager ¶ added in v0.27.0
func (r *ValkeyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
Source Files
¶
- alloydbomni_controller.go
- basic_controller.go
- cassandra_controller.go
- clickhouse_controller.go
- clickhousedatabase_controller.go
- clickhousegrant_controller.go
- clickhouserole_controller.go
- clickhouseuser_controller.go
- client.go
- common.go
- connectionpool_controller.go
- database_controller.go
- flink_controller.go
- generic_service_handler.go
- grafana_controller.go
- kafka_controller.go
- kafkaacl_controller.go
- kafkaconnect_controller.go
- kafkaconnector_controller.go
- kafkanativeacl_controller.go
- kafkaschema_controller.go
- kafkaschemaregistryacl_controller.go
- kafkatopic_controller.go
- mysql_controller.go
- opensearch_controller.go
- postgresql_controller.go
- project_controller.go
- projectvpc_controller.go
- reconciler.go
- secret_finalizer_gc_controller.go
- secret_password_manager.go
- secret_watch_controller.go
- serviceintegration_controller.go
- serviceintegrationendpoint_controller.go
- serviceuser_controller.go
- setup.go
- valkey_controller.go