Skip to content

Commit

Permalink
Merge pull request #24 from AxonIQ/23-make-possible-to-pass-a-axonser…
Browse files Browse the repository at this point in the history
…verproperties-file

Make possible to pass a axonserverproperties file
  • Loading branch information
checco authored Aug 12, 2024
2 parents ad29164 + 7a86276 commit 1496b21
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,18 @@

```terraform
module "as_demo" {
source = "[email protected]:AxonIQ/terraform-axonserver-k8s.git?ref=v1.8"
source = "[email protected]:AxonIQ/terraform-axonserver-k8s.git?ref=v1.9"
axonserver_release = "2024.0.4"
java_version = "11"
axonserver_release = "2024.1.0"
java_version = "17"
nodes_number = 3
cluster_name = "axonserver"
public_domain = "axoniq.net"
namespace = "axonserver"
axonserver_license_path = file("${path.module}/axoniq.license")
axonserver_properties = file("${path.module}/axonserver.properties")
}
```

Expand All @@ -38,12 +39,13 @@ module "as_demo" {

| Name | Description | Type | Default | Required |
|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------|----------------------------------|:--------:|
| <a name="input_axonserver_release"></a> [axonserver\_release](#input\_axonserver\_release) | Axon Server Release namespace. | `string` | `"2024.0.4"` | no |
| <a name="input_axonserver_release"></a> [axonserver\_release](#input\_axonserver\_release) | Axon Server Release namespace. | `string` | `"2024.1.0"` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Kubernetes cluster namespace. | `string` | `"axonserver"` | yes |
| <a name="input_cluster_name"></a> [cluster\_name](#input\_cluster\_name) | Axon Server cluster name. | `string` | `""` | yes |
| <a name="input_nodes_number"></a> [nodes\_number](#input\_nodes\_number) | The number of nodes deployed inside the cluster. | `number` | `1` | yes |
| <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_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_resources_limits_cpu"></a> [resources\_limits\_cpu](#input\_resources\_limits\_cpu) | spec.container.resources.limits.cpu | `number` | `"1"` | no |
Expand Down
6 changes: 5 additions & 1 deletion configmap.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
locals {
axonserver_properties = var.axonserver_properties == "" ? data.template_file.axonserver_properties.rendered : var.axonserver_properties
}

data "template_file" "axonserver_properties" {
template = file("${path.module}/conf/axonserver.properties.tmpl")

Expand All @@ -17,6 +21,6 @@ resource "kubernetes_config_map" "axonserver_properties" {
}

data = {
"axonserver.properties" = data.template_file.axonserver_properties.rendered
"axonserver.properties" = local.axonserver_properties
}
}
8 changes: 7 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
variable "axonserver_release" {
description = "Axonserver Release"
type = string
default = "2024.0.4"
default = "2024.1.0"
}

variable "namespace" {
Expand Down Expand Up @@ -94,6 +94,12 @@ variable "plugins_storage" {
default = "1Gi"
}

variable "axonserver_properties" {
description = "Path to axonserver.properties file"
type = string
default = ""
}

variable "devmode_enabled" {
description = "Axon Server devmode"
type = bool
Expand Down

0 comments on commit 1496b21

Please sign in to comment.