Skip to content

Commit 522ab6b

Browse files
bug:33822886
1 parent 74a2b94 commit 522ab6b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

apis/database/v1alpha1/pdb_webhook.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
** SOFTWARE.
3737
*/
3838

39+
/* MODIFIED (MM/DD/YY)
40+
** rcitton 07/14/22 - 33822886
41+
*/
42+
43+
3944
package v1alpha1
4045

4146
import (
@@ -157,6 +162,14 @@ func (r *PDB) validateAction(allErrs *field.ErrorList) {
157162
*allErrs = append(*allErrs,
158163
field.Required(field.NewPath("spec").Child("fileNameConversions"), "Please specify a value for fileNameConversions. Values can be a filename convert pattern or NONE"))
159164
}
165+
if r.Spec.TotalSize == "" {
166+
*allErrs = append(*allErrs,
167+
field.Required(field.NewPath("spec").Child("totalSize"), "When the storage is not UNLIMITED the Total Size must be specified"))
168+
}
169+
if r.Spec.TempSize == "" {
170+
*allErrs = append(*allErrs,
171+
field.Required(field.NewPath("spec").Child("tempSize"), "When the storage is not UNLIMITED the Temp Size must be specified"))
172+
}
160173
if *(r.Spec.TDEImport) {
161174
r.validateTDEInfo(allErrs)
162175
}
@@ -168,11 +181,11 @@ func (r *PDB) validateAction(allErrs *field.ErrorList) {
168181
}
169182
if r.Spec.TotalSize == "" {
170183
*allErrs = append(*allErrs,
171-
field.Required(field.NewPath("spec").Child("totalSize"), "Please specify size of the tablespace"))
184+
field.Required(field.NewPath("spec").Child("totalSize"), "When the storage is not UNLIMITED the Total Size must be specified"))
172185
}
173186
if r.Spec.TempSize == "" {
174187
*allErrs = append(*allErrs,
175-
field.Required(field.NewPath("spec").Child("tempSize"), "Please specify size of the temporary tablespace"))
188+
field.Required(field.NewPath("spec").Child("tempSize"), "When the storage is not UNLIMITED the Temp Size must be specified"))
176189
}
177190
case "PLUG":
178191
if r.Spec.XMLFileName == "" {

0 commit comments

Comments
 (0)