X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=fdio.infra.terraform%2Fterraform-nomad-loki%2Fvariables.tf;fp=fdio.infra.terraform%2F1n_nmd%2Fminio_s3_gateway%2Fvariables.tf;h=049290f5a8970b93606b6e8d6dc623b564edc351;hb=ca81b6ccfdcee62846217f824c1e4a1610b8a950;hp=6fb351df26a513ee93703caebef2fad2b1d9c5e0;hpb=e972e67afac3ab3eb785668d01d3bdf1833eade9;p=csit.git diff --git a/fdio.infra.terraform/1n_nmd/minio_s3_gateway/variables.tf b/fdio.infra.terraform/terraform-nomad-loki/variables.tf similarity index 54% rename from fdio.infra.terraform/1n_nmd/minio_s3_gateway/variables.tf rename to fdio.infra.terraform/terraform-nomad-loki/variables.tf index 6fb351df26..049290f5a8 100644 --- a/fdio.infra.terraform/1n_nmd/minio_s3_gateway/variables.tf +++ b/fdio.infra.terraform/terraform-nomad-loki/variables.tf @@ -1,5 +1,4 @@ # Nomad - variable "datacenters" { description = "Specifies the list of DCs to be considered placing this task" type = list(string) @@ -15,14 +14,14 @@ variable "region" { variable "volume_source" { description = "The name of the volume to request" type = string - default = "persistence" + default = "" } -# Minio -variable "access_key" { - description = "Minio access key" +# Grafana Loki +variable "gl_version" { + description = "Grafana Loki version" type = string - default = "minio" + default = "2.4.2" } variable "auto_promote" { @@ -44,15 +43,15 @@ variable "canary" { } variable "cpu" { - description = "Specifies the CPU required to run this task in MHz" + description = "CPU allocation" type = number - default = 1000 + default = 2000 } -variable "envs" { - description = "Minio environment variables" - type = list(string) - default = [] +variable "data_dir" { + description = "Loki data dir allocation" + type = string + default = "" } variable "group_count" { @@ -61,38 +60,10 @@ variable "group_count" { default = 1 } -variable "host" { - description = "Minio host" - type = string - default = "127.0.0.1" -} - -variable "image" { - description = "The Docker image to run" - type = string - default = "minio/minio:latest" -} - variable "job_name" { description = "Specifies a name for the job" type = string - default = "minio" -} - -variable "kms_variables" { - type = object({ - use_vault_kms = string - vault_address = string, - vault_kms_approle_kv = string, - vault_kms_key_name = string - }) - description = "Set of properties to be able to transit secrets in vault" - default = { - use_vault_kms = false - vault_address = "", - vault_kms_approle_kv = "", - vault_kms_key_name = "" - } + default = "loki" } variable "max_parallel" { @@ -104,68 +75,25 @@ variable "max_parallel" { variable "memory" { description = "Specifies the memory required in MB" type = number - default = 1024 -} - -variable "mode" { - description = "Specifies the Minio mode" - type = string - default = "server" + default = 4096 } -variable "port_base" { +variable "port" { description = "Specifies the static TCP/UDP port to allocate" type = number - default = 9000 -} - -variable "port_console" { - description = "Specifies the static TCP/UDP port to allocate" - type = number - default = 9001 -} - -variable "resource_proxy" { - description = "Minio proxy resources" - type = object({ - cpu = number, - memory = number - }) - default = { - cpu = 2000, - memory = 1024 - } - validation { - condition = var.resource_proxy.cpu >= 200 && var.resource_proxy.memory >= 128 - error_message = "Proxy resource must be at least: cpu=200, memory=128." - } + default = 3100 } variable "service_name" { description = "Specifies the name this service will be advertised in Consul" type = string - default = "minio" -} - -variable "secret_key" { - description = "Minio secret key" - type = string - default = "minio" -} - -variable "upstreams" { - type = list(object({ - service_name = string, - port = number, - })) - description = "List of upstream services" - default = [] + default = "loki" } variable "use_canary" { - description = "Uses canary deployment for Minio" + description = "Uses canary deployment" type = bool - default = false + default = true } variable "use_host_volume" { @@ -174,6 +102,12 @@ variable "use_host_volume" { default = false } +variable "volume_destination" { + description = "Specifies where the volume should be mounted inside the task" + type = string + default = "" +} + variable "vault_secret" { type = object({ use_vault_provider = bool, @@ -182,18 +116,12 @@ variable "vault_secret" { vault_kv_field_access_key = string, vault_kv_field_secret_key = string }) - description = "Set of properties to be able to fetch secret from vault" + description = "Set of properties to be able to fetch secret from vault." default = { use_vault_provider = false vault_kv_policy_name = "kv" - vault_kv_path = "secret/data/minio" + vault_kv_path = "secret/data/prometheus" vault_kv_field_access_key = "access_key" vault_kv_field_secret_key = "secret_key" } } - -variable "volume_destination" { - description = "Specifies where the volume should be mounted inside the task" - type = string - default = "/data/" -}