Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/add operational status to migrated rds nstances #192

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions api/v1/databaseclaim_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ type DatabaseClaimStatus struct {
//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 Status `json:"oldDB,omitempty"`
}

type Status struct {
Expand Down Expand Up @@ -258,16 +260,20 @@ type Status struct {
// This field used when claim is use-existing-db and attempting to migrate to newdb
// +optional
SourceDataFrom *SourceDataFrom `json:"sourceDataFrom,omitempty"`

// Time at the process of post migration actions initiated
PostMigrationActionStartedAt *metav1.Time `json:"postMigrationActionStartedAt,omitempty"`
}

// DbState keeps track of state of the DB.
type DbState string

const (
Ready DbState = "ready"
InProgress DbState = "in-progress"
UsingExistingDB DbState = "using-existing-db"
UsingSharedHost DbState = "using-shared-host"
Ready DbState = "ready"
InProgress DbState = "in-progress"
UsingExistingDB DbState = "using-existing-db"
UsingSharedHost DbState = "using-shared-host"
PostMigrationInProgress DbState = "post-migration-in-progress"
)

type DatabaseClaimConnectionInfo struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,39 @@ spec:
status:
description: DatabaseClaimStatus defines the observed state of DatabaseClaim
properties:
oldDB:
description: track the status of the old db which is migrated and non operational
properties:
DbState:
description: DbState of the DB. inprogress, "", ready
type: string
connectionInfo:
properties:
databaseName:
type: string
hostName:
type: string
password:
type: string
port:
type: string
sslMode:
type: string
userName:
type: string
type: object
type:
description: Specifies the type of database to provision. Only
postgres is supported.
type: string
postMigrationActionStartedAt:
description: Time the process of post migration actions have started
format: date-time
type: string
dbversion:
description: Version of the provisioned Database
type: string
type: object
activeDB:
description: track the status of the active db being used by the application
properties:
Expand Down
Loading
Loading