Skip to content

Commit

Permalink
Add ReplicationModeDetector Image for MongoDB (#645)
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammad Fahim Abrar <fahimabrar@appscode.com>
  • Loading branch information
Mohammad Fahim Abrar committed Nov 11, 2020
1 parent df5ada3 commit 3128627
Show file tree
Hide file tree
Showing 12 changed files with 494 additions and 399 deletions.
694 changes: 370 additions & 324 deletions apis/catalog/v1alpha1/generated.pb.go

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions apis/catalog/v1alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions apis/catalog/v1alpha1/mongodb_version_types.go
Expand Up @@ -62,6 +62,8 @@ type MongoDBVersionSpec struct {
InitContainer MongoDBVersionInitContainer `json:"initContainer" protobuf:"bytes,6,opt,name=initContainer"`
// PSP names
PodSecurityPolicies MongoDBVersionPodSecurityPolicy `json:"podSecurityPolicies" protobuf:"bytes,7,opt,name=podSecurityPolicies"`
// ReplicationModeDetector Image
ReplicationModeDetector ReplicationModeDetector `json:"replicationModeDetector" protobuf:"bytes,8,opt,name=replicationModeDetector"`
}

// MongoDBVersionDatabase is the MongoDB Database image
Expand Down
7 changes: 1 addition & 6 deletions apis/catalog/v1alpha1/mysql_version_types.go
Expand Up @@ -56,7 +56,7 @@ type MySQLVersionSpec struct {
// Tools Image
Tools MySQLVersionTools `json:"tools" protobuf:"bytes,4,opt,name=tools"`
// ReplicationModeDetector Image
ReplicationModeDetector MySQLVersionReplicationModeDetector `json:"replicationModeDetector" protobuf:"bytes,5,opt,name=replicationModeDetector"`
ReplicationModeDetector ReplicationModeDetector `json:"replicationModeDetector" protobuf:"bytes,5,opt,name=replicationModeDetector"`
// Deprecated versions usable but regarded as obsolete and best avoided, typically due to having been superseded.
// +optional
Deprecated bool `json:"deprecated,omitempty" protobuf:"varint,6,opt,name=deprecated"`
Expand All @@ -78,11 +78,6 @@ type MySQLVersionExporter struct {
Image string `json:"image" protobuf:"bytes,1,opt,name=image"`
}

// MySQLVersionReplicationModeDetector is the image for the MySQL replication mode detector
type MySQLVersionReplicationModeDetector struct {
Image string `json:"image" protobuf:"bytes,1,opt,name=image"`
}

// MySQLVersionTools is the image for the MySQL tools
type MySQLVersionTools struct {
Image string `json:"image" protobuf:"bytes,1,opt,name=image"`
Expand Down
56 changes: 31 additions & 25 deletions apis/catalog/v1alpha1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions apis/catalog/v1alpha1/types.go
@@ -0,0 +1,22 @@
/*
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

// ReplicationModeDetector is the image for the MySQL replication mode detector
type ReplicationModeDetector struct {
Image string `json:"image" protobuf:"bytes,1,opt,name=image"`
}
33 changes: 17 additions & 16 deletions apis/catalog/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions apis/kubedb/v1alpha2/constants.go
Expand Up @@ -28,6 +28,10 @@ const (
LabelDatabaseName = kubedb.GroupName + "/name"
LabelRole = kubedb.GroupName + "/role"

ReplicationModeDetectorContainerName = "replication-mode-detector"
DatabasePodPrimary = "primary"
DatabasePodStandby = "standby"

ComponentDatabase = "database"
RoleStats = "stats"
DefaultStatsPath = "/metrics"
Expand Down Expand Up @@ -126,11 +130,6 @@ const (
MySQLRootPassword = "MYSQL_ROOT_PASSWORD"
MySQLName = "MYSQL_NAME"

MySQLContainerReplicationModeDetectorName = "replication-mode-detector"
MySQLPodPrimary = "primary"
MySQLPodStandby = "standby"
MySQLLabelRole = kubedb.GroupName + "/role"

MySQLTLSConfigCustom = "custom"
MySQLTLSConfigSkipVerify = "skip-verify"
MySQLTLSConfigTrue = "true"
Expand Down

0 comments on commit 3128627

Please sign in to comment.