diff --git a/README.adoc b/README.adoc index a2aa1d96..d76079fe 100644 --- a/README.adoc +++ b/README.adoc @@ -38,12 +38,12 @@ The following providers are used by this module: - [[provider_null]] <> (>= 3) +- [[provider_argocd]] <> (>= 5) + - [[provider_random]] <> (>= 3) - [[provider_utils]] <> (>= 1) -- [[provider_argocd]] <> (>= 5) - === Resources The following resources are used by this module: @@ -114,7 +114,7 @@ Description: Override of target revision of the application chart. Type: `string` -Default: `"v4.0.0"` +Default: `"v4.1.0"` ==== [[input_cluster_issuer]] <> @@ -301,10 +301,10 @@ Description: ID to pass other modules in order to refer to this module as a depe [cols="a,a",options="header,autowidth"] |=== |Name |Version +|[[provider_null]] <> |>= 3 |[[provider_random]] <> |>= 3 |[[provider_utils]] <> |>= 1 |[[provider_argocd]] <> |>= 5 -|[[provider_null]] <> |>= 3 |=== = Resources @@ -365,7 +365,7 @@ Description: ID to pass other modules in order to refer to this module as a depe |[[input_target_revision]] <> |Override of target revision of the application chart. |`string` -|`"v4.0.0"` +|`"v4.1.0"` |no |[[input_cluster_issuer]] <> diff --git a/aks/README.adoc b/aks/README.adoc index 1f3d1ef1..45cffe14 100644 --- a/aks/README.adoc +++ b/aks/README.adoc @@ -318,7 +318,7 @@ Description: Override of target revision of the application chart. Type: `string` -Default: `"v4.0.0"` +Default: `"v4.1.0"` ==== [[input_cluster_issuer]] <> @@ -592,7 +592,7 @@ object({ |[[input_target_revision]] <> |Override of target revision of the application chart. |`string` -|`"v4.0.0"` +|`"v4.1.0"` |no |[[input_cluster_issuer]] <> diff --git a/eks/README.adoc b/eks/README.adoc index 69ca861a..362435d6 100644 --- a/eks/README.adoc +++ b/eks/README.adoc @@ -242,16 +242,36 @@ The following requirements are needed by this module: - [[requirement_utils]] <> (>= 1) +=== Providers + +The following providers are used by this module: + +- [[provider_aws]] <> + === Modules The following Modules are called: +==== [[module_iam_assumable_role_thanos]] <> + +Source: terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc + +Version: ~> 5.0 + ==== [[module_thanos]] <> Source: ../ Version: +=== Resources + +The following resources are used by this module: + +- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy[aws_iam_policy.thanos] (resource) +- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document[aws_iam_policy_document.thanos] (data source) +- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/s3_bucket[aws_s3_bucket.thanos] (data source) + === Required Inputs The following input variables are required: @@ -260,13 +280,16 @@ The following input variables are required: Description: AWS S3 bucket configuration values for the bucket where the archived metrics will be stored. +An IAM role is required to give the Thanos components read and write access to the S3 bucket. You can create this role yourself or let the module create it for you. If you want the module to create the role, you need to provide the OIDC issuer's URL for the EKS cluster. If you create the role yourself, you need to provide the ARN of the IAM role you created. + Type: [source,hcl] ---- object({ - bucket_id = string - region = string - iam_role_arn = string + bucket_id = string + create_role = bool + iam_role_arn = optional(string, null) + cluster_oidc_issuer_url = optional(string, null) }) ---- @@ -324,7 +347,7 @@ Description: Override of target revision of the application chart. Type: `string` -Default: `"v4.0.0"` +Default: `"v4.1.0"` ==== [[input_cluster_issuer]] <> @@ -390,6 +413,88 @@ Type: `any` Default: `{}` +==== [[input_resources]] <> + +Description: Resource limits and requests for Thanos' components. Follow the style on https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/[official documentation] to understand the format of the values. + +IMPORTANT: These are not production values. You should always adjust them to your needs. + +Type: +[source,hcl] +---- +object({ + + query = optional(object({ + requests = optional(object({ + cpu = optional(string, "250m") + memory = optional(string, "512Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + query_frontend = optional(object({ + requests = optional(object({ + cpu = optional(string, "250m") + memory = optional(string, "256Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + bucketweb = optional(object({ + requests = optional(object({ + cpu = optional(string, "50m") + memory = optional(string, "128Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "128Mi") + }), {}) + }), {}) + + compactor = optional(object({ + requests = optional(object({ + cpu = optional(string, "250m") + memory = optional(string, "256Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + storegateway = optional(object({ + requests = optional(object({ + cpu = optional(string, "250m") + memory = optional(string, "512Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + redis = optional(object({ + requests = optional(object({ + cpu = optional(string, "200m") + memory = optional(string, "256Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + }) +---- + +Default: `{}` + ==== [[input_enable_service_monitor]] <> Description: Boolean to enable the deployment of a service monitor for Prometheus. This also enables the deployment of default Prometheus rules and Grafana dashboards, which are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.yaml[here]. @@ -424,14 +529,33 @@ Description: ID to pass other modules in order to refer to this module as a depe |[[requirement_utils]] <> |>= 1 |=== += Providers + +[cols="a,a",options="header,autowidth"] +|=== +|Name |Version +|[[provider_aws]] <> |n/a +|=== + = Modules [cols="a,a,a",options="header,autowidth"] |=== |Name |Source |Version +|[[module_iam_assumable_role_thanos]] <> |terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc |~> 5.0 |[[module_thanos]] <> |../ | |=== += Resources + +[cols="a,a",options="header,autowidth"] +|=== +|Name |Type +|https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy[aws_iam_policy.thanos] |resource +|https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document[aws_iam_policy_document.thanos] |data source +|https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/s3_bucket[aws_s3_bucket.thanos] |data source +|=== + = Inputs [cols="a,a,a,a,a",options="header,autowidth"] @@ -439,14 +563,18 @@ Description: ID to pass other modules in order to refer to this module as a depe |Name |Description |Type |Default |Required |[[input_metrics_storage]] <> |AWS S3 bucket configuration values for the bucket where the archived metrics will be stored. + +An IAM role is required to give the Thanos components read and write access to the S3 bucket. You can create this role yourself or let the module create it for you. If you want the module to create the role, you need to provide the OIDC issuer's URL for the EKS cluster. If you create the role yourself, you need to provide the ARN of the IAM role you created. + | [source] ---- object({ - bucket_id = string - region = string - iam_role_arn = string + bucket_id = string + create_role = bool + iam_role_arn = optional(string, null) + cluster_oidc_issuer_url = optional(string, null) }) ---- @@ -492,7 +620,7 @@ object({ |[[input_target_revision]] <> |Override of target revision of the application chart. |`string` -|`"v4.0.0"` +|`"v4.1.0"` |no |[[input_cluster_issuer]] <> @@ -551,6 +679,89 @@ object({ |`{}` |no +|[[input_resources]] <> +|Resource limits and requests for Thanos' components. Follow the style on https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/[official documentation] to understand the format of the values. + +IMPORTANT: These are not production values. You should always adjust them to your needs. + +| + +[source] +---- +object({ + + query = optional(object({ + requests = optional(object({ + cpu = optional(string, "250m") + memory = optional(string, "512Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + query_frontend = optional(object({ + requests = optional(object({ + cpu = optional(string, "250m") + memory = optional(string, "256Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + bucketweb = optional(object({ + requests = optional(object({ + cpu = optional(string, "50m") + memory = optional(string, "128Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "128Mi") + }), {}) + }), {}) + + compactor = optional(object({ + requests = optional(object({ + cpu = optional(string, "250m") + memory = optional(string, "256Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + storegateway = optional(object({ + requests = optional(object({ + cpu = optional(string, "250m") + memory = optional(string, "512Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + redis = optional(object({ + requests = optional(object({ + cpu = optional(string, "200m") + memory = optional(string, "256Mi") + }), {}) + limits = optional(object({ + cpu = optional(string) + memory = optional(string, "512Mi") + }), {}) + }), {}) + + }) +---- + +|`{}` +|no + |[[input_enable_service_monitor]] <> |Boolean to enable the deployment of a service monitor for Prometheus. This also enables the deployment of default Prometheus rules and Grafana dashboards, which are embedded inside the chart templates and are taken from the official Thanos examples, available https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.yaml[here]. |`bool` diff --git a/kind/README.adoc b/kind/README.adoc index eeae0d83..feea298e 100644 --- a/kind/README.adoc +++ b/kind/README.adoc @@ -245,7 +245,7 @@ Description: Override of target revision of the application chart. Type: `string` -Default: `"v4.0.0"` +Default: `"v4.1.0"` ==== [[input_cluster_issuer]] <> @@ -497,7 +497,7 @@ object({ |[[input_target_revision]] <> |Override of target revision of the application chart. |`string` -|`"v4.0.0"` +|`"v4.1.0"` |no |[[input_cluster_issuer]] <> diff --git a/sks/README.adoc b/sks/README.adoc index 2300f1a9..eb765b89 100644 --- a/sks/README.adoc +++ b/sks/README.adoc @@ -194,7 +194,7 @@ Description: Override of target revision of the application chart. Type: `string` -Default: `"v4.0.0"` +Default: `"v4.1.0"` ==== [[input_cluster_issuer]] <> @@ -451,7 +451,7 @@ object({ |[[input_target_revision]] <> |Override of target revision of the application chart. |`string` -|`"v4.0.0"` +|`"v4.1.0"` |no |[[input_cluster_issuer]] <>