Skip to content

Commit 3ad136e

Browse files
committed
Additional volumes is a shared struct
1 parent 34678e9 commit 3ad136e

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

pkg/apis/postgres-operator.crunchydata.com/v1beta1/shared_types.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,3 +256,35 @@ func (meta *Metadata) GetAnnotationsOrNil() map[string]string {
256256
}
257257
return meta.Annotations
258258
}
259+
260+
type AdditionalVolume struct {
261+
// A reference to a preexisting PVC.
262+
// ---
263+
// +required
264+
ClaimName DNS1123Subdomain `json:"claimName"`
265+
266+
// The containers to attach this volume to.
267+
// An omitted `Containers` field matches all containers.
268+
// An empty `Containers` field matches no containers.
269+
// ---
270+
// +optional
271+
// +listType=atomic
272+
// +kubebuilder:validation:MaxItems=10
273+
Containers []string `json:"containers,omitempty"`
274+
275+
// The name of the volume used for mounting path.
276+
// Volumes are mounted in the pods at `volumes/<NAME>`
277+
// Must be unique.
278+
// ---
279+
// The `Name` field is a `DNS1123Label` type to enforce
280+
// the max length.
281+
// +required
282+
// Max length is less than max 63 to allow prepending `volumes-` to name
283+
// +kubebuilder:validation:MaxLength=55
284+
Name DNS1123Label `json:"name"`
285+
286+
// Sets the write/read mode of the volume
287+
// ---
288+
// +optional
289+
ReadOnly bool `json:"readOnly,omitempty"`
290+
}

0 commit comments

Comments
 (0)