X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=fdio.infra.terraform%2F1n_nmd%2Fprometheus%2Fvariables.tf;h=d44f9d5f8abc5fdd60fb73761bfbb390c5d40d3f;hp=befd9412cbffe06d88ff2916fae76234c9c74f3b;hb=bc676c9e1e5ef3545ef442db2023d7fcdfe3b034;hpb=0bbb81c4fd1afdee6eb23ba4d49171d8dced6b19 diff --git a/fdio.infra.terraform/1n_nmd/prometheus/variables.tf b/fdio.infra.terraform/1n_nmd/prometheus/variables.tf index befd9412cb..d44f9d5f8a 100644 --- a/fdio.infra.terraform/1n_nmd/prometheus/variables.tf +++ b/fdio.infra.terraform/1n_nmd/prometheus/variables.tf @@ -1,84 +1,127 @@ # Nomad -variable "nomad_datacenters" { - description = "Nomad data centers" +variable "datacenters" { + description = "Specifies the list of DCs to be considered placing this task" type = list(string) default = ["dc1"] } -variable "nomad_host_volume" { - description = "Nomad Host Volume" +variable "region" { + description = "Specifies the list of DCs to be considered placing this task" + type = string + default = "global" +} + +variable "volume_source" { + description = "The name of the volume to request" type = string default = "persistence" } # Prometheus -variable "prometheus_job_name" { - description = "Prometheus job name" +variable "pm_version" { + description = "Prometheus version" type = string - default = "prometheus" + default = "2.33.1" +} + +variable "auto_promote" { + description = "Specifies if the job should auto-promote to the canary version" + type = bool + default = true +} + +variable "auto_revert" { + description = "Specifies if the job should auto-revert to the last stable job" + type = bool + default = true } -variable "prometheus_group_count" { - description = "Number of prometheus group instances" +variable "canary" { + description = "Equal to the count of the task group allows blue/green depl." type = number default = 1 } -variable "prometheus_service_name" { - description = "Prometheus service name" - type = string - default = "prometheus" +variable "cpu" { + description = "CPU allocation" + type = number + default = 2000 } -variable "prometheus_version" { - description = "Prometheus version" +variable "data_dir" { + description = "Prometheus DISK allocation" type = string - default = "v2.28.1" + default = "/data" } -variable "prometheus_use_canary" { - description = "Uses canary deployment" - type = bool - default = false +variable "group_count" { + description = "Specifies the number of the task groups running under this one" + type = number + default = 4 } -variable "prometheus_vault_secret" { - description = "Set of properties to be able to fetch secret from vault" - type = object({ - use_vault_provider = bool, - vault_kv_policy_name = string, - vault_kv_path = string, - vault_kv_field_access_key = string, - vault_kv_field_secret_key = string - }) +variable "job_name" { + description = "Specifies a name for the job" + type = string + default = "prometheus" } -variable "prometheus_cpu" { - description = "Prometheus CPU allocation" +variable "max_parallel" { + description = "Specifies the maximum number of updates to perform in parallel" type = number - default = 2000 + default = 1 } -variable "prometheus_mem" { - description = "Prometheus RAM allocation" +variable "memory" { + description = "Specifies the memory required in MB" type = number - default = 8192 + default = 4096 } -variable "prometheus_port" { - description = "Prometheus TCP allocation" +variable "port" { + description = "Specifies the static TCP/UDP port to allocate" type = number - default = 9200 + default = 9090 } -variable "prometheus_data_dir" { - description = "Prometheus DISK allocation" +variable "service_name" { + description = "Specifies the name this service will be advertised in Consul" type = string - default = "/data" + default = "prometheus" +} + +variable "use_canary" { + description = "Uses canary deployment" + type = bool + default = true } -variable "prometheus_use_host_volume" { +variable "use_host_volume" { description = "Use Nomad host volume feature" type = bool default = false -} \ No newline at end of file +} + +variable "volume_destination" { + description = "Specifies where the volume should be mounted inside the task" + type = string + default = "/data/" +} + +variable "vault_secret" { + type = object({ + use_vault_provider = bool, + vault_kv_policy_name = string, + vault_kv_path = string, + vault_kv_field_access_key = string, + vault_kv_field_secret_key = string + }) + 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/prometheus" + vault_kv_field_access_key = "access_key" + vault_kv_field_secret_key = "secret_key" + } +}