Skip to content

Commit 83d3dbe

Browse files
committed
Add access modes to storage
1 parent 8b63e47 commit 83d3dbe

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

api/v1alpha1/common_types.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ type StorageSpec struct {
6969
// +kubebuilder:validation:MinLength=1
7070
// +kubebuilder:validation:MaxLength=63
7171
Class string `json:"class,omitempty"`
72+
73+
// AccessModes contains the desired access modes the volume should have.
74+
// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
75+
// +optional
76+
AccessModes []corev1.PersistentVolumeAccessMode `json:"accessModes,omitempty"`
7277
}
7378

7479
// ContainerConfig defines generic container configuration.

api/v1alpha1/shard_types.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import (
3636
// +kubebuilder:rbac:groups=apps,resources=deployments;statefulsets,verbs=get;list;watch;create;update;patch;delete
3737
// +kubebuilder:rbac:groups="",resources=services,verbs=get;list;watch;create;update;patch;delete
3838
// +kubebuilder:rbac:groups="",resources=persistentvolumeclaims,verbs=get;list;watch;create;update;patch;delete
39+
// +kubebuilder:rbac:groups="",resources=configmaps,verbs=get;list;watch;create;update;patch;delete
3940

4041
// ============================================================================
4142
// Shard Component Specs (Reusable)
@@ -77,13 +78,10 @@ type PoolSpec struct {
7778
// +optional
7879
Storage StorageSpec `json:"storage,omitempty"`
7980

80-
// BackupStorageType defines how backup storage is provided.
81-
// Valid values are "hostPath" (for single-node testing) and "pvc" (for production).
82-
// Defaults to "hostPath".
81+
// BackupStorage defines the storage configuration for backup volumes.
82+
// Shared across all pods in a pool. Defaults to same as Storage if not specified.
8383
// +optional
84-
// +kubebuilder:validation:Enum=hostPath;pvc
85-
// +kubebuilder:default="hostPath"
86-
BackupStorageType string `json:"backupStorageType,omitempty"`
84+
BackupStorage StorageSpec `json:"backupStorage,omitempty"`
8785

8886
// Postgres container configuration.
8987
// +optional

api/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)