1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package v1alpha1
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type Postgres struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec PostgresSpec `json:"spec,omitempty"`
Status PostgresStatus `json:"status,omitempty"`
}
type PostgresList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Postgres `json:"items"`
}
type PostgresSpec struct {
Version string `json:"version,omitempty"`
DataDir string `json:"dataDir,omitempty"`
Databases []string `json:"databases,omitempty"`
Settings []string `json:"settings,omitempty"`
DeleteData bool `json:"deleteData,omitempty"`
}
type PostgresPhase string
const (
PostgresPhasePending PostgresPhase = "Pending"
PostgresPhaseStarting PostgresPhase = "Starting"
PostgresPhaseReady PostgresPhase = "Ready"
PostgresPhaseFailed PostgresPhase = "Failed"
PostgresPhaseDeleting PostgresPhase = "Deleting"
)
type PostgresStatus struct {
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
Phase PostgresPhase `json:"phase,omitempty"`
Message string `json:"message,omitempty"`
Version string `json:"version,omitempty"`
DataDir string `json:"dataDir,omitempty"`
SocketDir string `json:"socketDir,omitempty"`
User string `json:"user,omitempty"`
DSN string `json:"dsn,omitempty"`
HostProcess string `json:"hostProcess,omitempty"`
Runtime *HostProcessRuntime `json:"runtime,omitempty"`
ReadyAt string `json:"readyAt,omitempty"`
Conditions []metav1.Condition `json:"conditions,omitempty"`
}