Skip to content

Commit

Permalink
feat: configure ingester replication factor (#59)
Browse files Browse the repository at this point in the history
* feat: configure ingester replication factor

* docs(terraform-docs): generate docs and write to README.adoc

* fix: terraform format correction

* fix: correct syntax

* docs(terraform-docs): generate docs and write to README.adoc

---------

Co-authored-by: omohammed95 <omohammed95@users.noreply.github.com>
  • Loading branch information
omohammed95 and omohammed95 authored May 24, 2023
1 parent dc3f025 commit 8d00917
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 209 deletions.
54 changes: 4 additions & 50 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ 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_htpasswd]] <<provider_htpasswd,htpasswd>> (>= 1)
Expand All @@ -27,6 +25,8 @@ The following providers are used by this module:

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

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

=== Resources

The following resources are used by this module:
Expand Down Expand Up @@ -73,7 +73,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v2.0.2"`
Default: `"v2.1.0"`

==== [[input_namespace]] <<input_namespace,namespace>>

Expand Down Expand Up @@ -155,28 +155,6 @@ Type: `bool`

Default: `false`

==== [[input_ingester_config]] <<input_ingester_config,ingester_config>>

Description: Configuration of ingester to have more replicas

Type:
[source,hcl]
----
object({
replicas = number
maxUnavailable = number
})
----

Default:
[source,json]
----
{
"maxUnavailable": null,
"replicas": 1
}
----

=== Outputs

The following outputs are exported:
Expand Down Expand Up @@ -254,7 +232,7 @@ Description: n/a
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v2.0.2"`
|`"v2.1.0"`
|no

|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -329,30 +307,6 @@ object({
|`false`
|no

|[[input_ingester_config]] <<input_ingester_config,ingester_config>>
|Configuration of ingester to have more replicas
|

[source]
----
object({
replicas = number
maxUnavailable = number
})
----

|

[source]
----
{
"maxUnavailable": null,
"replicas": 1
}
----

|no

|===

= Outputs
Expand Down
50 changes: 2 additions & 48 deletions aks/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v2.0.2"`
Default: `"v2.1.0"`

==== [[input_namespace]] <<input_namespace,namespace>>

Expand Down Expand Up @@ -175,28 +175,6 @@ Type: `bool`

Default: `false`

==== [[input_ingester_config]] <<input_ingester_config,ingester_config>>

Description: Configuration of ingester to have more replicas

Type:
[source,hcl]
----
object({
replicas = number
maxUnavailable = number
})
----

Default:
[source,json]
----
{
"maxUnavailable": null,
"replicas": 1
}
----

=== Outputs

The following outputs are exported:
Expand Down Expand Up @@ -294,7 +272,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v2.0.2"`
|`"v2.1.0"`
|no

|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -369,30 +347,6 @@ object({
|`false`
|no

|[[input_ingester_config]] <<input_ingester_config,ingester_config>>
|Configuration of ingester to have more replicas
|

[source]
----
object({
replicas = number
maxUnavailable = number
})
----

|

[source]
----
{
"maxUnavailable": null,
"replicas": 1
}
----

|no

|===

= Outputs
Expand Down
50 changes: 2 additions & 48 deletions eks/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v2.0.2"`
Default: `"v2.1.0"`

==== [[input_namespace]] <<input_namespace,namespace>>

Expand Down Expand Up @@ -157,28 +157,6 @@ Type: `bool`

Default: `false`

==== [[input_ingester_config]] <<input_ingester_config,ingester_config>>

Description: Configuration of ingester to have more replicas

Type:
[source,hcl]
----
object({
replicas = number
maxUnavailable = number
})
----

Default:
[source,json]
----
{
"maxUnavailable": null,
"replicas": 1
}
----

=== Outputs

The following outputs are exported:
Expand Down Expand Up @@ -254,7 +232,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v2.0.2"`
|`"v2.1.0"`
|no

|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -329,30 +307,6 @@ object({
|`false`
|no

|[[input_ingester_config]] <<input_ingester_config,ingester_config>>
|Configuration of ingester to have more replicas
|

[source]
----
object({
replicas = number
maxUnavailable = number
})
----

|

[source]
----
{
"maxUnavailable": null,
"replicas": 1
}
----

|no

|===

= Outputs
Expand Down
50 changes: 2 additions & 48 deletions kind/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v2.0.2"`
Default: `"v2.1.0"`

==== [[input_namespace]] <<input_namespace,namespace>>

Expand Down Expand Up @@ -158,28 +158,6 @@ Type: `bool`

Default: `false`

==== [[input_ingester_config]] <<input_ingester_config,ingester_config>>

Description: Configuration of ingester to have more replicas

Type:
[source,hcl]
----
object({
replicas = number
maxUnavailable = number
})
----

Default:
[source,json]
----
{
"maxUnavailable": null,
"replicas": 1
}
----

=== Outputs

The following outputs are exported:
Expand Down Expand Up @@ -256,7 +234,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v2.0.2"`
|`"v2.1.0"`
|no

|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -331,30 +309,6 @@ object({
|`false`
|no

|[[input_ingester_config]] <<input_ingester_config,ingester_config>>
|Configuration of ingester to have more replicas
|

[source]
----
object({
replicas = number
maxUnavailable = number
})
----

|

[source]
----
{
"maxUnavailable": null,
"replicas": 1
}
----

|no

|===

= Outputs
Expand Down
10 changes: 8 additions & 2 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ locals {
persistence = {
enabled = true
}
replicas = "${var.ingester_config.replicas}"
maxUnavailable = "${var.ingester_config.maxUnavailable}"
replicas = 3
maxUnavailable = 1
affinity = ""
}
loki = {
structuredConfig = {
Expand All @@ -70,6 +71,11 @@ locals {
retention_enabled = false
}
ingester = {
lifecycler = {
ring = {
replication_factor = 3
}
}
wal = {
replay_memory_ceiling = "500MB"
flush_on_shutdown = true
Expand Down
13 changes: 0 additions & 13 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,3 @@ variable "enable_filebeat" {
type = bool
default = false
}

variable "ingester_config" {
description = "Configuration of ingester to have more replicas"
type = object({
replicas = number
maxUnavailable = number
})
default = {
replicas = 1
maxUnavailable = null
}
}

0 comments on commit 8d00917

Please sign in to comment.