standalone

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func SetupController(mgr ctrl.Manager) error

SetupController adds a controller that reconciles v1alpha1.PostgresqlStandalone managed resources.

func SetupWebhook

func SetupWebhook(mgr ctrl.Manager) error

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.

func (*CreateStandalonePipeline) Run added in v0.1.0

Run executes the pipeline with configured business logic steps. This should only be executed once per pipeline as it stores intermediate results in the struct.

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

ProvisionDeployment reconciles the given instance

func (*PostgresStandaloneReconciler) Reconcile

Reconcile implements reconcile.Reconciler.

type PostgresqlStandaloneDefaulter added in v0.1.0

type PostgresqlStandaloneDefaulter struct{}

PostgresqlStandaloneDefaulter is the webhook that sets default values for the v1alpha1.PostgresqlStandalone.

func (*PostgresqlStandaloneDefaulter) Default added in v0.1.0

Default sets the default values for the instance.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL