Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions README.md

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ module "ingress_controller_nginx" {
])
}

module "envoy_gateway" {
count = var.envoy_gateway_enabled ? 1 : 0
source = "./modules/envoy-gateway"

chart_name = var.envoy_gateway_chart_name
chart_repository = var.envoy_gateway_chart_repository
chart_version = var.envoy_gateway_chart_version
create_namespace = var.envoy_gateway_create_namespace
namespace = var.envoy_gateway_namespace
release_name = var.envoy_gateway_release_name
settings = var.envoy_gateway_settings
timeout = var.envoy_gateway_timeout
values = var.envoy_gateway_values
}

module "cert_manager" {
count = var.cert_manager_enabled ? 1 : 0
source = "./modules/cert-manager"
Expand Down Expand Up @@ -438,6 +453,9 @@ module "streamx_operator" {
imagePullSecrets = local.streamx_operator_image_pull_secret_name == null ? [] : [
{ name = local.streamx_operator_image_pull_secret_name }
]
image = {
tag = "2.0.3-jvm"
}
}
mesh = {
monitoring = {
Expand All @@ -446,6 +464,11 @@ module "streamx_operator" {
endpoint = var.streamx_operator_monitoring_traces_endpoint
}
}
defaultGateway = {
className = var.streamx_operator_default_gateway_class_name
domain = var.streamx_operator_default_gateway_domain
certificateRef = var.streamx_operator_default_gateway_certificate_ref
}
}
federation = {
# Disable Mesh Federation by default
Expand Down
52 changes: 52 additions & 0 deletions modules/envoy-gateway/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!-- BEGIN_TF_DOCS -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0.0 |
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.17.0, < 3.0.0 |
| <a name="requirement_kubectl"></a> [kubectl](#requirement\_kubectl) | >= 1.14.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_helm"></a> [helm](#provider\_helm) | >= 2.17.0, < 3.0.0 |
| <a name="provider_kubectl"></a> [kubectl](#provider\_kubectl) | >= 1.14.0 |
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | n/a |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [helm_release.this](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [kubectl_manifest.gateway_class](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubernetes_service_v1.gateway](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/data-sources/service_v1) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_atomic"></a> [atomic](#input\_atomic) | Purge the chart on a failed installation. | `bool` | `true` | no |
| <a name="input_chart_name"></a> [chart\_name](#input\_chart\_name) | The name of the Helm chart to install | `string` | `"oci://docker.io/envoyproxy/gateway-helm"` | no |
| <a name="input_chart_repository"></a> [chart\_repository](#input\_chart\_repository) | The repository containing the Helm chart to install | `string` | `null` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | The version of the Helm chart to install | `string` | `"v1.6.1"` | no |
| <a name="input_cleanup_on_fail"></a> [cleanup\_on\_fail](#input\_cleanup\_on\_fail) | Allow deletion of new resources created in this upgrade when upgrade fails | `bool` | `true` | no |
| <a name="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace) | Create a namespace for the deployment. Defaults to "true". | `bool` | `true` | no |
| <a name="input_force_defaults_for_null_variables"></a> [force\_defaults\_for\_null\_variables](#input\_force\_defaults\_for\_null\_variables) | Enables forcing default variable values when the variable value passed to the module is null. | `bool` | `true` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | The namespace used for the deployment | `string` | `"envoy-gateway-system"` | no |
| <a name="input_release_name"></a> [release\_name](#input\_release\_name) | The name of the helm release | `string` | `"envoy-gateway"` | no |
| <a name="input_settings"></a> [settings](#input\_settings) | Settings which will be passed to the Helm chart values | `map(any)` | `{}` | no |
| <a name="input_timeout"></a> [timeout](#input\_timeout) | Time in seconds to wait for any individual kubernetes operation | `number` | `300` | no |
| <a name="input_values"></a> [values](#input\_values) | A list of values in raw YAML to be applied to the helm release. Merges with the settings input, can also be used with the `file()` function, i.e. `file("my/values.yaml")`. | `list` | `[]` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_load_balancer_ip"></a> [load\_balancer\_ip](#output\_load\_balancer\_ip) | IP of the Load Balancer |
<!-- END_TF_DOCS -->
6 changes: 6 additions & 0 deletions modules/envoy-gateway/gateway-class.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: gateway.networking.k8s.io/v1
kind: GatewayClass
metadata:
name: envoy
spec:
controllerName: gateway.envoyproxy.io/gatewayclass-controller
79 changes: 79 additions & 0 deletions modules/envoy-gateway/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Copyright 2025 Dynamic Solutions Sp. z o.o. sp.k.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

locals {
default_atomic = true
default_chart_name = "oci://docker.io/envoyproxy/gateway-helm"
default_chart_repository = null
default_chart_version = "v1.6.1"
default_cleanup_on_fail = true
default_create_namespace = true
default_namespace = "envoy-gateway-system"
default_release_name = "envoy-gateway"
default_settings = {}
default_timeout = 300
default_values = []

atomic = var.force_defaults_for_null_variables && var.atomic == null ? local.default_atomic : var.atomic
chart_name = var.force_defaults_for_null_variables && var.chart_name == null ? local.default_chart_name : var.chart_name
chart_repository = var.force_defaults_for_null_variables && var.chart_repository == null ? local.default_chart_repository : var.chart_repository
chart_version = var.force_defaults_for_null_variables && var.chart_version == null ? local.default_chart_version : var.chart_version
cleanup_on_fail = var.force_defaults_for_null_variables && var.cleanup_on_fail == null ? local.default_cleanup_on_fail : var.cleanup_on_fail
create_namespace = var.force_defaults_for_null_variables && var.create_namespace == null ? local.default_create_namespace : var.create_namespace
namespace = var.force_defaults_for_null_variables && var.namespace == null ? local.default_namespace : var.namespace
release_name = var.force_defaults_for_null_variables && var.release_name == null ? local.default_release_name : var.release_name
settings = var.force_defaults_for_null_variables && var.settings == null ? local.default_settings : var.settings
timeout = var.force_defaults_for_null_variables && var.timeout == null ? local.default_timeout : var.timeout
values = var.force_defaults_for_null_variables && var.values == null ? local.default_values : var.values
}

resource "helm_release" "this" {
atomic = local.atomic
chart = local.chart_name
cleanup_on_fail = local.cleanup_on_fail
create_namespace = local.create_namespace
name = local.release_name
namespace = local.namespace
repository = local.chart_repository
timeout = local.timeout
version = local.chart_version
values = local.values

dynamic "set" {
for_each = local.settings
content {
name = set.key
value = set.value
}
}
}

resource "kubectl_manifest" "gateway_class" {
yaml_body = file("${path.module}/gateway-class.yaml")
override_namespace = local.namespace

depends_on = [helm_release.this]
}

data "kubernetes_service_v1" "gateway" {
metadata {
name = "envoy-gateway"
namespace = local.namespace
}

depends_on = [
helm_release.this
]
}
23 changes: 23 additions & 0 deletions modules/envoy-gateway/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2025 Dynamic Solutions Sp. z o.o. sp.k.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

locals {
load_balancer_ip = data.kubernetes_service_v1.gateway.status.0.load_balancer.0.ingress.0.ip
}

output "load_balancer_ip" {
description = "IP of the Load Balancer"
value = local.load_balancer_ip
}
85 changes: 85 additions & 0 deletions modules/envoy-gateway/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Copyright 2025 Dynamic Solutions Sp. z o.o. sp.k.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

variable "force_defaults_for_null_variables" {
default = true
description = "Enables forcing default variable values when the variable value passed to the module is null."
type = bool
}

variable "atomic" {
default = true
description = "Purge the chart on a failed installation."
type = bool
}

variable "chart_name" {
default = "oci://docker.io/envoyproxy/gateway-helm"
description = "The name of the Helm chart to install"
type = string
}

variable "chart_repository" {
default = null
description = "The repository containing the Helm chart to install"
type = string
}

variable "chart_version" {
default = "v1.6.1"
description = "The version of the Helm chart to install"
type = string
}

variable "cleanup_on_fail" {
default = true
description = "Allow deletion of new resources created in this upgrade when upgrade fails"
type = bool
}

variable "create_namespace" {
default = true
description = "Create a namespace for the deployment. Defaults to \"true\"."
type = bool
}

variable "namespace" {
default = "envoy-gateway-system"
description = "The namespace used for the deployment"
type = string
}

variable "release_name" {
default = "envoy-gateway"
description = "The name of the helm release"
type = string
}

variable "settings" {
default = {}
description = "Settings which will be passed to the Helm chart values"
type = map(any)
}

variable "timeout" {
default = 300
description = "Time in seconds to wait for any individual kubernetes operation"
type = number
}

variable "values" {
default = []
description = "A list of values in raw YAML to be applied to the helm release. Merges with the settings input, can also be used with the `file()` function, i.e. `file(\"my/values.yaml\")`."
}
28 changes: 28 additions & 0 deletions modules/envoy-gateway/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2025 Dynamic Solutions Sp. z o.o. sp.k.

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

terraform {
required_version = ">= 1.0.0"
required_providers {
helm = {
source = "hashicorp/helm"
version = ">= 2.17.0, < 3.0.0"
}
kubectl = {
source = "gavinbunney/kubectl"
version = ">= 1.14.0"
}
}
}
1 change: 1 addition & 0 deletions modules/monitoring-kaap-pod-monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ No modules.
| [kubectl_manifest.kaap_bookkeeper_pod_monitor](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.kaap_broker_pod_monitor](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.kaap_operator_pod_monitor](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.kaap_proxy_pod_monitor](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.kaap_zookeeper_pod_monitor](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |

## Inputs
Expand Down
1 change: 1 addition & 0 deletions modules/monitoring-loki-grafana-dashboards/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_force_defaults_for_null_variables"></a> [force\_defaults\_for\_null\_variables](#input\_force\_defaults\_for\_null\_variables) | Enables forcing default variable values when the variable value passed to the module is null. | `bool` | `true` | no |
| <a name="input_multicluster"></a> [multicluster](#input\_multicluster) | If false Cluster variable in dashboards is hidden | `bool` | `false` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | The namespace used for Grafana deployment | `string` | `"prometheus-stack"` | no |

## Outputs
Expand Down
2 changes: 1 addition & 1 deletion modules/monitoring-opentelemetry-collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ No modules.
| <a name="input_atomic"></a> [atomic](#input\_atomic) | Purge the chart on a failed installation. Default's to "true". | `bool` | `true` | no |
| <a name="input_chart_name"></a> [chart\_name](#input\_chart\_name) | The name of the Helm chart to install | `string` | `"opentelemetry-collector"` | no |
| <a name="input_chart_repository"></a> [chart\_repository](#input\_chart\_repository) | The repository containing the Helm chart to install | `string` | `"https://open-telemetry.github.io/opentelemetry-helm-charts"` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | The version of the Helm chart to install | `string` | `"0.117.0"` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | The version of the Helm chart to install | `string` | `"0.139.0"` | no |
| <a name="input_cleanup_on_fail"></a> [cleanup\_on\_fail](#input\_cleanup\_on\_fail) | Allow deletion of new resources created in this upgrade when upgrade fails | `bool` | `true` | no |
| <a name="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace) | Create a namespace for the deployment. Defaults to "true". | `bool` | `true` | no |
| <a name="input_force_defaults_for_null_variables"></a> [force\_defaults\_for\_null\_variables](#input\_force\_defaults\_for\_null\_variables) | Enables forcing default variable values when the variable value passed to the module is null. | `bool` | `true` | no |
Expand Down
2 changes: 1 addition & 1 deletion modules/monitoring-opentelemetry-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ No modules.
| <a name="input_atomic"></a> [atomic](#input\_atomic) | Purge the chart on a failed installation. Default's to "true". | `bool` | `true` | no |
| <a name="input_chart_name"></a> [chart\_name](#input\_chart\_name) | The name of the Helm chart to install | `string` | `"opentelemetry-operator"` | no |
| <a name="input_chart_repository"></a> [chart\_repository](#input\_chart\_repository) | The repository containing the Helm chart to install | `string` | `"https://open-telemetry.github.io/opentelemetry-helm-charts"` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | The version of the Helm chart to install | `string` | `"0.80.2"` | no |
| <a name="input_chart_version"></a> [chart\_version](#input\_chart\_version) | The version of the Helm chart to install | `string` | `"0.99.0"` | no |
| <a name="input_cleanup_on_fail"></a> [cleanup\_on\_fail](#input\_cleanup\_on\_fail) | Allow deletion of new resources created in this upgrade when upgrade fails | `bool` | `true` | no |
| <a name="input_create_namespace"></a> [create\_namespace](#input\_create\_namespace) | Create a namespace for the deployment. Defaults to "true". | `bool` | `true` | no |
| <a name="input_force_defaults_for_null_variables"></a> [force\_defaults\_for\_null\_variables](#input\_force\_defaults\_for\_null\_variables) | Enables forcing default variable values when the variable value passed to the module is null. | `bool` | `true` | no |
Expand Down
1 change: 1 addition & 0 deletions modules/monitoring-streamx-grafana-dashboards/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ No modules.
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_force_defaults_for_null_variables"></a> [force\_defaults\_for\_null\_variables](#input\_force\_defaults\_for\_null\_variables) | Enables forcing default variable values when the variable value passed to the module is null. | `bool` | `true` | no |
| <a name="input_multicluster"></a> [multicluster](#input\_multicluster) | If false Cluster variable in dashboards is hidden | `bool` | `false` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | The namespace used for the deployment | `string` | `"prometheus-stack"` | no |

## Outputs
Expand Down
1 change: 1 addition & 0 deletions modules/monitoring-streamx-pod-monitor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ No modules.

| Name | Type |
|------|------|
| [kubectl_manifest.streamx_operator_pod_monitor](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |
| [kubectl_manifest.streamx_pod_monitor](https://registry.terraform.io/providers/gavinbunney/kubectl/latest/docs/resources/manifest) | resource |

## Inputs
Expand Down
Loading