Skip to content

Commit

Permalink
Merge pull request #27 from AxonIQ/26-condition-check-for-java_version
Browse files Browse the repository at this point in the history
26 condition check for java version
  • Loading branch information
checco committed Aug 29, 2024
2 parents 097a2e3 + 396f796 commit 9c8169c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

```terraform
module "as_demo" {
source = "[email protected]:AxonIQ/terraform-axonserver-k8s.git?ref=v1.11"
source = "[email protected]:AxonIQ/terraform-axonserver-k8s.git?ref=v1.12"
axonserver_release = "2024.1.1"
java_version = "17"
Expand All @@ -46,8 +46,8 @@ module "as_demo" {
| <a name="input_public_domain"></a> [public\_domain](#input\_public\_domain) | The domain that is added to the hostname when returning hostnames to client applications. | `string` | `""` | yes |
| <a name="input_axonserver_license_path"></a> [axonserver\_license\_path](#input\_axonserver\_license\_path) | The path to the Axon Server license | `string` | `""` | yes |
| <a name="input_axonserver_properties"></a> [axonserver\_properties](#input\_axonserver\_properties) | The path to the Axon Server properties file | `string` | `""` | no |
| <a name="input_console_authentication"></a> [console\_authentication](#input\_console\_authentication) | Console authentication token | `string` | `""` | no |
| <a name="input_java_version"></a> [java\_version](#input\_java\_version) | Java runtime | `number` | `"11"` | no |
| <a name="input_console_authentication"></a> [console\_authentication](#input\_console\_authentication) | Console authentication token | `string` | `""` | no |
| <a name="input_java_version"></a> [java\_version](#input\_java\_version) | Java runtime | `number` | `"17"` | no |
| <a name="input_resources_limits_cpu"></a> [resources\_limits\_cpu](#input\_resources\_limits\_cpu) | spec.container.resources.limits.cpu | `number` | `"1"` | no |
| <a name="input_resources_limits_memory"></a> [resources\_limits\_memory](#input\_resources\_limits\_memory) | spec.container.resources.limits.memory | `string` | `"1Gi"` | no |
| <a name="input_resources_requests_cpu"></a> [resources\_requests\_cpu](#input\_resources\_requests\_cpu) | spec.container.resources.requests.cpu | `number` | `"1"` | no |
Expand Down
4 changes: 2 additions & 2 deletions statefulset.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ resource "kubernetes_stateful_set" "axonserver" {
termination_grace_period_seconds = 120

dynamic "affinity" {
for_each = var.assign_pods_to_different_nodes == true ? [1] : [ ]
for_each = var.assign_pods_to_different_nodes == true ? [1] : []
content {
pod_anti_affinity {
preferred_during_scheduling_ignored_during_execution {
Expand All @@ -47,7 +47,7 @@ resource "kubernetes_stateful_set" "axonserver" {
match_expressions {
key = "cluster"
operator = "In"
values = [ var.cluster_name ]
values = [var.cluster_name]
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ variable "console_authentication" {
variable "java_version" {
description = "Java runtime"
type = number
default = 11
default = 17

validation {
condition = contains(["17", "11"], var.java_version)
error_message = "The Java version is not supported, it must be either '17' or '11'."
}
}

variable "resources_limits_cpu" {
Expand Down

0 comments on commit 9c8169c

Please sign in to comment.