-
Notifications
You must be signed in to change notification settings - Fork 19
added mongodb migration fields #1656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
6275cae
02a50bb
c60a637
8c15cdc
171c261
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| /* | ||
| Copyright AppsCode Inc. and Contributors | ||
|
|
||
| Licensed under the Apache License, Version 2.0 (the "License"); | ||
| you may not use this file except in compliance with the License. | ||
| You may obtain a copy of the License at | ||
|
|
||
| http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| Unless required by applicable law or agreed to in writing, software | ||
| distributed under the License is distributed on an "AS IS" BASIS, | ||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| See the License for the specific language governing permissions and | ||
| limitations under the License. | ||
| */ | ||
|
|
||
| package v1alpha1 | ||
|
|
||
| type MongoSource struct { | ||
| ConnectionInfo ConnectionInfo `yaml:"connectionInfo" json:"connectionInfo"` | ||
| Mongoshake *Mongoshake `yaml:"mongoshake" json:"mongoshake,omitempty"` | ||
| } | ||
| type MongoTarget struct { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Look at the above field, we need to add the same field in below: |
||
| ConnectionInfo ConnectionInfo `yaml:"connectionInfo" json:"connectionInfo"` | ||
| } | ||
| type Mongoshake struct { | ||
| // SyncMode: full, incr, or fullSync | ||
| SyncMode string `yaml:"syncMode" json:"syncMode,omitempty" config:"sync_mode"` | ||
|
|
||
| MongoSslRootCaFile string `yaml:"mongoSslRootCaFile" json:"mongoSslRootCaFile,omitempty" config:"mongo_ssl_root_ca_file"` | ||
| MongoSslClientCaFile string `yaml:"mongoSslClientCaFile" json:"mongoSslClientCaFile,omitempty" config:"mongo_ssl_root_ca_file"` | ||
|
|
||
|
|
||
| FilterOpTypes []string `yaml:"filterOpTypes" json:"filterOpTypes,omitempty" config:"filter.op_types"` | ||
| FilterNamespaceBlack []string `yaml:"filterNamespaceBlack" json:"filterNamespaceBlack,omitempty" config:"filter.namespace.black"` | ||
| FilterNamespaceWhite []string `yaml:"filterNamespaceWhite" json:"filterNamespaceWhite,omitempty" config:"filter.namespace.white"` | ||
| FilterPassSpecialDb []string `yaml:"filterPassSpecialDb" json:"filterPassSpecialDb,omitempty" config:"filter.pass.special.db"` | ||
|
|
||
| // ---------------- BOOLS → POINTERS ---------------- | ||
| FilterDDLEnable *bool `yaml:"filterDdlEnable" json:"filterDdlEnable,omitempty" config:"filter.ddl_enable"` | ||
| FilterOplogGids *bool `yaml:"filterOplogGids" json:"filterOplogGids,omitempty" config:"filter.oplog.gids"` | ||
|
|
||
| CheckpointStartPosition int64 `yaml:"checkpointStartPosition" json:"checkpointStartPosition,omitempty" config:"checkpoint.start_position" type:"date"` | ||
|
|
||
|
|
||
| TransformNamespace []string `yaml:"transformNamespace" json:"transformNamespace,omitempty" config:"transform.namespace"` | ||
|
|
||
| FullSyncReaderCollectionParallel int `yaml:"fullSyncReaderCollectionParallel" json:"fullSyncReaderCollectionParallel,omitempty" config:"full_sync.reader.collection_parallel"` | ||
| FullSyncReaderWriteDocumentParallel int `yaml:"fullSyncReaderWriteDocumentParallel" json:"fullSyncReaderWriteDocumentParallel,omitempty" config:"full_sync.reader.write_document_parallel"` | ||
| FullSyncReaderDocumentBatchSize int `yaml:"fullSyncReaderDocumentBatchSize" json:"fullSyncReaderDocumentBatchSize,omitempty" config:"full_sync.reader.document_batch_size"` | ||
| FullSyncReaderFetchBatchSize int `yaml:"fullSyncReaderFetchBatchSize" json:"fullSyncReaderFetchBatchSize,omitempty" config:"full_sync.reader.fetch_batch_size"` | ||
| FullSyncReaderParallelThread int `yaml:"fullSyncReaderParallelThread" json:"fullSyncReaderParallelThread,omitempty" config:"full_sync.reader.parallel_thread"` | ||
|
|
||
| FullSyncReaderParallelIndex string `yaml:"fullSyncReaderParallelIndex" json:"fullSyncReaderParallelIndex,omitempty" config:"full_sync.reader.parallel_index"` | ||
| FullSyncReaderSplitMaxChunkSize int `yaml:"fullSyncReaderSplitMaxChunkSize" json:"fullSyncReaderSplitMaxChunkSize,omitempty" config:"full_sync.reader.split_max_chunk_size"` | ||
|
|
||
| // ---------------- BOOLS → POINTERS ---------------- | ||
| FullSyncCollectionDrop *bool `yaml:"fullSyncCollectionDrop" json:"fullSyncCollectionDrop,omitempty" config:"full_sync.collection_exist_drop"` | ||
| FullSyncReaderOplogStoreDisk *bool `yaml:"fullSyncReaderOplogStoreDisk" json:"fullSyncReaderOplogStoreDisk,omitempty" config:"full_sync.reader.oplog_store_disk"` | ||
| FullSyncExecutorInsertOnDupUpdate *bool `yaml:"fullSyncExecutorInsertOnDupUpdate" json:"fullSyncExecutorInsertOnDupUpdate,omitempty" config:"full_sync.executor.insert_on_dup_update"` | ||
| FullSyncExecutorFilterOrphanDocument *bool `yaml:"fullSyncExecutorFilterOrphanDocument" json:"fullSyncExecutorFilterOrphanDocument,omitempty" config:"full_sync.executor.filter.orphan_document"` | ||
| FullSyncExecutorMajorityEnable *bool `yaml:"fullSyncExecutorMajorityEnable" json:"fullSyncExecutorMajorityEnable,omitempty" config:"full_sync.executor.majority_enable"` | ||
| FullSyncDoNotShardDest *bool `yaml:"fullSyncDoNotShardDest" json:"fullSyncDoNotShardDest,omitempty" config:"full_sync.do_not_shard_destination"` | ||
|
|
||
| FullSyncCreateIndex string `yaml:"fullSyncCreateIndex" json:"fullSyncCreateIndex,omitempty" config:"full_sync.create_index"` | ||
| FullSyncReaderOplogStoreDiskMaxSize int64 `yaml:"fullSyncReaderOplogStoreDiskMaxSize" json:"fullSyncReaderOplogStoreDiskMaxSize,omitempty" config:"full_sync.reader.oplog_store_disk_max_size"` | ||
|
|
||
| IncrSyncReaderFetchBatchSize int `yaml:"incrSyncReaderFetchBatchSize" json:"incrSyncReaderFetchBatchSize,omitempty" config:"incr_sync.reader.fetch_batch_size"` | ||
| IncrSyncWorker int `yaml:"incrSyncWorker" json:"incrSyncWorker,omitempty" config:"incr_sync.worker"` | ||
| IncrSyncTunnelWriteThread int `yaml:"incrSyncTunnelWriteThread" json:"incrSyncTunnelWriteThread,omitempty" config:"incr_sync.tunnel.write_thread"` | ||
|
|
||
| // +optional | ||
| ExtraConfiguration map[string]string `yaml:"extraConfiguration" json:"extraConfiguration,omitempty"` | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/kubedb/apimachinery/blob/master/apis/migrator/v1alpha1/helpers.go#L33
https://github.com/kubedb/apimachinery/blob/master/apis/migrator/v1alpha1/helpers.go#L41
Check these lines, add similar for MongoDB.