Skip to content

Commit 8c842ec

Browse files
author
drivebyer
committed
feat: add optional field to generate log/data pvc
1 parent 79bb58f commit 8c842ec

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

api/v1/mongodbcommunity_types.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ type MongoDBCommunitySpec struct {
132132
// MemberConfig
133133
// +optional
134134
MemberConfig []automationconfig.MemberOptions `json:"memberConfig,omitempty"`
135+
136+
// +optional
137+
CombineDataAndLogsVolumes bool `json:"combineDataAndLogsVolumes,omitempty"`
135138
}
136139

137140
// MapWrapper is a wrapper for a map to be used by other structs.
@@ -1152,7 +1155,7 @@ func (m *MongoDBCommunity) getLastVersion() string {
11521155
}
11531156

11541157
func (m *MongoDBCommunity) HasSeparateDataAndLogsVolumes() bool {
1155-
return true
1158+
return !m.Spec.CombineDataAndLogsVolumes
11561159
}
11571160

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

config/crd/bases/mongodbcommunity.mongodb.com_mongodbcommunity.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ spec:
183183
required:
184184
- processes
185185
type: object
186+
combineDataAndLogsVolumes:
187+
type: boolean
186188
featureCompatibilityVersion:
187189
description: FeatureCompatibilityVersion configures the feature compatibility
188190
version that will be set for the deployment

0 commit comments

Comments
 (0)