Skip to content

Commit 34931f6

Browse files
author
Patrick Duin
authored
Merge pull request #144 from ExpediaGroup/feature/extended_server_config
added variable to extend config more easily
2 parents e6d8530 + ff10152 commit 34931f6

File tree

5 files changed

+36
-1
lines changed

5 files changed

+36
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,15 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
7+
## [4.5.0] - 2024-04-25
8+
### Added
9+
- Added optional `extended_server_config`. For instance to configure Waggle Dance Rate limiting configuration.
10+
611
## [4.4.0] - 2024-04-18
712
### Added
813
- Add new variable `cpu_limit` and `memory_limit` to support set pod resource guaranteed.
9-
14+
1015
## [4.3.2] - 2024-03-26
1116
### Updated
1217
- Removed the datadog explicit provider configuration as suggested here: https://developer.hashicorp.com/terraform/language/modules/develop/providers#legacy-shared-modules-with-provider-configurations

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ For more information please refer to the main [Apiary](https://github.com/Expedi
6565
| datadog_agent_version | Version of the Datadog Agent running in the ECS cluster. | string | `7.46.0-jmx` | no |
6666
| include_datadog_agent | Whether to include the datadog-agent container alongside Waggledance. | string | bool | no |
6767
| metrics_port | The port on which the WaggleDance application initiates. Additionally, it serves as the port from which we parse metrics. | string | `18000` | yes |
68+
| extended_server_config | Extended waggle-dance-server.yml configuration for Waggle Dance (see [Waggle Dance README](https://github.com/ExpediaGroup/waggle-dance/blob/main/README.md) for all options). String will be [yamlencoded](https://developer.hashicorp.com/terraform/language/functions/yamlencode). | string | | no |
69+
70+
6871

6972
## Usage
7073

templates.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ data "template_file" "server_yaml" {
3535
enable_query_functions_across_all_metastores = var.enable_query_functions_across_all_metastores
3636
graphite = join("", data.template_file.graphite_server_yaml.*.rendered)
3737
exposed_endpoints = data.template_file.endpoints_server_yaml.rendered
38+
extended_server_config = var.extended_server_config
3839
}
3940
}
4041

templates/waggle-dance-server.yml.tmpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ yaml-storage:
55
overwrite-config-on-shutdown: false
66
${graphite}
77
${exposed_endpoints}
8+
${extended_server_config}

variables.tf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,3 +430,28 @@ variable "include_datadog_agent" {
430430
default = false
431431
}
432432

433+
/*
434+
Example:
435+
extended_server_config = <<EOT
436+
waggledance.extensions.ratelimit.enabled: true
437+
waggledance.extensions.ratelimit.storage: redis
438+
waggledance.extensions.ratelimit.capacity: 2000
439+
waggledance.extensions.ratelimit.tokensPerMinute: 1000
440+
waggledance.extensions.ratelimit.reddison.embedded.config: |
441+
replicatedServersConfig:
442+
idleConnectionTimeout: 10000
443+
connectTimeout: 3000
444+
timeout: 1000
445+
retryAttempts: 0
446+
retryInterval: 1500
447+
password: "<auth_token>"
448+
nodeAddresses:
449+
- "rediss://localhost1:62493"
450+
- "rediss://localhost2:62493"
451+
EOT
452+
*/
453+
variable "extended_server_config" {
454+
description = "Extended waggle-dance-server.yml configuration for Waggle Dance. This is a YAML string."
455+
type = string
456+
default = ""
457+
}

0 commit comments

Comments
 (0)