Skip to content

Commit

Permalink
Add optional field to generate log/data pvc
Browse files Browse the repository at this point in the history
  • Loading branch information
drivebyer committed Jul 4, 2023
1 parent 7460db3 commit dc7e034
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/v1/mongodbcommunity_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ type MongoDBCommunitySpec struct {
// Prometheus configurations.
// +optional
Prometheus *Prometheus `json:"prometheus,omitempty"`

// +optional
// +kubebuilder:default:=true
SeparateDataAndLogsVolumes bool `json:"separateDataAndLogsVolumes,omitempty"`
}

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

func (m *MongoDBCommunity) HasSeparateDataAndLogsVolumes() bool {
return true
return m.Spec.SeparateDataAndLogsVolumes
}

func (m *MongoDBCommunity) GetAnnotations() map[string]string {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,9 @@ spec:
- enabled
type: object
type: object
separateDataAndLogsVolumes:
default: true
type: boolean
statefulSet:
description: StatefulSetConfiguration holds the optional custom StatefulSet
that should be merged into the operator created one.
Expand Down

0 comments on commit dc7e034

Please sign in to comment.