Skip to content

Commit fe110a3

Browse files
committed
feat: add optional field to generate log/data pvc
Signed-off-by: drivebyer <[email protected]>
1 parent 79bb58f commit fe110a3

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: api/v1/mongodbcommunity_types.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@ type MongoDBCommunitySpec struct {
132132
// MemberConfig
133133
// +optional
134134
MemberConfig []automationconfig.MemberOptions `json:"memberConfig,omitempty"`
135+
136+
// +optional
137+
// +kubebuilder:default:=true
138+
SeparateDataAndLogsVolumes bool `json:"separateDataAndLogsVolumes,omitempty"`
135139
}
136140

137141
// MapWrapper is a wrapper for a map to be used by other structs.
@@ -1152,7 +1156,7 @@ func (m *MongoDBCommunity) getLastVersion() string {
11521156
}
11531157

11541158
func (m *MongoDBCommunity) HasSeparateDataAndLogsVolumes() bool {
1155-
return true
1159+
return m.Spec.SeparateDataAndLogsVolumes
11561160
}
11571161

11581162
func (m *MongoDBCommunity) GetAnnotations() map[string]string {

Diff for: config/crd/bases/mongodbcommunity.mongodb.com_mongodbcommunity.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,9 @@ spec:
453453
- enabled
454454
type: object
455455
type: object
456+
separateDataAndLogsVolumes:
457+
default: true
458+
type: boolean
456459
statefulSet:
457460
description: StatefulSetConfiguration holds the optional custom StatefulSet
458461
that should be merged into the operator created one.

0 commit comments

Comments
 (0)