File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed
pkg/apis/postgres-operator.crunchydata.com/v1beta1 Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -546,11 +546,10 @@ type AdditionalVolume struct {
546
546
// Volumes are mounted in the pods at `volumes/<NAME>`
547
547
// Must be unique.
548
548
// ---
549
- // The `Name` field is a `DNS1123Subdomain` type to enforce
550
- // the max length and also allow us to more easily transition
551
- // to CPK-provisioned volumes.
549
+ // The `Name` field is a `DNS1123Label` type to enforce
550
+ // the max length.
552
551
// +required
553
- Name DNS1123Subdomain `json:"name"`
552
+ Name DNS1123Label `json:"name"`
554
553
555
554
// A reference to a preexisting PVC.
556
555
// ---
Original file line number Diff line number Diff line change @@ -32,6 +32,16 @@ type ConfigDataKey = string
32
32
// +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?([.][a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`
33
33
type DNS1123Subdomain = string
34
34
35
+ // ---
36
+ // https://pkg.go.dev/k8s.io/apimachinery/pkg/util/validation#IsDNS1123Label
37
+ // https://pkg.go.dev/k8s.io/apiserver/pkg/cel/library#Format
38
+ //
39
+ // +kubebuilder:validation:MinLength=1
40
+ // Max length is less than max 63 to allow prepending `volumes-` to name
41
+ // +kubebuilder:validation:MaxLength=55
42
+ // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
43
+ type DNS1123Label = string
44
+
35
45
// ---
36
46
// Duration represents a string accepted by the Kubernetes API in the "duration"
37
47
// [format]. This format extends the "duration" [defined by OpenAPI] by allowing
You can’t perform that action at this time.
0 commit comments