Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the persistance v1 API group +kubebuilder:object:generate=true +groupName=persistance.atlas.infoblox.com
Index ¶
- Variables
- type Database
- type DatabaseClaim
- type DatabaseClaimConnectionInfo
- type DatabaseClaimList
- type DatabaseClaimSpec
- type DatabaseClaimStatus
- type DatabaseType
- type DbRoleClaim
- type DbRoleClaimList
- type DbRoleClaimSpec
- type DbRoleClaimStatus
- type DbState
- type DeletionPolicy
- type RoleType
- type SQLEngine
- type SchemaRoleStatus
- type SecretRef
- type SourceDataFrom
- type SourceDataType
- type SourceDatabaseClaim
- type Status
- type StatusForOldDB
- type Tag
Constants ¶
This section is empty.
Variables ¶
var ( DSNKey = "dsn.txt" DSNURIKey = "uri_dsn.txt" ReplicaDSNURIKey = "ro_uri_dsn.txt" )
var ( ErrInvalidDBType = errors.New("invalid database type") ErrInvalidDBVersion = errors.New("invalid database version") )
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "persistance.atlas.infoblox.com", Version: "v1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database struct { // DSN is the connection string used to reach the postgres database // must have protocol specifier at beginning (example: mysql:// postgres:// ) // Deprecated: Use SecretRef dsn.txt instead // +optional DSN string `json:"dsn"` // SecretRef specifies a secret to use for connecting to the postgresdb (should be master/root) // +optional SecretRef *SecretRef `json:"secretRef,omitempty"` }
Database defines the details of an existing database to use as a backup restoration source
func (*Database) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Database.
func (*Database) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatabaseClaim ¶
type DatabaseClaim struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DatabaseClaimSpec `json:"spec,omitempty"` Status DatabaseClaimStatus `json:"status,omitempty"` }
DatabaseClaim is the Schema for the databaseclaims API
func (*DatabaseClaim) DeepCopy ¶
func (in *DatabaseClaim) DeepCopy() *DatabaseClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClaim.
func (*DatabaseClaim) DeepCopyInto ¶
func (in *DatabaseClaim) DeepCopyInto(out *DatabaseClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatabaseClaim) DeepCopyObject ¶
func (in *DatabaseClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatabaseClaimConnectionInfo ¶
type DatabaseClaimConnectionInfo struct { Host string `json:"hostName,omitempty"` Port string `json:"port,omitempty"` DatabaseName string `json:"databaseName,omitempty"` Username string `json:"userName,omitempty"` Password string `json:"password,omitempty"` SSLMode string `json:"sslMode,omitempty"` }
func ParseUri ¶
func ParseUri(dsn string) (*DatabaseClaimConnectionInfo, error)
ParseUri parses a correctly formatted database URI into a DatabaseClaimConnectionInfo
func (*DatabaseClaimConnectionInfo) DeepCopy ¶
func (in *DatabaseClaimConnectionInfo) DeepCopy() *DatabaseClaimConnectionInfo
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClaimConnectionInfo.
func (*DatabaseClaimConnectionInfo) DeepCopyInto ¶
func (in *DatabaseClaimConnectionInfo) DeepCopyInto(out *DatabaseClaimConnectionInfo)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatabaseClaimConnectionInfo) Uri ¶
func (c *DatabaseClaimConnectionInfo) Uri() string
func (*DatabaseClaimConnectionInfo) Validate ¶ added in v1.10.0
func (c *DatabaseClaimConnectionInfo) Validate() error
Validate checks for basic errors in the DSN string
type DatabaseClaimList ¶
type DatabaseClaimList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DatabaseClaim `json:"items"` }
DatabaseClaimList contains a list of DatabaseClaim
func (*DatabaseClaimList) DeepCopy ¶
func (in *DatabaseClaimList) DeepCopy() *DatabaseClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClaimList.
func (*DatabaseClaimList) DeepCopyInto ¶
func (in *DatabaseClaimList) DeepCopyInto(out *DatabaseClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DatabaseClaimList) DeepCopyObject ¶
func (in *DatabaseClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DatabaseClaimSpec ¶
type DatabaseClaimSpec struct { // Class is used to run multiple instances of dbcontroller. // +optional // +kubebuilder:default:="default" Class *string `json:"class"` // SourceDataFrom specifies an existing database or backup to use when initially provisioning the database. // if the dbclaim has already provisioned a database, this field is ignored // +optional SourceDataFrom *SourceDataFrom `json:"sourceDataFrom,omitempty"` // UseExistingSource instructs the controller to perform user management on the database currently defined in the SourceDataFrom field. // If sourceDataFrom is empty, this is ignored // If this is set, .sourceDataFrom.Type and .type must match to use an existing source (since they must be the same) // If this field was set and becomes unset, migration of data will commence // +optional // +kubebuilder:default:=false UseExistingSource *bool `json:"useExistingSource"` // Specifies an indentifier for the application using the database. // +optional AppID string `json:"appId"` // Specifies the type of database to provision. Only postgres is supported. // +optional // +kubebuilder:default:=postgres Type DatabaseType `json:"type"` // Specifies the type of deletion policy to use when the resource is deleted. // It makes a lot of sense to not set it for most cases - this will default it to Orphan based on defaultDeletionPolicy in controllerConfig // If you are setting it to Delete, you should be aware that the database will be deleted when the resource is deleted. Hope you know what you are doing. // +optional // +kubebuilder:validation:Enum=Delete;delete;Orphan;orphan DeletionPolicy DeletionPolicy `json:"deletionPolicy,omitempty"` // If provided, marks auto storage scalling to true for postgres DBinstance. The value represents the maximum allowed storage to scale upto. // For auroraDB instance, this value is ignored. MaxStorageGB int64 `json:"maxStorageGB,omitempty"` // The name of the secret to use for storing the ConnectionInfo. Must follow a naming convention that ensures it is unique. SecretName string `json:"secretName,omitempty"` // The username that the application will use for accessing the database. Username string `json:"userName"` // The name of the database. // +required DatabaseName string `json:"databaseName"` // The version of the database. // +optional DBVersion string `json:"dbVersion"` // DSN is used to name the secret key that contains old style DSN for postgres. // This field is deprecated, update your code to access key // "dsn.txt" or preferrably "uri_dsn.txt" as this field is // not customizable any longer. // +kubebuilder:validation:Optional // +kubebuilder:default:=dsn.txt DSNName string `json:"dsnName"` // The optional Shape values are arbitrary and help drive instance selection // +optional Shape string `json:"shape"` // The optional MinStorageGB value requests the minimum database host storage capacity in GBytes // +optional MinStorageGB int `json:"minStorageGB"` // BackupPolicy specifies the duration at which db backups are taken // +optional // +kubebuilder:validation:Enum=Bronze;Silver;Gold;Platinum BackupPolicy string `json:"backupPolicy,omitempty"` // RestoreFrom indicates the snapshot id to restore the Database from // +optional RestoreFrom string `json:"restoreFrom,omitempty"` // EnableReplicationRole will grant rds replication role to Username // This value is ignored if EnableSuperUser is set to true // +optional // +kubebuilder:default:=false EnableReplicationRole *bool `json:"enableReplicationRole"` // EnableSuperUser will grant rds_superuser and createrole role to Username // This value is ignored if {{ .Values.controllerConfig.supportSuperUserElevation }} is set to false // +optional // +kubebuilder:default:=false EnableSuperUser *bool `json:"enableSuperUser"` // Tags // +optional // +nullable Tags []Tag `json:"tags,omitempty"` // The weekly time range during which system maintenance can occur. // // Valid for Cluster Type: Aurora DB clusters and Multi-AZ DB clusters // // The default is a 30-minute window selected at random from an 8-hour block // of time for each Amazon Web Services Region, occurring on a random day of // the week. To see the time blocks available, see Adjusting the Preferred DB // Cluster Maintenance Window (https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow.Aurora) // in the Amazon Aurora User Guide. // // Constraints: // // * Must be in the format ddd:hh24:mi-ddd:hh24:mi. // // * Days must be one of Mon | Tue | Wed | Thu | Fri | Sat | Sun. // // * Must be in Universal Coordinated Time (UTC). // // * Must be at least 30 minutes. PreferredMaintenanceWindow *string `json:"preferredMaintenanceWindow,omitempty"` }
DatabaseClaimSpec defines the desired state of DatabaseClaim
func (*DatabaseClaimSpec) DeepCopy ¶
func (in *DatabaseClaimSpec) DeepCopy() *DatabaseClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClaimSpec.
func (*DatabaseClaimSpec) DeepCopyInto ¶
func (in *DatabaseClaimSpec) DeepCopyInto(out *DatabaseClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatabaseClaimStatus ¶
type DatabaseClaimStatus struct { // Any errors related to provisioning this claim. Error string `json:"error,omitempty"` //track the status of new db in the process of being created NewDB Status `json:"newDB,omitempty"` //track the status of the active db being used by the application ActiveDB Status `json:"activeDB,omitempty"` //tracks status of DB migration. if empty, not started. //non empty denotes migration in progress, unless it is S_Completed MigrationState string `json:"migrationState,omitempty"` // tracks the DB which is migrated and not more operational OldDB StatusForOldDB `json:"oldDB,omitempty"` // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` }
DatabaseClaimStatus defines the observed state of DatabaseClaim
func (*DatabaseClaimStatus) DeepCopy ¶
func (in *DatabaseClaimStatus) DeepCopy() *DatabaseClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DatabaseClaimStatus.
func (*DatabaseClaimStatus) DeepCopyInto ¶
func (in *DatabaseClaimStatus) DeepCopyInto(out *DatabaseClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DatabaseType ¶
type DatabaseType string
const ( Postgres DatabaseType = "postgres" AuroraPostgres DatabaseType = "aurora-postgresql" )
type DbRoleClaim ¶
type DbRoleClaim struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec DbRoleClaimSpec `json:"spec,omitempty"` Status DbRoleClaimStatus `json:"status,omitempty"` }
DbRoleClaim is the Schema for the dbroleclaims API
func (*DbRoleClaim) DeepCopy ¶
func (in *DbRoleClaim) DeepCopy() *DbRoleClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DbRoleClaim.
func (*DbRoleClaim) DeepCopyInto ¶
func (in *DbRoleClaim) DeepCopyInto(out *DbRoleClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DbRoleClaim) DeepCopyObject ¶
func (in *DbRoleClaim) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DbRoleClaimList ¶
type DbRoleClaimList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []DbRoleClaim `json:"items"` }
DbRoleClaimList contains a list of DbRoleClaim
func (*DbRoleClaimList) DeepCopy ¶
func (in *DbRoleClaimList) DeepCopy() *DbRoleClaimList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DbRoleClaimList.
func (*DbRoleClaimList) DeepCopyInto ¶
func (in *DbRoleClaimList) DeepCopyInto(out *DbRoleClaimList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*DbRoleClaimList) DeepCopyObject ¶
func (in *DbRoleClaimList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type DbRoleClaimSpec ¶
type DbRoleClaimSpec struct { // Class is used to run multiple instances of dbcontroller. // +optional // +kubebuilder:default:="default" Class *string `json:"class"` SourceDatabaseClaim *SourceDatabaseClaim `json:"sourceDatabaseClaim"` // The name of the secret to use for storing the ConnectionInfo. Must follow a naming convention that ensures it is unique. SecretName string `json:"secretName,omitempty"` SchemaRoleMap map[string]RoleType `json:"schemarolemap,omitempty"` }
DbRoleClaimSpec defines the desired state of DbRoleClaim
func (*DbRoleClaimSpec) DeepCopy ¶
func (in *DbRoleClaimSpec) DeepCopy() *DbRoleClaimSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DbRoleClaimSpec.
func (*DbRoleClaimSpec) DeepCopyInto ¶
func (in *DbRoleClaimSpec) DeepCopyInto(out *DbRoleClaimSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DbRoleClaimStatus ¶
type DbRoleClaimStatus struct { // Any errors related to provisioning this claim. Error string `json:"error,omitempty"` // Identifies the databaseclaim this CR is associated with MatchedSourceClaim string `json:"matchedSourceClaim,omitempty"` // Identifies the source secret this claim in inheriting from SourceSecret string `json:"sourceSecret,omitempty"` // Tracks the resourceVersion of the source secret. Used to identify changes to the secret and to trigger a sync SourceSecretResourceVersion string `json:"sourceSecretResourceVersion,omitempty"` // Time the secret attached to this claim was updated SecretUpdatedAt *metav1.Time `json:"secretUpdatedAt,omitempty"` SchemaRoleStatus SchemaRoleStatus `json:"schemasstatus,omitempty"` // Time the schemas and roles were updated SchemasRolesUpdatedAt *metav1.Time `json:"schemasrolesupdatedat,omitempty"` Username string `json:"username"` // +patchMergeKey=type // +patchStrategy=merge // +listType=map // +listMapKey=type Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` }
DbRoleClaimStatus defines the observed state of DbRoleClaim
func (*DbRoleClaimStatus) DeepCopy ¶
func (in *DbRoleClaimStatus) DeepCopy() *DbRoleClaimStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DbRoleClaimStatus.
func (*DbRoleClaimStatus) DeepCopyInto ¶
func (in *DbRoleClaimStatus) DeepCopyInto(out *DbRoleClaimStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeletionPolicy ¶ added in v1.0.2
type DeletionPolicy string
const ( // Delete the database instance when the resource is deleted. DeleteDeletionPolicy DeletionPolicy = "Delete" // Retain the database instance when the resource is deleted. OrphanDeletionPolicy DeletionPolicy = "Orphan" )
type SQLEngine ¶
type SQLEngine string
const (
PostgresqlEngine SQLEngine = "postgres"
)
SQL database engines.
type SchemaRoleStatus ¶ added in v1.0.6
type SchemaRoleStatus struct { SchemaStatus map[string]string `json:"schemastatus,omitempty"` RoleStatus map[string]string `json:"rolestatus,omitempty"` }
func (*SchemaRoleStatus) DeepCopy ¶ added in v1.0.6
func (in *SchemaRoleStatus) DeepCopy() *SchemaRoleStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SchemaRoleStatus.
func (*SchemaRoleStatus) DeepCopyInto ¶ added in v1.0.6
func (in *SchemaRoleStatus) DeepCopyInto(out *SchemaRoleStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretRef ¶
SecretRef provides the information necessary to reference a Kubernetes Secret
func (*SecretRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretRef.
func (*SecretRef) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SourceDataFrom ¶
type SourceDataFrom struct { // Type specifies the type of source // +required Type SourceDataType `json:"type"` // Database defines the connection information to an existing db // +optional Database *Database `json:"database,omitempty"` }
SourceDataFrom is a union object for specifying the initial state of a DB that should be used when provisioning a DatabaseClaim
func (*SourceDataFrom) DeepCopy ¶
func (in *SourceDataFrom) DeepCopy() *SourceDataFrom
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceDataFrom.
func (*SourceDataFrom) DeepCopyInto ¶
func (in *SourceDataFrom) DeepCopyInto(out *SourceDataFrom)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SourceDataType ¶
type SourceDataType string
type SourceDatabaseClaim ¶
type SourceDatabaseClaim struct { // Namespace of the source databaseclaim // +kubebuilder:default:="default" Namespace string `json:"namespace"` // Name of the source databaseclaim Name string `json:"name"` }
SourceDatabaseClaim defines the DatabaseClaim which owns the actual database
func (*SourceDatabaseClaim) DeepCopy ¶
func (in *SourceDatabaseClaim) DeepCopy() *SourceDatabaseClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceDatabaseClaim.
func (*SourceDatabaseClaim) DeepCopyInto ¶
func (in *SourceDatabaseClaim) DeepCopyInto(out *SourceDatabaseClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Status ¶
type Status struct { // Time the database was created DbCreatedAt *metav1.Time `json:"dbCreateAt,omitempty"` // The optional Connection information to the database. ConnectionInfo *DatabaseClaimConnectionInfo `json:"connectionInfo,omitempty"` // Version of the provisioned Database DBVersion string `json:"dbversion,omitempty"` // The optional Shape values are arbitrary and help drive instance selection Shape string `json:"shape,omitempty"` // The optional MinStorageGB value requests the minimum database host storage capacity in GBytes MinStorageGB int `json:"minStorageGB,omitempty"` // If provided, marks auto storage scalling to true for postgres DBinstance. The value represents the maximum allowed storage to scale upto. // For auroraDB instance, this value is ignored. MaxStorageGB int64 `json:"maxStorageGB,omitempty"` // Specifies the type of database to provision. Only postgres is supported. Type DatabaseType `json:"type,omitempty"` // Time the connection info was updated/created. ConnectionInfoUpdatedAt *metav1.Time `json:"connectionUpdatedAt,omitempty"` // Time the user/password was updated/created UserUpdatedAt *metav1.Time `json:"userUpdatedAt,omitempty"` // DbState of the DB. inprogress, "", ready DbState DbState `json:"DbState,omitempty"` // SourceDataFrom specifies an existing database or backup to use when initially provisioning the database. // if the dbclaim has already provisioned a database, this field is ignored // This field used when claim is use-existing-db and attempting to migrate to newdb // +optional SourceDataFrom *SourceDataFrom `json:"sourceDataFrom,omitempty"` }
func (*Status) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*Status) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StatusForOldDB ¶ added in v1.0.1
type StatusForOldDB struct { // Time the connection info was updated/created. ConnectionInfo *DatabaseClaimConnectionInfo `json:"connectionInfo,omitempty"` // Version of the provisioned Database DBVersion string `json:"dbversion,omitempty"` // The optional Shape values are arbitrary and help drive instance selection Shape string `json:"shape,omitempty"` // Specifies the type of database to provision. Only postgres is supported. Type DatabaseType `json:"type,omitempty"` // Time at the process of post migration actions initiated PostMigrationActionStartedAt *metav1.Time `json:"postMigrationActionStartedAt,omitempty"` // DbState of the DB. inprogress, "", ready DbState DbState `json:"DbState,omitempty"` // The optional MinStorageGB value requests the minimum database host storage capacity in GBytes MinStorageGB int `json:"minStorageGB,omitempty"` }
func (*StatusForOldDB) DeepCopy ¶ added in v1.0.1
func (in *StatusForOldDB) DeepCopy() *StatusForOldDB
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatusForOldDB.
func (*StatusForOldDB) DeepCopyInto ¶ added in v1.0.1
func (in *StatusForOldDB) DeepCopyInto(out *StatusForOldDB)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.