Skip to content

Commit

Permalink
docs(terraform-docs): generate docs and write to README.adoc
Browse files Browse the repository at this point in the history
  • Loading branch information
lentidas committed Apr 23, 2024
1 parent 485bd00 commit f6afb97
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 19 deletions.
10 changes: 5 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ The following requirements are needed by this module:

The following providers are used by this module:

- [[provider_null]] <<provider_null,null>> (>= 3)

- [[provider_random]] <<provider_random,random>> (>= 3)

- [[provider_utils]] <<provider_utils,utils>> (>= 1)

- [[provider_argocd]] <<provider_argocd,argocd>> (>= 5)

- [[provider_null]] <<provider_null,null>> (>= 3)

=== Resources

The following resources are used by this module:
Expand Down Expand Up @@ -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]] <<input_cluster_issuer,cluster_issuer>>

Expand Down Expand Up @@ -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]] <<provider_null,null>> |>= 3
|[[provider_random]] <<provider_random,random>> |>= 3
|[[provider_utils]] <<provider_utils,utils>> |>= 1
|[[provider_argocd]] <<provider_argocd,argocd>> |>= 5
|[[provider_null]] <<provider_null,null>> |>= 3
|===
= Resources
Expand Down Expand Up @@ -365,7 +365,7 @@ Description: ID to pass other modules in order to refer to this module as a depe
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v4.0.0"`
|`"v4.1.0"`
|no
|[[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>
Expand Down
4 changes: 2 additions & 2 deletions aks/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]] <<input_cluster_issuer,cluster_issuer>>

Expand Down Expand Up @@ -592,7 +592,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v4.0.0"`
|`"v4.1.0"`
|no
|[[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>
Expand Down
227 changes: 219 additions & 8 deletions eks/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -242,16 +242,36 @@ The following requirements are needed by this module:

- [[requirement_utils]] <<requirement_utils,utils>> (>= 1)

=== Providers

The following providers are used by this module:

- [[provider_aws]] <<provider_aws,aws>>

=== Modules

The following Modules are called:

==== [[module_iam_assumable_role_thanos]] <<module_iam_assumable_role_thanos,iam_assumable_role_thanos>>

Source: terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc

Version: ~> 5.0

==== [[module_thanos]] <<module_thanos,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:
Expand All @@ -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)
})
----

Expand Down Expand Up @@ -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]] <<input_cluster_issuer,cluster_issuer>>

Expand Down Expand Up @@ -390,6 +413,88 @@ Type: `any`

Default: `{}`

==== [[input_resources]] <<input_resources,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]] <<input_enable_service_monitor,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].
Expand Down Expand Up @@ -424,29 +529,52 @@ Description: ID to pass other modules in order to refer to this module as a depe
|[[requirement_utils]] <<requirement_utils,utils>> |>= 1
|===
= Providers
[cols="a,a",options="header,autowidth"]
|===
|Name |Version
|[[provider_aws]] <<provider_aws,aws>> |n/a
|===
= Modules
[cols="a,a,a",options="header,autowidth"]
|===
|Name |Source |Version
|[[module_iam_assumable_role_thanos]] <<module_iam_assumable_role_thanos,iam_assumable_role_thanos>> |terraform-aws-modules/iam/aws//modules/iam-assumable-role-with-oidc |~> 5.0
|[[module_thanos]] <<module_thanos,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"]
|===
|Name |Description |Type |Default |Required
|[[input_metrics_storage]] <<input_metrics_storage,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)
})
----
Expand Down Expand Up @@ -492,7 +620,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v4.0.0"`
|`"v4.1.0"`
|no
|[[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>
Expand Down Expand Up @@ -551,6 +679,89 @@ object({
|`{}`
|no
|[[input_resources]] <<input_resources,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]] <<input_enable_service_monitor,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`
Expand Down
4 changes: 2 additions & 2 deletions kind/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]] <<input_cluster_issuer,cluster_issuer>>

Expand Down Expand Up @@ -497,7 +497,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v4.0.0"`
|`"v4.1.0"`
|no
|[[input_cluster_issuer]] <<input_cluster_issuer,cluster_issuer>>
Expand Down
Loading

0 comments on commit f6afb97

Please sign in to comment.