Skip to content

Commit bf6ca90

Browse files
committed
Automatically set an exact maxLength on enum fields in CRDs
This automates what a CRD author would do anytime they add or change an enum field.
1 parent a2c529b commit bf6ca90

13 files changed

+67
-97
lines changed

config/crd/bases/postgres-operator.crunchydata.com_crunchybridgeclusters.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ spec:
9090
- aws
9191
- azure
9292
- gcp
93-
maxLength: 10
93+
maxLength: 5
9494
type: string
9595
x-kubernetes-validations:
9696
- message: immutable
@@ -199,6 +199,7 @@ spec:
199199
- "True"
200200
- "False"
201201
- Unknown
202+
maxLength: 7
202203
type: string
203204
type:
204205
description: type of condition in CamelCase or in foo.example.com/CamelCase.

config/crd/bases/postgres-operator.crunchydata.com_pgadmins.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ spec:
16101610
- Always
16111611
- Never
16121612
- IfNotPresent
1613-
maxLength: 15
1613+
maxLength: 12
16141614
type: string
16151615
imagePullSecrets:
16161616
description: |-
@@ -2579,7 +2579,7 @@ spec:
25792579
enum:
25802580
- Administrator
25812581
- User
2582-
maxLength: 15
2582+
maxLength: 13
25832583
type: string
25842584
username:
25852585
description: |-
@@ -2694,6 +2694,7 @@ spec:
26942694
- "True"
26952695
- "False"
26962696
- Unknown
2697+
maxLength: 7
26972698
type: string
26982699
type:
26992700
description: type of condition in CamelCase or in foo.example.com/CamelCase.

config/crd/bases/postgres-operator.crunchydata.com_pgupgrades.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ spec:
971971
- Always
972972
- Never
973973
- IfNotPresent
974-
maxLength: 15
974+
maxLength: 12
975975
type: string
976976
imagePullSecrets:
977977
description: |-
@@ -1133,7 +1133,7 @@ spec:
11331133
- Copy
11341134
- CopyFileRange
11351135
- Link
1136-
maxLength: 15
1136+
maxLength: 13
11371137
type: string
11381138
required:
11391139
- fromPostgresVersion
@@ -1195,6 +1195,7 @@ spec:
11951195
- "True"
11961196
- "False"
11971197
- Unknown
1198+
maxLength: 7
11981199
type: string
11991200
type:
12001201
description: type of condition in CamelCase or in foo.example.com/CamelCase.

0 commit comments

Comments
 (0)