Skip to main content

Module crd

Module crd 

Source
Expand description

Custom Resource Definition for PostgresPolicy.

Defines the pgroles.io/v1alpha1 CRD that the operator watches. The spec mirrors the CLI manifest schema with additional fields for database connection and reconciliation scheduling.

Structs§

ChangeSummary
Summary of changes applied during reconciliation.
ConnectionParams
Structured connection parameters for building a PostgreSQL connection URL.
ConnectionSpec
Database connection configuration.
DatabaseIdentity
Canonical target identity for conflict detection between policies.
DefaultPrivilegeGrantSpec
Default privilege grant within a profile.
GeneratePasswordSpec
Configuration for operator-generated passwords.
OwnershipClaims
Conservative ownership claims for a policy.
PasswordSpec
Password configuration: either reference an existing Secret or have the operator generate a password and create a Secret.
PlanReference
Reference to a PostgresPolicyPlan resource.
PolicyCondition
A condition on the PostgresPolicy resource.
PolicyPlanRef
Reference to the parent PostgresPolicy that generated a plan.
PostgresPolicy
Auto-generated derived type for PostgresPolicySpec via CustomResource
PostgresPolicyPlan
Auto-generated derived type for PostgresPolicyPlanSpec via CustomResource
PostgresPolicyPlanSpec
Spec for a PostgresPolicyPlan custom resource.
PostgresPolicyPlanStatus
Status of a PostgresPolicyPlan resource.
PostgresPolicySpec
Spec for a PostgresPolicy custom resource.
PostgresPolicyStatus
Status of a PostgresPolicy resource.
ProfileGrantSpec
Grant template within a profile.
ProfileObjectTargetSpec
Object target within a profile.
ProfileSpec
A reusable privilege profile (CRD-compatible version).
RoleSpec
A concrete role definition (CRD-compatible version).
SecretKeySelector
Reference to a specific key within a Kubernetes Secret.
SecretReference
Reference to a Kubernetes Secret in the same namespace.
SqlRef
Reference to a ConfigMap containing SQL for a plan.

Enums§

ApprovalMode
Approval mode for plans generated by this policy.
ConnectionAuth
Provider-backed authentication for connection.params.
ConnectionValidationError
Errors from connection spec validation.
CrdReconciliationMode
Convergence strategy for how aggressively to converge the database.
PasswordValidationError
PlanPhase
Phase of a PostgresPolicyPlan.
PolicyMode
Policy reconcile mode.
SqlCompression
Compression format used for persisted plan SQL previews.

Constants§

DEFAULT_GCP_CLOUD_SQL_LOGIN_SCOPE
Default OAuth scope used for Cloud SQL IAM database login tokens.
LABEL_DATABASE_IDENTITY
Label key for the managed database identity on plan resources.
LABEL_PLAN
Label key for the plan name on SQL storage resources.
LABEL_POLICY
Label key for the parent policy name on plan resources.
PLAN_APPROVED_ANNOTATION
Annotation key used to approve a PostgresPolicyPlan.
PLAN_REJECTED_ANNOTATION
Annotation key used to reject a PostgresPolicyPlan.
VALID_SSL_MODES
Valid PostgreSQL SSL modes for connection params.

Functions§

conflict_condition
Helper to create a “Conflict” condition.
days_to_date
Convert days since Unix epoch to (year, month, day).
degraded_condition
Helper to create a “Degraded” condition.
drifted_condition
Helper to create a “Drifted” condition.
now_rfc3339
Create a timestamp string in ISO 8601 / RFC 3339 format.
paused_condition
Helper to create a “Paused” condition.
ready_condition
Helper to create a “Ready” condition.
reconciling_condition
Helper to create a “Reconciling” condition.