Documentation ¶
Index ¶
- Variables
- func SetupController(mgr ctrl.Manager) error
- func SetupWebhook(mgr ctrl.Manager) error
- type CreateStandalonePipeline
- type DeleteStandalonePipeline
- type PostgresStandaloneReconciler
- func (r *PostgresStandaloneReconciler) DeleteDeployment(ctx context.Context) (reconcile.Result, error)
- func (r *PostgresStandaloneReconciler) ProvisionDeployment(ctx context.Context, instance *v1alpha1.PostgresqlStandalone) (reconcile.Result, error)
- func (r *PostgresStandaloneReconciler) Reconcile(ctx context.Context, request reconcile.Request) (reconcile.Result, error)
- type PostgresqlStandaloneDefaulter
- type PostgresqlStandaloneValidator
- func (v *PostgresqlStandaloneValidator) ValidateCreate(ctx context.Context, obj runtime.Object) error
- func (v *PostgresqlStandaloneValidator) ValidateDelete(ctx context.Context, obj runtime.Object) error
- func (v *PostgresqlStandaloneValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) error
Constants ¶
This section is empty.
Variables ¶
var ( // OperatorNamespace is the namespace where the controller looks for v1alpha1.PostgresqlStandaloneOperatorConfig. OperatorNamespace = "" // ServiceNamespacePrefix is the namespace prefix which the controller uses to create the namespaces where the PostgreSQL instances are actually deployed in. ServiceNamespacePrefix = "sv-postgresql-s-" )
Functions ¶
func SetupController ¶
SetupController adds a controller that reconciles v1alpha1.PostgresqlStandalone managed resources.
func SetupWebhook ¶
SetupWebhook adds a webhook for v1alpha1.PostgresqlStandalone managed resources.
Types ¶
type CreateStandalonePipeline ¶ added in v0.1.0
type CreateStandalonePipeline struct {
// contains filtered or unexported fields
}
CreateStandalonePipeline is a pipeline that creates a new instance in the target deployment namespace. Currently, it's optimized for first-time creation scenarios and may fail when reconciling existing instances.
func NewStandalonePipeline ¶ added in v0.1.0
func NewStandalonePipeline(operatorNamespace string) *CreateStandalonePipeline
NewStandalonePipeline creates a new pipeline with the required dependencies.
type DeleteStandalonePipeline ¶ added in v0.1.0
type DeleteStandalonePipeline struct{}
DeleteStandalonePipeline is a pipeline that deletes an instance from the target deployment namespace.
func NewDeleteStandalonePipeline ¶ added in v0.1.0
func NewDeleteStandalonePipeline() *DeleteStandalonePipeline
NewDeleteStandalonePipeline creates a new delete pipeline with the required dependencies.
func (*DeleteStandalonePipeline) RunPipeline ¶ added in v0.1.0
func (d *DeleteStandalonePipeline) RunPipeline(ctx context.Context) error
RunPipeline executes the pipeline with configured business logic steps. The pipeline requires multiple reconciliations due to asynchronous deletion of resources in background The Helm Release step requires a complete removal of its resources before moving to the next step
type PostgresStandaloneReconciler ¶
type PostgresStandaloneReconciler struct {
// contains filtered or unexported fields
}
PostgresStandaloneReconciler reconciles v1alpha1.PostgresqlStandalone.
func (*PostgresStandaloneReconciler) DeleteDeployment ¶ added in v0.1.0
func (r *PostgresStandaloneReconciler) DeleteDeployment(ctx context.Context) (reconcile.Result, error)
DeleteDeployment prepares the given instance for deletion.
func (*PostgresStandaloneReconciler) ProvisionDeployment ¶ added in v0.1.0
func (r *PostgresStandaloneReconciler) ProvisionDeployment(ctx context.Context, instance *v1alpha1.PostgresqlStandalone) (reconcile.Result, error)
ProvisionDeployment reconciles the given instance
type PostgresqlStandaloneDefaulter ¶ added in v0.1.0
type PostgresqlStandaloneDefaulter struct{}
PostgresqlStandaloneDefaulter is the webhook that sets default values for the v1alpha1.PostgresqlStandalone.
type PostgresqlStandaloneValidator ¶
type PostgresqlStandaloneValidator struct {
// contains filtered or unexported fields
}
PostgresqlStandaloneValidator validates admission requests.
func (*PostgresqlStandaloneValidator) ValidateCreate ¶
func (v *PostgresqlStandaloneValidator) ValidateCreate(ctx context.Context, obj runtime.Object) error
ValidateCreate implements admission.CustomValidator.
func (*PostgresqlStandaloneValidator) ValidateDelete ¶
func (v *PostgresqlStandaloneValidator) ValidateDelete(ctx context.Context, obj runtime.Object) error
ValidateDelete implements admission.CustomValidator.
func (*PostgresqlStandaloneValidator) ValidateUpdate ¶
func (v *PostgresqlStandaloneValidator) ValidateUpdate(_ context.Context, oldObj, newObj runtime.Object) error
ValidateUpdate implements admission.CustomValidator. This validator:
- prevents selecting another major version (major version upgrade is currently unsupported)
- prevents storage capacity to be decreased