@@ -54,7 +54,7 @@ type PostgresSpec struct {
54
54
AllowedSourceRanges []string `json:"allowedSourceRanges"`
55
55
56
56
NumberOfInstances int32 `json:"numberOfInstances"`
57
- Users map [string ]UserFlags `json:"users"`
57
+ Users map [string ]UserFlags `json:"users,omitempty "`
58
58
MaintenanceWindows []MaintenanceWindow `json:"maintenanceWindows,omitempty"`
59
59
Clone * CloneDescription `json:"clone,omitempty"`
60
60
ClusterName string `json:"-"`
@@ -113,22 +113,22 @@ type MaintenanceWindow struct {
113
113
// Volume describes a single volume in the manifest.
114
114
type Volume struct {
115
115
Size string `json:"size"`
116
- StorageClass string `json:"storageClass"`
116
+ StorageClass string `json:"storageClass,omitempty "`
117
117
SubPath string `json:"subPath,omitempty"`
118
118
}
119
119
120
120
type AdditionalVolume struct {
121
121
Name string `json:"name"`
122
122
MountPath string `json:"mountPath"`
123
- SubPath string `json:"subPath"`
123
+ SubPath string `json:"subPath,omitempty "`
124
124
TargetContainers []string `json:"targetContainers"`
125
125
VolumeSource v1.VolumeSource `json:"volumeSource"`
126
126
}
127
127
128
128
// PostgresqlParam describes PostgreSQL version and pairs of configuration parameter name - values.
129
129
type PostgresqlParam struct {
130
130
PgVersion string `json:"version"`
131
- Parameters map [string ]string `json:"parameters"`
131
+ Parameters map [string ]string `json:"parameters,omitempty "`
132
132
}
133
133
134
134
// ResourceDescription describes CPU and memory resources defined for a cluster.
@@ -145,15 +145,15 @@ type Resources struct {
145
145
146
146
// Patroni contains Patroni-specific configuration
147
147
type Patroni struct {
148
- InitDB map [string ]string `json:"initdb"`
149
- PgHba []string `json:"pg_hba"`
150
- TTL uint32 `json:"ttl"`
151
- LoopWait uint32 `json:"loop_wait"`
152
- RetryTimeout uint32 `json:"retry_timeout"`
153
- MaximumLagOnFailover float32 `json:"maximum_lag_on_failover"` // float32 because https://github.com/kubernetes/kubernetes/issues/30213
154
- Slots map [string ]map [string ]string `json:"slots"`
155
- SynchronousMode bool `json:"synchronous_mode"`
156
- SynchronousModeStrict bool `json:"synchronous_mode_strict"`
148
+ InitDB map [string ]string `json:"initdb,omitempty "`
149
+ PgHba []string `json:"pg_hba,omitempty "`
150
+ TTL uint32 `json:"ttl,omitempty "`
151
+ LoopWait uint32 `json:"loop_wait,omitempty "`
152
+ RetryTimeout uint32 `json:"retry_timeout,omitempty "`
153
+ MaximumLagOnFailover float32 `json:"maximum_lag_on_failover,omitempty "` // float32 because https://github.com/kubernetes/kubernetes/issues/30213
154
+ Slots map [string ]map [string ]string `json:"slots,omitempty "`
155
+ SynchronousMode bool `json:"synchronous_mode,omitempty "`
156
+ SynchronousModeStrict bool `json:"synchronous_mode_strict,omitempty "`
157
157
}
158
158
159
159
//StandbyCluster
0 commit comments