Skip to content

Commit dc7e034

Browse files
committed
Add optional field to generate log/data pvc
1 parent 7460db3 commit dc7e034

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

api/v1/mongodbcommunity_types.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ type MongoDBCommunitySpec struct {
119119
// Prometheus configurations.
120120
// +optional
121121
Prometheus *Prometheus `json:"prometheus,omitempty"`
122+
123+
// +optional
124+
// +kubebuilder:default:=true
125+
SeparateDataAndLogsVolumes bool `json:"separateDataAndLogsVolumes,omitempty"`
122126
}
123127

124128
// ReplicaSetHorizonConfiguration holds the split horizon DNS settings for
@@ -933,7 +937,7 @@ func (m *MongoDBCommunity) getLastVersion() string {
933937
}
934938

935939
func (m *MongoDBCommunity) HasSeparateDataAndLogsVolumes() bool {
936-
return true
940+
return m.Spec.SeparateDataAndLogsVolumes
937941
}
938942

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

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

+3
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,9 @@ spec:
327327
- enabled
328328
type: object
329329
type: object
330+
separateDataAndLogsVolumes:
331+
default: true
332+
type: boolean
330333
statefulSet:
331334
description: StatefulSetConfiguration holds the optional custom StatefulSet
332335
that should be merged into the operator created one.

0 commit comments

Comments
 (0)