|
@@ -25,19 +25,30 @@ import (
|
|
|
|
|
|
// PostgreSQLSpec defines the desired state of PostgreSQL
|
|
|
type PostgreSQLSpec struct {
|
|
|
- // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
|
|
|
- // Important: Run "make" to regenerate code after modifying this file
|
|
|
-
|
|
|
- // Foo is an example field of PostgreSQL. Edit postgresql_types.go to remove/update
|
|
|
- Foo string `json:"foo,omitempty"`
|
|
|
+ // Version of Postgres to deploy. [16.0]
|
|
|
+ Version string `json:"version"`
|
|
|
+ // Username for authentication
|
|
|
+ User string `json:"user"`
|
|
|
+ // Password for authentication
|
|
|
+ Password string `json:"password"`
|
|
|
+ // Autogenerated name for default DB
|
|
|
+ DB string `json:"database"`
|
|
|
}
|
|
|
|
|
|
// PostgreSQLStatus defines the observed state of PostgreSQL
|
|
|
type PostgreSQLStatus struct {
|
|
|
- // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
|
|
|
- // Important: Run "make" to regenerate code after modifying this file
|
|
|
+ Status Status `json:"status"`
|
|
|
}
|
|
|
|
|
|
+type Status string
|
|
|
+
|
|
|
+const (
|
|
|
+ Status_Pending Status = "pending"
|
|
|
+ Status_Initializing Status = "initializing"
|
|
|
+ Status_Running Status = "running"
|
|
|
+ Status_Error Status = "error"
|
|
|
+)
|
|
|
+
|
|
|
//+kubebuilder:object:root=true
|
|
|
//+kubebuilder:subresource:status
|
|
|
|