Skip to content

Commit

Permalink
Merge pull request #144 from ExpediaGroup/feature/extended_server_config
Browse files Browse the repository at this point in the history
added variable to extend config more easily
  • Loading branch information
Patrick Duin authored Apr 24, 2024
2 parents e6d8530 + ff10152 commit 34931f6
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 1 deletion.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ All notable changes to this project will be documented in this file.

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).


## [4.5.0] - 2024-04-25
### Added
- Added optional `extended_server_config`. For instance to configure Waggle Dance Rate limiting configuration.

## [4.4.0] - 2024-04-18
### Added
- Add new variable `cpu_limit` and `memory_limit` to support set pod resource guaranteed.

## [4.3.2] - 2024-03-26
### Updated
- Removed the datadog explicit provider configuration as suggested here: https://developer.hashicorp.com/terraform/language/modules/develop/providers#legacy-shared-modules-with-provider-configurations
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ For more information please refer to the main [Apiary](https://github.com/Expedi
| datadog_agent_version | Version of the Datadog Agent running in the ECS cluster. | string | `7.46.0-jmx` | no |
| include_datadog_agent | Whether to include the datadog-agent container alongside Waggledance. | string | bool | no |
| metrics_port | The port on which the WaggleDance application initiates. Additionally, it serves as the port from which we parse metrics. | string | `18000` | yes |
| 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 |



## Usage

Expand Down
1 change: 1 addition & 0 deletions templates.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ data "template_file" "server_yaml" {
enable_query_functions_across_all_metastores = var.enable_query_functions_across_all_metastores
graphite = join("", data.template_file.graphite_server_yaml.*.rendered)
exposed_endpoints = data.template_file.endpoints_server_yaml.rendered
extended_server_config = var.extended_server_config
}
}

Expand Down
1 change: 1 addition & 0 deletions templates/waggle-dance-server.yml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ yaml-storage:
overwrite-config-on-shutdown: false
${graphite}
${exposed_endpoints}
${extended_server_config}
25 changes: 25 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -430,3 +430,28 @@ variable "include_datadog_agent" {
default = false
}

/*
Example:
extended_server_config = <<EOT
waggledance.extensions.ratelimit.enabled: true
waggledance.extensions.ratelimit.storage: redis
waggledance.extensions.ratelimit.capacity: 2000
waggledance.extensions.ratelimit.tokensPerMinute: 1000
waggledance.extensions.ratelimit.reddison.embedded.config: |
replicatedServersConfig:
idleConnectionTimeout: 10000
connectTimeout: 3000
timeout: 1000
retryAttempts: 0
retryInterval: 1500
password: "<auth_token>"
nodeAddresses:
- "rediss://localhost1:62493"
- "rediss://localhost2:62493"
EOT
*/
variable "extended_server_config" {
description = "Extended waggle-dance-server.yml configuration for Waggle Dance. This is a YAML string."
type = string
default = ""
}

0 comments on commit 34931f6

Please sign in to comment.