Skip to content

Upgraded version of mongodb helm chart. #19

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .pre-commit-config.yaml
100644 → 100755
Empty file.
Empty file modified .tflint.hcl
100644 → 100755
Empty file.
Empty file modified IAM.md
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
19 changes: 11 additions & 8 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
## MongoDB

![squareops_avatar]

[squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://squareops.com/wp-content/uploads/2020/05/Squareops-png-white.png1-3.png">
<source media="(prefers-color-scheme: light)" srcset="https://squareops.com/wp-content/uploads/2021/09/Squareops-png-1-1.png">
<img src="https://squareops.com/wp-content/uploads/2021/09/Squareops-png-1-1.png">
</picture>

### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey.
<br>
Expand All @@ -12,7 +14,7 @@ This module is for deploying a highly available MongoDB cluster on Kubernetes us

| MongoDB Helm Chart Version | K8s supported version (EKS, AKS & GKE) |
| :-----: | :--- |
| **13.1.5** | **1.23,1.24,1.25,1.26,1.27** |
| **15.1.2** | **1.23,1.24,1.25,1.26,1.27,** |


## Usage Example
Expand Down Expand Up @@ -115,7 +117,7 @@ Features
- s3_bucket_region: The region of the S3 bucket.
- cron_for_full_backup: The cron expression for scheduling full backups.
### Restore Configuration
- mongodb_restore_config: Configuration for restoring databases.
- mongodb_restore_config: Configuration for restoring databases.
- bucket_uri: The URI of the S3 bucket containing the backup file.
- file_name: The name of the backup file to restore.
- s3_bucket_region: The region of the S3 bucket containing the backup file.
Expand Down Expand Up @@ -161,16 +163,17 @@ No modules.

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_app_version"></a> [app\_version](#input\_app\_version) | Version of the Mongodb application that will be deployed. | `string` | `"5.0.8-debian-10-r9"` | no |
| <a name="input_additional_aws_tags"></a> [additional\_aws\_tags](#input\_additional\_aws\_tags) | Additional tags to be applied to resources | `map(string)` | `{}` | no |
| <a name="input_app_version"></a> [app\_version](#input\_app\_version) | Version of the Mongodb application that will be deployed. | `string` | `"7.0.8-debian-12-r0"` | no |
| <a name="input_az_account_backup"></a> [az\_account\_backup](#input\_az\_account\_backup) | Azure user managed account backup identity | `string` | `""` | no |
| <a name="input_az_account_restore"></a> [az\_account\_restore](#input\_az\_account\_restore) | Azure user managed account restore identity | `string` | `""` | no |
| <a name="input_azure_container_name"></a> [azure\_container\_name](#input\_azure\_container\_name) | Azure container name | `string` | `""` | no |
| <a name="input_azure_storage_account_key"></a> [azure\_storage\_account\_key](#input\_azure\_storage\_account\_key) | Azure storage account key | `string` | `""` | no |
| <a name="input_azure_storage_account_name"></a> [azure\_storage\_account\_name](#input\_azure\_storage\_account\_name) | Azure storage account name | `string` | `""` | no |
| <a name="input_bucket_provider_type"></a> [bucket\_provider\_type](#input\_bucket\_provider\_type) | Choose what type of provider you want (s3, gcs) | `string` | `"gcs"` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | Version of the Mongodb chart that will be used to deploy Mongodb application. | `string` | `"13.1.5"` | no |
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Specifies the name of the EKS cluster to deploy the Mongodb application on. | `string` | `""` | no |
| <a name="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace) | Specify whether or not to create the namespace if it does not already exist. Set it to true to create the namespace. | `string` | `false` | no |
| <a name="input_helm_chart_version"></a> [helm\_chart\_version](#input\_helm\_chart\_version) | Version of the Mongodb chart that will be used to deploy Mongodb application. | `string` | `"15.1.2"` | no |
| <a name="input_iam_role_arn_backup"></a> [iam\_role\_arn\_backup](#input\_iam\_role\_arn\_backup) | IAM role ARN for backup (AWS) | `string` | `""` | no |
| <a name="input_iam_role_arn_restore"></a> [iam\_role\_arn\_restore](#input\_iam\_role\_arn\_restore) | IAM role ARN for restore (AWS) | `string` | `""` | no |
| <a name="input_metric_exporter_password"></a> [metric\_exporter\_password](#input\_metric\_exporter\_password) | Metric exporter password for MongoDB | `string` | `""` | no |
Expand All @@ -179,7 +182,7 @@ No modules.
| <a name="input_mongodb_config"></a> [mongodb\_config](#input\_mongodb\_config) | Specify the configuration settings for Mongodb, including the name, environment, storage options, replication settings, and custom YAML values. | `any` | <pre>{<br> "architecture": "",<br> "custom_databases": "",<br> "custom_databases_passwords": "",<br> "custom_databases_usernames": "",<br> "environment": "",<br> "name": "",<br> "replica_count": 2,<br> "storage_class_name": "",<br> "store_password_to_secret_manager": true,<br> "values_yaml": "",<br> "volume_size": ""<br>}</pre> | no |
| <a name="input_mongodb_custom_credentials_config"></a> [mongodb\_custom\_credentials\_config](#input\_mongodb\_custom\_credentials\_config) | Specify the configuration settings for Mongodb to pass custom credentials during creation. | `any` | <pre>{<br> "metric_exporter_password": "",<br> "metric_exporter_user": "",<br> "root_password": "",<br> "root_user": ""<br>}</pre> | no |
| <a name="input_mongodb_custom_credentials_enabled"></a> [mongodb\_custom\_credentials\_enabled](#input\_mongodb\_custom\_credentials\_enabled) | Specifies whether to enable custom credentials for MongoDB database. | `bool` | `false` | no |
| <a name="input_mongodb_exporter_config"></a> [mongodb\_exporter\_config](#input\_mongodb\_exporter\_config) | Specify whether or not to deploy Mongodb exporter to collect Mongodb metrics for monitoring in Grafana. | `any` | <pre>{<br> "version": "2.9.0"<br>}</pre> | no |
| <a name="input_mongodb_exporter_config"></a> [mongodb\_exporter\_config](#input\_mongodb\_exporter\_config) | Specify whether or not to deploy Mongodb exporter to collect Mongodb metrics for monitoring in Grafana. | `any` | <pre>{<br> "version": "3.5.0"<br>}</pre> | no |
| <a name="input_mongodb_exporter_enabled"></a> [mongodb\_exporter\_enabled](#input\_mongodb\_exporter\_enabled) | Specify whether or not to deploy Mongodb exporter to collect Mongodb metrics for monitoring in Grafana. | `bool` | `false` | no |
| <a name="input_mongodb_exporter_values"></a> [mongodb\_exporter\_values](#input\_mongodb\_exporter\_values) | Mongo DB prometheus exporter values file | `any` | `""` | no |
| <a name="input_mongodb_restore_config"></a> [mongodb\_restore\_config](#input\_mongodb\_restore\_config) | Configuration options for restoring dump to the Mongodb database. | `any` | <pre>{<br> "bucket_uri": "s3://mymongo/mongodumpfull_20230424_112501.gz",<br> "file_name": "",<br> "s3_bucket_region": "us-east-2"<br>}</pre> | no |
Expand Down
4 changes: 2 additions & 2 deletions examples/complete/aws/README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ No requirements.

| Name | Source | Version |
|------|--------|---------|
| <a name="module_aws"></a> [aws](#module\_aws) | squareops/mongodb/kubernetes//modules/resources/aws | n/a |
| <a name="module_mongodb"></a> [mongodb](#module\_mongodb) | squareops/mongodb/kubernetes | n/a |
| <a name="module_aws"></a> [aws](#module\_aws) | ../../../modules/resources/aws | n/a |
| <a name="module_mongodb"></a> [mongodb](#module\_mongodb) | ../../../ | n/a |

## Resources

Expand Down
4 changes: 2 additions & 2 deletions examples/complete/aws/helm/exporter.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ affinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "Infra-Services"
- key: "Addons-Services"
operator: In
values:
- "true"
Expand All @@ -13,4 +13,4 @@ resources:
memory: 200Mi
requests:
cpu: 50m
memory: 100Mi
memory: 100Mi
6 changes: 3 additions & 3 deletions examples/complete/aws/helm/values.yaml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ affinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: "Infra-Services"
- key: "Addons-Services"
operator: In
values:
- "true"
Expand Down Expand Up @@ -34,7 +34,7 @@ arbiter:
requests:
cpu: 100m
memory: 250Mi

affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -61,4 +61,4 @@ restorejob:
cpu: 50m
limits:
memory: 200Mi
cpu: 100m
cpu: 100m
13 changes: 7 additions & 6 deletions examples/complete/aws/main.tf
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
locals {
name = "mongo"
region = "us-east-2"
environment = "prod"
additional_tags = {
region = "ap-northeast-1"
environment = "stg"
additional_aws_tags = {
Owner = "organization_name"
Expires = "Never"
Department = "Engineering"
Expand All @@ -19,18 +19,19 @@ locals {
}
}
module "aws" {
source = "squareops/mongodb/kubernetes//modules/resources/aws"
# source = "squareops/mongodb/kubernetes//modules/resources/aws"
source = "../../../modules/resources/aws"
environment = local.environment
name = local.name
namespace = local.namespace
store_password_to_secret_manager = local.store_password_to_secret_manager
cluster_name = ""
cluster_name = "stg-rachit"
mongodb_custom_credentials_enabled = local.mongodb_custom_credentials_enabled
mongodb_custom_credentials_config = local.mongodb_custom_credentials_config
}

module "mongodb" {
source = "squareops/mongodb/kubernetes"
source = "../../../"
namespace = local.namespace
create_namespace = local.create_namespace
mongodb_config = {
Expand Down
Empty file modified examples/complete/aws/output.tf
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions examples/complete/aws/provider.tf
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
provider "aws" {
region = local.region
default_tags {
tags = local.additional_tags
tags = local.additional_aws_tags
}
}

data "aws_eks_cluster" "cluster" {
name = ""
name = "stg-rachit"
}

data "aws_eks_cluster_auth" "cluster" {
name = ""
name = "stg-rachit"
}

provider "kubernetes" {
Expand Down
Empty file modified examples/complete/azure/README.md
100644 → 100755
Empty file.
Empty file modified examples/complete/azure/helm/values.yaml
100644 → 100755
Empty file.
Empty file modified examples/complete/azure/main.tf
100644 → 100755
Empty file.
Empty file modified examples/complete/azure/output.tf
100644 → 100755
Empty file.
Empty file modified examples/complete/azure/provider.tf
100644 → 100755
Empty file.
Empty file modified examples/complete/gcp/README.md
100644 → 100755
Empty file.
Empty file modified examples/complete/gcp/helm/values.yaml
100644 → 100755
Empty file.
Empty file modified examples/complete/gcp/main.tf
100644 → 100755
Empty file.
Empty file modified examples/complete/gcp/output.tf
100644 → 100755
Empty file.
Empty file modified examples/complete/gcp/provider.tf
100644 → 100755
Empty file.
Empty file modified helm/values/backup/values.yaml
100644 → 100755
Empty file.
Empty file modified helm/values/exporter/values.yaml
100644 → 100755
Empty file.
Loading