|
1 | | -## redis |
| 1 | +## Redis |
2 | 2 |
|
3 | 3 | ![squareops_avatar] |
4 | 4 |
|
5 | 5 | [squareops_avatar]: https://squareops.com/wp-content/uploads/2022/12/squareops-logo.png |
6 | 6 |
|
7 | 7 | ### [SquareOps Technologies](https://squareops.com/) Your DevOps Partner for Accelerating cloud journey. |
8 | 8 | <br> |
| 9 | +This module allows users to customize the deployment by providing various input variables. Users can specify the name and environment of the Redis deployment, the chart and app version, the namespace in which the Redis deployment will be created, and whether to enable Grafana monitoring. The module also allows users to set the recovery window for the AWS Secrets Manager that is used to store the Redis password. |
| 10 | +<br><br> |
| 11 | +This module creates a Redis master and one or more Redis slaves, depending on the specified architecture. The module creates Kubernetes services for the Redis master and slave deployments, and exposes these services as endpoints that can be used to connect to the Redis database. Users can retrieve these endpoints using the module's outputs. |
| 12 | + |
| 13 | +## Supported Versions : |
| 14 | + |
| 15 | +| Redis Helm Chart Version | K8s supported version | |
| 16 | +| :-----: | :--- | |
| 17 | +| **16.13.2** | **1.23,1.24,1.25** | |
9 | 18 |
|
10 | 19 | ## Usage Example |
11 | 20 |
|
12 | 21 | ```hcl |
13 | 22 | module "redis" { |
14 | | - source = "../../" |
| 23 | + source = "https://github.com/sq-ia/terraform-kubernetes-redis.git" |
15 | 24 | redis_config = { |
16 | | - name = "skaf" |
| 25 | + name = "redis" |
17 | 26 | values_yaml = "" |
18 | 27 | environment = "prod" |
19 | 28 | architecture = "replication" |
20 | | - storage_class_name = "gp2" |
21 | 29 | slave_volume_size = "10Gi" |
22 | | - slave_replica_count = 3 |
23 | | - master_volume_size = "10Gi" |
| 30 | + master_volume_size = "10Gi" |
| 31 | + storage_class_name = "gp2" |
| 32 | + slave_replica_count = 2 |
24 | 33 | } |
25 | | - grafana_monitoring_enabled = true |
| 34 | + grafana_monitoring_enabled = true |
26 | 35 | recovery_window_aws_secret = 0 |
27 | 36 | } |
28 | 37 |
|
@@ -73,21 +82,21 @@ No modules. |
73 | 82 |
|
74 | 83 | | Name | Description | Type | Default | Required | |
75 | 84 | |------|-------------|------|---------|:--------:| |
76 | | -| <a name="input_app_version"></a> [app\_version](#input\_app\_version) | Enter app version of application | `string` | `"6.2.7-debian-11-r11"` | no | |
77 | | -| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | Enter chart version of application | `string` | `"16.13.2"` | no | |
78 | | -| <a name="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace) | Set it to true to create given namespace | `string` | `true` | no | |
79 | | -| <a name="input_grafana_monitoring_enabled"></a> [grafana\_monitoring\_enabled](#input\_grafana\_monitoring\_enabled) | Set true to deploy redis exporter to get metrics in grafana | `bool` | `false` | no | |
80 | | -| <a name="input_namespace"></a> [namespace](#input\_namespace) | Enter namespace name | `string` | `"redis"` | no | |
81 | | -| <a name="input_recovery_window_aws_secret"></a> [recovery\_window\_aws\_secret](#input\_recovery\_window\_aws\_secret) | Number of days that AWS Secrets Manager waits before it can delete the secret. This value can be 0 to force deletion without recovery or range from 7 to 30 days. | `number` | `0` | no | |
82 | | -| <a name="input_redis_config"></a> [redis\_config](#input\_redis\_config) | Redis configurations | `any` | <pre>{<br> "architecture": "replication",<br> "environment": "",<br> "master_volume_size": "",<br> "name": "",<br> "slave_replica_count": 1,<br> "slave_volume_size": "",<br> "storage_class_name": "",<br> "values_yaml": ""<br>}</pre> | no | |
| 85 | +| <a name="input_app_version"></a> [app\_version](#input\_app\_version) | Version of the Redis application that will be deployed. | `string` | `"6.2.7-debian-11-r11"` | no | |
| 86 | +| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | Version of the chart for the Redis application that will be deployed. | `string` | `"16.13.2"` | no | |
| 87 | +| <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` | `true` | no | |
| 88 | +| <a name="input_grafana_monitoring_enabled"></a> [grafana\_monitoring\_enabled](#input\_grafana\_monitoring\_enabled) | Specify whether or not to deploy Redis exporter to collect Redis metrics for monitoring in Grafana. | `bool` | `false` | no | |
| 89 | +| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace where the Redis resources will be deployed. | `string` | `"redis"` | no | |
| 90 | +| <a name="input_recovery_window_aws_secret"></a> [recovery\_window\_aws\_secret](#input\_recovery\_window\_aws\_secret) | Number of days that AWS Secrets Manager will wait before it can delete the secret. The value can be 0 to force deletion without recovery, or a range from 7 to 30 days. | `number` | `0` | no | |
| 91 | +| <a name="input_redis_config"></a> [redis\_config](#input\_redis\_config) | Specify the configuration settings for Redis, including the name, environment, storage options, replication settings, and custom YAML values. | `any` | <pre>{<br> "architecture": "replication",<br> "environment": "",<br> "master_volume_size": "",<br> "name": "",<br> "slave_replica_count": 1,<br> "slave_volume_size": "",<br> "storage_class_name": "",<br> "values_yaml": ""<br>}</pre> | no | |
83 | 92 |
|
84 | 93 | ## Outputs |
85 | 94 |
|
86 | 95 | | Name | Description | |
87 | 96 | |------|-------------| |
88 | | -| <a name="output_redis_master_endpoint"></a> [redis\_master\_endpoint](#output\_redis\_master\_endpoint) | Redis master pod connection endpoint | |
89 | | -| <a name="output_redis_port"></a> [redis\_port](#output\_redis\_port) | Redis port | |
90 | | -| <a name="output_redis_slave_endpoint"></a> [redis\_slave\_endpoint](#output\_redis\_slave\_endpoint) | Redis slave pod connection endpoint | |
| 97 | +| <a name="output_redis_master_endpoint"></a> [redis\_master\_endpoint](#output\_redis\_master\_endpoint) | The endpoint for the Redis Master Service, which is the primary node in the Redis cluster responsible for handling read-write operations. | |
| 98 | +| <a name="output_redis_port"></a> [redis\_port](#output\_redis\_port) | The port number on which Redis is running. | |
| 99 | +| <a name="output_redis_slave_endpoint"></a> [redis\_slave\_endpoint](#output\_redis\_slave\_endpoint) | The endpoint for the Redis Slave Service, which is a secondary node in the Redis cluster responsible for handling read-only operations. | |
91 | 100 | <!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --> |
92 | 101 |
|
93 | 102 | ## Contribution & Issue Reporting |
|
0 commit comments