controller

package
v0.0.0-...-622d496 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: MIT Imports: 58 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (

	// ProjectIDLabel and ProjectIDAnnotationFallback is where a team namespace
	// records which Google project it maps to.
	ProjectIDLabel              = "google-cloud-project"
	ProjectIDAnnotationFallback = "cnrm.cloud.google.com/project-id"
)
View Source
const ConditionReasonUnknown = "Unknown"

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenSearchPreparedData

type OpenSearchPreparedData struct{}

OpenSearchPreparedData contains data prepared during the Prepare phase

type OpenSearchReconciler

type OpenSearchReconciler struct {
	Aiven  config.Aiven
	Tenant config.Tenant

	Recorder events.Recorder
	Scheme   *runtime.Scheme
}

OpenSearchReconciler reconciles an OpenSearch object

func (*OpenSearchReconciler) AdditionalTypes

func (r *OpenSearchReconciler) AdditionalTypes() []client.Object

func (*OpenSearchReconciler) Delete

func (*OpenSearchReconciler) FinalizerName

func (r *OpenSearchReconciler) FinalizerName() string

func (*OpenSearchReconciler) Name

func (r *OpenSearchReconciler) Name() string

func (*OpenSearchReconciler) New

func (*OpenSearchReconciler) OwnedTypes

func (r *OpenSearchReconciler) OwnedTypes() []reconciler.OwnedType

func (*OpenSearchReconciler) Prepare

func (*OpenSearchReconciler) Update

type PostgresAccessPreparedData

type PostgresAccessPreparedData struct {
	Cluster        *cnpgv1.Cluster            `yaml:"-"`
	Password       string                     `yaml:"-"`
	Role           *cnpgv1.DatabaseRole       `yaml:"-"`
	Token          string                     `yaml:"-"`
	TokenPersisted bool                       `yaml:"-"`
	RelayAccess    *unstructured.Unstructured `yaml:"-"`
	Expired        bool                       `yaml:"-"`
}

type PostgresAccessReconciler

type PostgresAccessReconciler struct {
	Recorder events.Recorder
	Scheme   *runtime.Scheme
}

PostgresAccessReconciler establishes the durable database identity behind a personal access. Session credentials, privileges and transport are added by later PostgresAccess reconciliation steps.

func (*PostgresAccessReconciler) AdditionalTypes

func (r *PostgresAccessReconciler) AdditionalTypes() []client.Object

func (*PostgresAccessReconciler) Delete

func (*PostgresAccessReconciler) Indexes

func (r *PostgresAccessReconciler) Indexes() []reconciler.Index

func (*PostgresAccessReconciler) Name

func (r *PostgresAccessReconciler) Name() string

func (*PostgresAccessReconciler) New

func (*PostgresAccessReconciler) OwnedTypes

func (r *PostgresAccessReconciler) OwnedTypes() []reconciler.OwnedType

PostgresAccess owns its declarative access resources. The DatabaseRole uses Retain so CNPG preserves the PostgreSQL role and objects it owns after the access and DatabaseRole CR are deleted.

func (*PostgresAccessReconciler) Prepare

func (*PostgresAccessReconciler) RelationshipWatches

func (r *PostgresAccessReconciler) RelationshipWatches() []reconciler.RelationshipWatch

func (*PostgresAccessReconciler) Update

type PostgresBindingPreparedData

type PostgresBindingPreparedData struct {
	PhysicalName    string `yaml:"physicalName"`
	Unavailable     bool   `yaml:"unavailable,omitempty"`
	Snapshot        *bindingSnapshot
	MissingClusters map[string]bool `yaml:"missingClusters,omitempty"`
}

PostgresBindingPreparedData contains the database's physical name and, when all CNPG source material is present, an internally consistent credential snapshot.

type PostgresBindingReconciler

type PostgresBindingReconciler struct {
	Recorder events.Recorder
	Scheme   *runtime.Scheme
}

PostgresBindingReconciler reconciles a nais.io/v1 PostgresBinding into a CloudNativePG DatabaseRole with an operator-issued client certificate, a connection Secret, and NetworkPolicies that open the path to the connection pooler.

func (*PostgresBindingReconciler) AdditionalTypes

func (r *PostgresBindingReconciler) AdditionalTypes() []client.Object

