Skip to content

Commit

Permalink
feat: add optional field to generate log/data pvc
Browse files Browse the repository at this point in the history
Signed-off-by: drivebyer <[email protected]>
  • Loading branch information
drivebyer committed Jan 18, 2024
1 parent 79bb58f commit fe110a3
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 @@ -132,6 +132,10 @@ type MongoDBCommunitySpec struct {
// MemberConfig
// +optional
MemberConfig []automationconfig.MemberOptions `json:"memberConfig,omitempty"`

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

// MapWrapper is a wrapper for a map to be used by other structs.
Expand Down Expand Up @@ -1152,7 +1156,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 @@ -453,6 +453,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 fe110a3

Please sign in to comment.