Skip to content

Commit 5eaa61d

Browse files
author
CloudNativePG Automated Updates
committed
chore: sync API
1 parent 963520b commit 5eaa61d

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

pkg/api/v1/database_types.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ type DatabaseSpec struct {
4040
// The corresponding cluster
4141
ClusterRef corev1.LocalObjectReference `json:"cluster"`
4242

43+
// Ensure the PostgreSQL database is `present` or `absent` - defaults to "present"
44+
// +kubebuilder:default:="present"
45+
// +kubebuilder:validation:Enum=present;absent
46+
// +optional
47+
Ensure EnsureOption `json:"ensure,omitempty"`
48+
4349
// The name inside PostgreSQL
4450
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="name is immutable"
4551
// +kubebuilder:validation:XValidation:rule="self != 'postgres'",message="the name postgres is reserved"
@@ -131,13 +137,13 @@ type DatabaseStatus struct {
131137
// +optional
132138
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
133139

134-
// Ready is true if the database was reconciled correctly
140+
// Applied is true if the database was reconciled correctly
135141
// +optional
136-
Ready bool `json:"ready,omitempty"`
142+
Applied *bool `json:"applied,omitempty"`
137143

138-
// Error is the reconciliation error message
144+
// Message is the reconciliation output message
139145
// +optional
140-
Error string `json:"error,omitempty"`
146+
Message string `json:"message,omitempty"`
141147
}
142148

143149
// +genclient
@@ -147,8 +153,8 @@ type DatabaseStatus struct {
147153
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
148154
// +kubebuilder:printcolumn:name="Cluster",type="string",JSONPath=".spec.cluster.name"
149155
// +kubebuilder:printcolumn:name="PG Name",type="string",JSONPath=".spec.name"
150-
// +kubebuilder:printcolumn:name="Ready",type="boolean",JSONPath=".status.ready"
151-
// +kubebuilder:printcolumn:name="Error",type="string",JSONPath=".status.error",description="Latest error message"
156+
// +kubebuilder:printcolumn:name="Applied",type="boolean",JSONPath=".status.applied"
157+
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.message",description="Latest reconciliation message"
152158

153159
// Database is the Schema for the databases API
154160
type Database struct {

pkg/api/v1/zz_generated.deepcopy.go

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)