func (*PostgresBindingReconciler) Delete

Delete withdraws transport immediately, but retains the SQL identity. Wait for confirmed revocation before deleting each Retain CR and releasing the binding.

func (*PostgresBindingReconciler) Indexes

func (*PostgresBindingReconciler) Name

func (*PostgresBindingReconciler) New

func (*PostgresBindingReconciler) OwnedTypes

func (*PostgresBindingReconciler) Prepare

Prepare verifies that the referenced Postgres exists in the same namespace.

Bindings are namespace-local by design: the namespace is the team boundary, so resolving the Postgres by name in the binding's own namespace is what enforces that a team cannot bind to another team's database.

func (*PostgresBindingReconciler) RelationshipWatches

func (r *PostgresBindingReconciler) RelationshipWatches() []reconciler.RelationshipWatch

func (*PostgresBindingReconciler) Update

type PostgresClusterPreparedData

type PostgresClusterPreparedData struct {
	Cluster                   *cnpgv1.Cluster        `yaml:"cluster,omitempty"`
	Children                  []client.Object        `yaml:"-"`
	ProjectID                 string                 `yaml:"projectID,omitempty"`
	RecoverySource            *rccnpg.RecoverySource `yaml:"recoverySource,omitempty"`
	RecoverySourceReady       bool                   `yaml:"recoverySourceReady,omitempty"`
	BlockingRecoveries        []string               `yaml:"blockingRecoveries,omitempty"`
	RecoveryAdmissionRequired bool                   `yaml:"recoveryAdmissionRequired,omitempty"`
}

type PostgresClusterReconciler

type PostgresClusterReconciler struct {
	Config   *config.Config
	Recorder events.Recorder
	Scheme   *runtime.Scheme
}

PostgresClusterReconciler manages adopted and newly provisioned databases. Databases from releases before direct ownership must complete adoption with such a release first. Physical names keep their historical identities.

func (*PostgresClusterReconciler) AdditionalTypes

func (r *PostgresClusterReconciler) AdditionalTypes() []client.Object

func (*PostgresClusterReconciler) Delete

func (*PostgresClusterReconciler) MetricsLabels

func (r *PostgresClusterReconciler) MetricsLabels(pg *v1.Postgres) map[string]string

func (*PostgresClusterReconciler) Name

func (*PostgresClusterReconciler) New

func (*PostgresClusterReconciler) OwnedTypes

func (*PostgresClusterReconciler) Prepare

func (*PostgresClusterReconciler) PruneUnreferenced

func (r *PostgresClusterReconciler) PruneUnreferenced() bool

Physical resources are never deleted merely because a configuration or action list no longer mentions them. Delete uses a fresh, explicit ownership inventory.

func (*PostgresClusterReconciler) RelationshipWatches

func (r *PostgresClusterReconciler) RelationshipWatches() []reconciler.RelationshipWatch

func (*PostgresClusterReconciler) StatusCheckpointRequired

func (r *PostgresClusterReconciler) StatusCheckpointRequired(current, original *v1.Postgres) bool

func (*PostgresClusterReconciler) Update

type ValkeyPreparedData

type ValkeyPreparedData struct{}

ValkeyPreparedData contains data prepared during the Prepare phase

type ValkeyReconciler

type ValkeyReconciler struct {
	Aiven  config.Aiven
	Tenant config.Tenant

	Recorder events.Recorder
	Scheme   *runtime.Scheme
}

ValkeyReconciler reconciles a Valkey object

func (*ValkeyReconciler) AdditionalTypes

func (r *ValkeyReconciler) AdditionalTypes() []client.Object

func (*ValkeyReconciler) Delete

func (*ValkeyReconciler) FinalizerName

func (r *ValkeyReconciler) FinalizerName() string

func (*ValkeyReconciler) Name

func (r *ValkeyReconciler) Name() string

func (*ValkeyReconciler) New

func (r *ValkeyReconciler) New() *v1.Valkey

func (*ValkeyReconciler) OwnedTypes

func (r *ValkeyReconciler) OwnedTypes() []reconciler.OwnedType

func (*ValkeyReconciler) Prepare

func (*ValkeyReconciler) Update

Jump to

Keyboard shortcuts

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