Documentation
¶
Index ¶
- Constants
- type OpenSearchPreparedData
- type OpenSearchReconciler
- func (r *OpenSearchReconciler) AdditionalTypes() []client.Object
- func (r *OpenSearchReconciler) Delete(obj *v1.OpenSearch, _ OpenSearchPreparedData, ...) ([]action.Action, ctrl.Result, error)
- func (r *OpenSearchReconciler) FinalizerName() string
- func (r *OpenSearchReconciler) Name() string
- func (r *OpenSearchReconciler) New() *v1.OpenSearch
- func (r *OpenSearchReconciler) OwnedTypes() []reconciler.OwnedType
- func (r *OpenSearchReconciler) Prepare(_ context.Context, _ client.Reader, _ *v1.OpenSearch) (OpenSearchPreparedData, ctrl.Result, error)
- func (r *OpenSearchReconciler) Update(obj *v1.OpenSearch, _ OpenSearchPreparedData, _ reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
- type PostgresAccessPreparedData
- type PostgresAccessReconciler
- func (r *PostgresAccessReconciler) AdditionalTypes() []client.Object
- func (r *PostgresAccessReconciler) Delete(access *v1.PostgresAccess, _ PostgresAccessPreparedData, ...) ([]action.Action, ctrl.Result, error)
- func (r *PostgresAccessReconciler) Indexes() []reconciler.Index
- func (r *PostgresAccessReconciler) Name() string
- func (r *PostgresAccessReconciler) New() *v1.PostgresAccess
- func (r *PostgresAccessReconciler) OwnedTypes() []reconciler.OwnedType
- func (r *PostgresAccessReconciler) Prepare(ctx context.Context, reader client.Reader, access *v1.PostgresAccess) (PostgresAccessPreparedData, ctrl.Result, error)
- func (r *PostgresAccessReconciler) RelationshipWatches() []reconciler.RelationshipWatch
- func (r *PostgresAccessReconciler) Update(access *v1.PostgresAccess, prepared PostgresAccessPreparedData, ...) ([]action.Action, ctrl.Result, error)
- type PostgresBindingPreparedData
- type PostgresBindingReconciler
- func (r *PostgresBindingReconciler) AdditionalTypes() []client.Object
- func (r *PostgresBindingReconciler) Delete(obj *v1.PostgresBinding, prepared PostgresBindingPreparedData, ...) ([]action.Action, ctrl.Result, error)
- func (r *PostgresBindingReconciler) Indexes() []reconciler.Index
- func (r *PostgresBindingReconciler) Name() string
- func (r *PostgresBindingReconciler) New() *v1.PostgresBinding
- func (r *PostgresBindingReconciler) OwnedTypes() []reconciler.OwnedType
- func (r *PostgresBindingReconciler) Prepare(ctx context.Context, reader client.Reader, obj *v1.PostgresBinding) (PostgresBindingPreparedData, ctrl.Result, error)
- func (r *PostgresBindingReconciler) RelationshipWatches() []reconciler.RelationshipWatch
- func (r *PostgresBindingReconciler) Update(obj *v1.PostgresBinding, prepared PostgresBindingPreparedData, ...) ([]action.Action, ctrl.Result, error)
- type PostgresClusterPreparedData
- type PostgresClusterReconciler
- func (r *PostgresClusterReconciler) AdditionalTypes() []client.Object
- func (r *PostgresClusterReconciler) Delete(pg *v1.Postgres, p PostgresClusterPreparedData, _ reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
- func (r *PostgresClusterReconciler) MetricsLabels(pg *v1.Postgres) map[string]string
- func (r *PostgresClusterReconciler) Name() string
- func (r *PostgresClusterReconciler) New() *v1.Postgres
- func (r *PostgresClusterReconciler) OwnedTypes() []reconciler.OwnedType
- func (r *PostgresClusterReconciler) Prepare(ctx context.Context, reader client.Reader, pg *v1.Postgres) (PostgresClusterPreparedData, ctrl.Result, error)
- func (r *PostgresClusterReconciler) PruneUnreferenced() bool
- func (r *PostgresClusterReconciler) RelationshipWatches() []reconciler.RelationshipWatch
- func (r *PostgresClusterReconciler) StatusCheckpointRequired(current, original *v1.Postgres) bool
- func (r *PostgresClusterReconciler) Update(pg *v1.Postgres, p PostgresClusterPreparedData, ...) ([]action.Action, ctrl.Result, error)
- type ValkeyPreparedData
- type ValkeyReconciler
- func (r *ValkeyReconciler) AdditionalTypes() []client.Object
- func (r *ValkeyReconciler) Delete(obj *v1.Valkey, _ ValkeyPreparedData, relatedObjects reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
- func (r *ValkeyReconciler) FinalizerName() string
- func (r *ValkeyReconciler) Name() string
- func (r *ValkeyReconciler) New() *v1.Valkey
- func (r *ValkeyReconciler) OwnedTypes() []reconciler.OwnedType
- func (r *ValkeyReconciler) Prepare(_ context.Context, _ client.Reader, _ *v1.Valkey) (ValkeyPreparedData, ctrl.Result, error)
- func (r *ValkeyReconciler) Update(obj *v1.Valkey, _ ValkeyPreparedData, relatedObjects reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
Constants ¶
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" )
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 (r *OpenSearchReconciler) Delete(obj *v1.OpenSearch, _ OpenSearchPreparedData, relatedObjects reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
func (*OpenSearchReconciler) FinalizerName ¶
func (r *OpenSearchReconciler) FinalizerName() string
func (*OpenSearchReconciler) Name ¶
func (r *OpenSearchReconciler) Name() string
func (*OpenSearchReconciler) New ¶
func (r *OpenSearchReconciler) New() *v1.OpenSearch
func (*OpenSearchReconciler) OwnedTypes ¶
func (r *OpenSearchReconciler) OwnedTypes() []reconciler.OwnedType
func (*OpenSearchReconciler) Prepare ¶
func (r *OpenSearchReconciler) Prepare(_ context.Context, _ client.Reader, _ *v1.OpenSearch) (OpenSearchPreparedData, ctrl.Result, error)
func (*OpenSearchReconciler) Update ¶
func (r *OpenSearchReconciler) Update(obj *v1.OpenSearch, _ OpenSearchPreparedData, _ reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
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 ¶
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 (r *PostgresAccessReconciler) Delete(access *v1.PostgresAccess, _ PostgresAccessPreparedData, related reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
func (*PostgresAccessReconciler) Indexes ¶
func (r *PostgresAccessReconciler) Indexes() []reconciler.Index
func (*PostgresAccessReconciler) Name ¶
func (r *PostgresAccessReconciler) Name() string
func (*PostgresAccessReconciler) New ¶
func (r *PostgresAccessReconciler) New() *v1.PostgresAccess
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 (r *PostgresAccessReconciler) Prepare(ctx context.Context, reader client.Reader, access *v1.PostgresAccess) (PostgresAccessPreparedData, ctrl.Result, error)
func (*PostgresAccessReconciler) RelationshipWatches ¶
func (r *PostgresAccessReconciler) RelationshipWatches() []reconciler.RelationshipWatch
func (*PostgresAccessReconciler) Update ¶
func (r *PostgresAccessReconciler) Update(access *v1.PostgresAccess, prepared PostgresAccessPreparedData, related reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
type PostgresBindingPreparedData ¶
type PostgresBindingPreparedData struct {
PhysicalName string `yaml:"physicalName"`
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 ¶
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 ¶
func (r *PostgresBindingReconciler) Delete(obj *v1.PostgresBinding, prepared PostgresBindingPreparedData, related reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
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 (r *PostgresBindingReconciler) Indexes() []reconciler.Index
func (*PostgresBindingReconciler) Name ¶
func (r *PostgresBindingReconciler) Name() string
func (*PostgresBindingReconciler) New ¶
func (r *PostgresBindingReconciler) New() *v1.PostgresBinding
func (*PostgresBindingReconciler) OwnedTypes ¶
func (r *PostgresBindingReconciler) OwnedTypes() []reconciler.OwnedType
func (*PostgresBindingReconciler) Prepare ¶
func (r *PostgresBindingReconciler) Prepare(ctx context.Context, reader client.Reader, obj *v1.PostgresBinding) (PostgresBindingPreparedData, ctrl.Result, error)
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 ¶
func (r *PostgresBindingReconciler) Update(obj *v1.PostgresBinding, prepared PostgresBindingPreparedData, relatedObjects reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
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 (r *PostgresClusterReconciler) Delete(pg *v1.Postgres, p PostgresClusterPreparedData, _ reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
func (*PostgresClusterReconciler) MetricsLabels ¶
func (r *PostgresClusterReconciler) MetricsLabels(pg *v1.Postgres) map[string]string
func (*PostgresClusterReconciler) Name ¶
func (r *PostgresClusterReconciler) Name() string
func (*PostgresClusterReconciler) New ¶
func (r *PostgresClusterReconciler) New() *v1.Postgres
func (*PostgresClusterReconciler) OwnedTypes ¶
func (r *PostgresClusterReconciler) OwnedTypes() []reconciler.OwnedType
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 ¶
func (r *PostgresClusterReconciler) Update(pg *v1.Postgres, p PostgresClusterPreparedData, related reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
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 (r *ValkeyReconciler) Delete(obj *v1.Valkey, _ ValkeyPreparedData, relatedObjects reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
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) Update ¶
func (r *ValkeyReconciler) Update(obj *v1.Valkey, _ ValkeyPreparedData, relatedObjects reconciler.RelatedObjects) ([]action.Action, ctrl.Result, error)
Source Files
¶
- condition.go
- opensearch_controller.go
- postgres_alerts.go
- postgres_physical.go
- postgres_recovery.go
- postgres_recovery_admission.go
- postgres_recovery_status.go
- postgres_shared.go
- postgresaccess_controller.go
- postgresaccess_target.go
- postgresbinding_controller.go
- postgresbinding_lifecycle.go
- postgrescluster_controller.go
- valkey_controller.go