From c74235a0da1582e7b98f1fa5b67301dcbd414162 Mon Sep 17 00:00:00 2001 From: 4adway Date: Wed, 20 Dec 2023 16:35:14 +0530 Subject: [PATCH 1/5] Added sample for mongo instance --- intent_types/mongo/v1alpha1/README.md | 20 +++++++++++++ intent_types/mongo/v1alpha1/intent_type.json | 5 ++++ intent_types/mongo/v1alpha1/sample.json | 31 ++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 intent_types/mongo/v1alpha1/README.md create mode 100644 intent_types/mongo/v1alpha1/intent_type.json create mode 100644 intent_types/mongo/v1alpha1/sample.json diff --git a/intent_types/mongo/v1alpha1/README.md b/intent_types/mongo/v1alpha1/README.md new file mode 100644 index 0000000..aa5774a --- /dev/null +++ b/intent_types/mongo/v1alpha1/README.md @@ -0,0 +1,20 @@ +# Mongo Intent Type + +## Overview + +This intent type is designed to represent a Mongo database configuration within an Infrastructure Catalog. It encapsulates the necessary information for provisioning and managing a Mongo database instance. + +## Fields + +- `metadata`: Contains auxiliary information such as the maintainer, documentation link, labels, name, and description. +- `kind`: Specifies the kind of the resource, in this case, `Mongo`. +- `spec`: Contains detailed information about the Mongo instance including the Mongo version and optional server variables. +- `disabled`: Indicates if the resource is disabled (`true`) or enabled (`false`) by default. +- `flavor`: Specifies the default implementation details, including the version and name. + +## Specification (TBD) + + +## Example + +See the `sample.json` file for an example instance of this intent type. \ No newline at end of file diff --git a/intent_types/mongo/v1alpha1/intent_type.json b/intent_types/mongo/v1alpha1/intent_type.json new file mode 100644 index 0000000..4f4bd26 --- /dev/null +++ b/intent_types/mongo/v1alpha1/intent_type.json @@ -0,0 +1,5 @@ +{ + "name": "Mongo", + "api_version": "v1alpha1", + "description": "An Intent Type for deploying and managing Mongo-DB, following Kubernetes style version naming." +} diff --git a/intent_types/mongo/v1alpha1/sample.json b/intent_types/mongo/v1alpha1/sample.json new file mode 100644 index 0000000..3ee8b4b --- /dev/null +++ b/intent_types/mongo/v1alpha1/sample.json @@ -0,0 +1,31 @@ +{ + "api_version": "v1alpha1", + "metadata": { + "maintainer": "rohit@example.com", + "documentation_link": "https://example.com/documentation", + "labels": { + "owner": "infrastructure@example.com" + }, + "name": "my-mongo-instance", + "description": "A Mongo instance." + }, + "kind": "mongo", + "spec": { + "version": "6.0.2", + "authenticated": true, + "size": { + "cpu": "2001m", + "memory": "900MiB", + "volume": "8G", + "instance_count": 3, + "cpu_reservation": "1000m", + "memory_reservation": "500MiB" + } + }, + "disabled": false, + "flavor": { + "version": "1.0", + "name": "standard" + }, + "advanced": {} +} From 61b983930f7242c73d20d41de4a6d8a204da7a07 Mon Sep 17 00:00:00 2001 From: 4adway Date: Wed, 20 Dec 2023 17:27:09 +0530 Subject: [PATCH 2/5] removed redundant fields for cpu & mem --- intent_types/mongo/v1alpha1/sample.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/intent_types/mongo/v1alpha1/sample.json b/intent_types/mongo/v1alpha1/sample.json index 3ee8b4b..ce125e0 100644 --- a/intent_types/mongo/v1alpha1/sample.json +++ b/intent_types/mongo/v1alpha1/sample.json @@ -17,9 +17,7 @@ "cpu": "2001m", "memory": "900MiB", "volume": "8G", - "instance_count": 3, - "cpu_reservation": "1000m", - "memory_reservation": "500MiB" + "instance_count": 3 } }, "disabled": false, From 14726c699f1183639a37ae8ad9c170313c6a8e17 Mon Sep 17 00:00:00 2001 From: 4adway Date: Wed, 20 Dec 2023 17:40:19 +0530 Subject: [PATCH 3/5] added sharding to mongo --- intent_types/mongo/v1alpha1/sample.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/intent_types/mongo/v1alpha1/sample.json b/intent_types/mongo/v1alpha1/sample.json index ce125e0..ae1ecb1 100644 --- a/intent_types/mongo/v1alpha1/sample.json +++ b/intent_types/mongo/v1alpha1/sample.json @@ -13,6 +13,10 @@ "spec": { "version": "6.0.2", "authenticated": true, + "sharding": { + "enabled": true, + "shard_count": 2 + }, "size": { "cpu": "2001m", "memory": "900MiB", From 603ad3086873c1360bef2f56dce5074c09015222 Mon Sep 17 00:00:00 2001 From: Anuj Hydrabadi Date: Wed, 20 Dec 2023 17:42:17 +0530 Subject: [PATCH 4/5] added backup and security --- intent_types/mongo/v1alpha1/sample.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/intent_types/mongo/v1alpha1/sample.json b/intent_types/mongo/v1alpha1/sample.json index ae1ecb1..7570a5e 100644 --- a/intent_types/mongo/v1alpha1/sample.json +++ b/intent_types/mongo/v1alpha1/sample.json @@ -12,11 +12,18 @@ "kind": "mongo", "spec": { "version": "6.0.2", - "authenticated": true, "sharding": { "enabled": true, "shard_count": 2 }, + "security": { + "authentication": true, + "authorization": true, + "tls": true + }, + "backup": { + "enabled": true + }, "size": { "cpu": "2001m", "memory": "900MiB", From b2a1e8cd26eada9311cf2d10ee49ce150438842b Mon Sep 17 00:00:00 2001 From: Anuj Hydrabadi Date: Wed, 20 Dec 2023 18:17:29 +0530 Subject: [PATCH 5/5] review changes for MongoDB --- intent_types/mongo/v1alpha1/intent_type.json | 4 ++-- intent_types/mongo/v1alpha1/sample.json | 22 +++++++++----------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/intent_types/mongo/v1alpha1/intent_type.json b/intent_types/mongo/v1alpha1/intent_type.json index 4f4bd26..3a02d91 100644 --- a/intent_types/mongo/v1alpha1/intent_type.json +++ b/intent_types/mongo/v1alpha1/intent_type.json @@ -1,5 +1,5 @@ { - "name": "Mongo", + "name": "MongoDB", "api_version": "v1alpha1", - "description": "An Intent Type for deploying and managing Mongo-DB, following Kubernetes style version naming." + "description": "An Intent Type for deploying and managing MongoDB, following Kubernetes style version naming." } diff --git a/intent_types/mongo/v1alpha1/sample.json b/intent_types/mongo/v1alpha1/sample.json index 7570a5e..7711f42 100644 --- a/intent_types/mongo/v1alpha1/sample.json +++ b/intent_types/mongo/v1alpha1/sample.json @@ -6,16 +6,12 @@ "labels": { "owner": "infrastructure@example.com" }, - "name": "my-mongo-instance", - "description": "A Mongo instance." + "name": "my-mongodb-instance", + "description": "A MongoDB instance." }, - "kind": "mongo", + "kind": "mongodb", "spec": { "version": "6.0.2", - "sharding": { - "enabled": true, - "shard_count": 2 - }, "security": { "authentication": true, "authorization": true, @@ -24,11 +20,13 @@ "backup": { "enabled": true }, - "size": { - "cpu": "2001m", - "memory": "900MiB", - "volume": "8G", - "instance_count": 3 + "replication": { + "data_instances": 3, + "arbiter_instances": 1 + }, + "parameters": { + "key1": "value1", + "key2": "value2" } }, "disabled": false,