Skip to content

Commit

Permalink
[terraform] allow single node deployment (#1027)
Browse files Browse the repository at this point in the history
  • Loading branch information
barroco committed May 15, 2024
1 parent c5dbb88 commit c52f271
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,18 @@ variable "node_count" {
type = number
description = <<-EOT
Number of Kubernetes nodes which should correspond to the desired CockroachDB nodes.
**Always 3.**
Currently, only single node or three nodes deployments are supported.
Example: `3`
EOT

validation {
condition = var.node_count == 3
error_message = "Node count should be 3. Only configuration supported at the moment"
condition = contains([1, 3], var.node_count)
error_message = "Currently, only 1 node or 3 nodes deployments are supported."
}
}


variable "kubernetes_version" {
type = string
description = <<-EOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,18 @@ variable "node_count" {
type = number
description = <<-EOT
Number of Kubernetes nodes which should correspond to the desired CockroachDB nodes.
**Always 3.**
Currently, only single node or three nodes deployments are supported.
Example: `3`
EOT

validation {
condition = var.node_count == 3
error_message = "Node count should be 3. Only configuration supported at the moment"
condition = contains([1, 3], var.node_count)
error_message = "Currently, only 1 node or 3 nodes deployments are supported."
}
}


variable "kubernetes_version" {
type = string
description = <<-EOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Example: `dss-che-1`
*Type: `number`*

Number of Kubernetes nodes which should correspond to the desired CockroachDB nodes.
**Always 3.**
Currently, only single node or three nodes deployments are supported.

Example: `3`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,18 @@ variable "node_count" {
type = number
description = <<-EOT
Number of Kubernetes nodes which should correspond to the desired CockroachDB nodes.
**Always 3.**
Currently, only single node or three nodes deployments are supported.
Example: `3`
EOT

validation {
condition = var.node_count == 3
error_message = "Node count should be 3. Only configuration supported at the moment"
condition = contains([1, 3], var.node_count)
error_message = "Currently, only 1 node or 3 nodes deployments are supported."
}
}


variable "kubernetes_version" {
type = string
description = <<-EOT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Example: `dss-che-1`
*Type: `number`*

Number of Kubernetes nodes which should correspond to the desired CockroachDB nodes.
**Always 3.**
Currently, only single node or three nodes deployments are supported.

Example: `3`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,18 @@ variable "node_count" {
type = number
description = <<-EOT
Number of Kubernetes nodes which should correspond to the desired CockroachDB nodes.
**Always 3.**
Currently, only single node or three nodes deployments are supported.
Example: `3`
EOT

validation {
condition = var.node_count == 3
error_message = "Node count should be 3. Only configuration supported at the moment"
condition = contains([1, 3], var.node_count)
error_message = "Currently, only 1 node or 3 nodes deployments are supported."
}
}


variable "kubernetes_version" {
type = string
description = <<-EOT
Expand Down
8 changes: 4 additions & 4 deletions deploy/infrastructure/utils/definitions/node_count.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ variable "node_count" {
type = number
description = <<-EOT
Number of Kubernetes nodes which should correspond to the desired CockroachDB nodes.
**Always 3.**
Currently, only single node or three nodes deployments are supported.
Example: `3`
EOT

validation {
condition = var.node_count == 3
error_message = "Node count should be 3. Only configuration supported at the moment"
condition = contains([1, 3], var.node_count)
error_message = "Currently, only 1 node or 3 nodes deployments are supported."
}
}
}
7 changes: 4 additions & 3 deletions deploy/operations/ci/aws-1/variables.gen.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,18 @@ variable "node_count" {
type = number
description = <<-EOT
Number of Kubernetes nodes which should correspond to the desired CockroachDB nodes.
**Always 3.**
Currently, only single node or three nodes deployments are supported.
Example: `3`
EOT

validation {
condition = var.node_count == 3
error_message = "Node count should be 3. Only configuration supported at the moment"
condition = contains([1, 3], var.node_count)
error_message = "Currently, only 1 node or 3 nodes deployments are supported."
}
}


variable "kubernetes_version" {
type = string
description = <<-EOT
Expand Down

0 comments on commit c52f271

Please sign in to comment.