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§
- Change
Summary - Summary of changes applied during reconciliation.
- Connection
Params - Structured connection parameters for building a PostgreSQL connection URL.
- Connection
Spec - Database connection configuration.
- Database
Identity - Canonical target identity for conflict detection between policies.
- Default
Privilege Grant Spec - Default privilege grant within a profile.
- Generate
Password Spec - Configuration for operator-generated passwords.
- Ownership
Claims - Conservative ownership claims for a policy.
- Password
Spec - Password configuration: either reference an existing Secret or have the operator generate a password and create a Secret.
- Plan
Reference - Reference to a
PostgresPolicyPlanresource. - Policy
Condition - A condition on the
PostgresPolicyresource. - Policy
Plan Ref - Reference to the parent
PostgresPolicythat generated a plan. - Postgres
Policy - Auto-generated derived type for PostgresPolicySpec via
CustomResource - Postgres
Policy Plan - Auto-generated derived type for PostgresPolicyPlanSpec via
CustomResource - Postgres
Policy Plan Spec - Spec for a
PostgresPolicyPlancustom resource. - Postgres
Policy Plan Status - Status of a
PostgresPolicyPlanresource. - Postgres
Policy Spec - Spec for a
PostgresPolicycustom resource. - Postgres
Policy Status - Status of a
PostgresPolicyresource. - Profile
Grant Spec - Grant template within a profile.
- Profile
Object Target Spec - Object target within a profile.
- Profile
Spec - A reusable privilege profile (CRD-compatible version).
- Role
Spec - A concrete role definition (CRD-compatible version).
- Secret
KeySelector - Reference to a specific key within a Kubernetes Secret.
- Secret
Reference - Reference to a Kubernetes Secret in the same namespace.
- SqlRef
- Reference to a ConfigMap containing SQL for a plan.
Enums§
- Approval
Mode - Approval mode for plans generated by this policy.
- Connection
Auth - Provider-backed authentication for
connection.params. - Connection
Validation Error - Errors from connection spec validation.
- CrdReconciliation
Mode - Convergence strategy for how aggressively to converge the database.
- Password
Validation Error - Plan
Phase - Phase of a
PostgresPolicyPlan. - Policy
Mode - 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. - REQUESTED_
RECONCILE_ ANNOTATION - Annotation key used to request an immediate
PostgresPolicyreconcile. - 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.