Skip to content

Commit

Permalink
Update README.md to include additional config fields (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-y authored Oct 3, 2023
1 parent 0d12f9f commit 52e734b
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 4 deletions.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,41 @@ variable "name_prefix" {
default = "superblocks"
description = "This will be prepended to the name of each resource created by this module"
}
variable "superblocks_grpc_msg_res_max" {
type = string
default = "100000000"
description = "The maximum message size in bytes allowed to be sent by the gRPC server. This is used to prevent malicious clients from sending large messages to cause memory exhaustion."
}
variable "superblocks_grpc_msg_req_max" {
type = string
default = "30000000"
description = "The maximum message size in bytes allowed to be received by the gRPC server. This is used to prevent malicious clients from sending large messages to cause memory exhaustion."
}
variable "superblocks_timeout" {
type = string
default = "10000000000"
description = "The maximum amount of time in milliseconds before a request is aborted. This applies for http requests against the Superblocks server and does not apply to the execution time limit of a workload."
}
variable "superblocks_log_level" {
type = string
default = "info"
description = "Logging level for the superblocks agent. Accepted values are 'debug', 'info', 'warn', 'error', 'fatal', 'panic'."
}
variable "superblocks_agent_handle_cors" {
type = bool
default = true
description = "Whether to handle CORS requests, this will accept all requests from any origin."
}
variable "superblocks_additional_env_vars" {
type = map(string)
default = {}
sensitive = true
description = "Additional environment variables to specify for the Superblocks Agent container."
}
```
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module "cloud_run" {

container_port = var.superblocks_agent_port
container_image = var.superblocks_agent_image
container_env = {
container_env = merge({
"SUPERBLOCKS_ORCHESTRATOR_LOG_LEVEL" = "${var.superblocks_log_level}"
"SUPERBLOCKS_ORCHESTRATOR_HTTP_PORT" = "${var.superblocks_agent_port}"
"SUPERBLOCKS_ORCHESTRATOR_GRPC_PORT" = "8081"
Expand All @@ -44,7 +44,7 @@ module "cloud_run" {
"SUPERBLOCKS_ORCHESTRATOR_AGENT_TAGS" = "${var.superblocks_agent_tags}"
"SUPERBLOCKS_ORCHESTRATOR_DATA_DOMAIN" = "${var.superblocks_agent_data_domain}"
"SUPERBLOCKS_ORCHESTRATOR_HANDLE_CORS" = "${var.superblocks_agent_handle_cors}"
}
}, var.superblocks_additional_env_vars)
container_cpu_throttling = var.container_cpu_throttling
container_requests_cpu = var.container_requests_cpu
container_requests_memory = var.container_requests_memory
Expand Down
10 changes: 8 additions & 2 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,19 @@ variable "superblocks_timeout" {
variable "superblocks_log_level" {
type = string
default = "info"
description = "Logging level for the superblocks agent"
description = "Logging level for the superblocks agent. Accepted values are 'debug', 'info', 'warn', 'error', 'fatal', 'panic'."
}

variable "superblocks_agent_handle_cors" {
type = bool
default = true
description = "Whether to handle CORS requests"
description = "Whether to handle CORS requests, this will accept all requests from any origin."
}

variable "superblocks_additional_env_vars" {
type = map(any)
default = {}
description = "Additional environment variables to specify for the Superblocks Agent container."
}

#################################################################
Expand Down

0 comments on commit 52e734b

Please sign in to comment.