Skip to content

Commit

Permalink
Revert "fix: remove filebeat and change group on Traefik templates (#101
Browse files Browse the repository at this point in the history
)"

This reverts commit f7d0d56.
  • Loading branch information
lentidas authored Nov 10, 2023
1 parent f7d0d56 commit 9839b6f
Show file tree
Hide file tree
Showing 15 changed files with 121 additions and 23 deletions.
18 changes: 16 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v5.2.0"`
Default: `"v5.0.0"`

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

Expand Down Expand Up @@ -152,6 +152,14 @@ object({

Default: `null`

==== [[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>

Description: n/a

Type: `bool`

Default: `false`

==== [[input_retention]] <<input_retention,retention>>

Description: Logs retention period. To deactivate retention, pass 0s.
Expand Down Expand Up @@ -243,7 +251,7 @@ Description: Credentials to access the Loki ingress, if activated.
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v5.2.0"`
|`"v5.0.0"`
|no

|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -306,6 +314,12 @@ object({
|`null`
|no

|[[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>
|n/a
|`bool`
|`false`
|no

|[[input_retention]] <<input_retention,retention>>
|Logs retention period. To deactivate retention, pass 0s.
|`string`
Expand Down
18 changes: 16 additions & 2 deletions aks/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v5.2.0"`
Default: `"v5.0.0"`

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

Expand Down Expand Up @@ -167,6 +167,14 @@ object({

Default: `null`

==== [[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>

Description: n/a

Type: `bool`

Default: `false`

==== [[input_retention]] <<input_retention,retention>>

Description: Logs retention period. To deactivate retention, pass 0s.
Expand Down Expand Up @@ -278,7 +286,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v5.2.0"`
|`"v5.0.0"`
|no

|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -341,6 +349,12 @@ object({
|`null`
|no

|[[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>
|n/a
|`bool`
|`false`
|no

|[[input_retention]] <<input_retention,retention>>
|Logs retention period. To deactivate retention, pass 0s.
|`string`
Expand Down
5 changes: 3 additions & 2 deletions aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ module "loki-stack" {
app_autosync = var.app_autosync
dependency_ids = var.dependency_ids

retention = var.retention
ingress = var.ingress
retention = var.retention
ingress = var.ingress
enable_filebeat = var.enable_filebeat

helm_values = concat(local.helm_values, var.helm_values)
}
7 changes: 5 additions & 2 deletions charts/loki-microservice/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ dependencies:
- name: promtail
repository: https://grafana.github.io/helm-charts
version: 6.15.3
digest: sha256:9be75b5f113d376b166deba73b98639c502dfb0f80b0dcec677cf2f3f62bcd0f
generated: "2023-11-03T13:55:19.507104539+01:00"
- name: filebeat
repository: https://helm.elastic.co
version: 7.17.3
digest: sha256:02ff38d56014866298b0d3aa46b64df45c2c0f5d1b85368f2deb5ac16df9f76d
generated: "2023-11-03T07:01:54.656363242Z"
4 changes: 4 additions & 0 deletions charts/loki-microservice/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ dependencies:
- name: promtail
repository: https://grafana.github.io/helm-charts
version: 6.15.3
- condition: filebeat.enabled
name: filebeat
repository: https://helm.elastic.co
version: 7.17.3
description: |
This chart installs loki-distributed.
Loki is a log aggregation system made by Grafana Labs, and inspired by Prometheus.
Expand Down
Binary file not shown.
6 changes: 3 additions & 3 deletions charts/loki-microservice/templates/ingressRoute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
kind: ClusterIssuer
name: {{ .clusterIssuer }}
---
apiVersion: traefik.io/v1alpha1
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
name: loki-frontend
Expand All @@ -36,7 +36,7 @@ spec:
secretName: loki-frontend-tls
{{- with .allowedIPs }}
---
apiVersion: traefik.io/v1alpha1
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: ip-whitelist
Expand All @@ -48,7 +48,7 @@ spec:
{{- end }}
{{- end }}
---
apiVersion: traefik.io/v1alpha1
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
name: basic-auth
Expand Down
18 changes: 16 additions & 2 deletions eks/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v5.2.0"`
Default: `"v5.0.0"`

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

Expand Down Expand Up @@ -149,6 +149,14 @@ object({

Default: `null`

==== [[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>

Description: n/a

Type: `bool`

Default: `false`

==== [[input_retention]] <<input_retention,retention>>

Description: Logs retention period. To deactivate retention, pass 0s.
Expand Down Expand Up @@ -238,7 +246,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v5.2.0"`
|`"v5.0.0"`
|no

|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -301,6 +309,12 @@ object({
|`null`
|no

|[[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>
|n/a
|`bool`
|`false`
|no

|[[input_retention]] <<input_retention,retention>>
|Logs retention period. To deactivate retention, pass 0s.
|`string`
Expand Down
5 changes: 3 additions & 2 deletions eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ module "loki-stack" {
app_autosync = var.app_autosync
dependency_ids = var.dependency_ids

retention = var.retention
ingress = var.ingress
retention = var.retention
ingress = var.ingress
enable_filebeat = var.enable_filebeat

helm_values = concat(local.helm_values, var.helm_values)
}
18 changes: 16 additions & 2 deletions kind/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v5.2.0"`
Default: `"v5.0.0"`

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

Expand Down Expand Up @@ -151,6 +151,14 @@ object({

Default: `null`

==== [[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>

Description: n/a

Type: `bool`

Default: `false`

==== [[input_retention]] <<input_retention,retention>>

Description: Logs retention period. To deactivate retention, pass 0s.
Expand Down Expand Up @@ -242,7 +250,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v5.2.0"`
|`"v5.0.0"`
|no

|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -305,6 +313,12 @@ object({
|`null`
|no

|[[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>
|n/a
|`bool`
|`false`
|no

|[[input_retention]] <<input_retention,retention>>
|Logs retention period. To deactivate retention, pass 0s.
|`string`
Expand Down
5 changes: 3 additions & 2 deletions kind/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ module "loki-stack" {
app_autosync = var.app_autosync
dependency_ids = var.dependency_ids

retention = var.retention
ingress = var.ingress
retention = var.retention
ingress = var.ingress
enable_filebeat = var.enable_filebeat

helm_values = concat(local.helm_values, var.helm_values)
}
11 changes: 11 additions & 0 deletions locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,16 @@ locals {
}]
}
}
filebeat = {
enabled = var.enable_filebeat
extraContainers = <<-EOT
- name: filebeat-prometheus-exporter
image: "trustpilot/beat-exporter:0.4.0"
ports:
- containerPort: 9479
protocol: TCP
name: metrics
EOT
}
}]
}
18 changes: 16 additions & 2 deletions sks/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ Description: Override of target revision of the application chart.

Type: `string`

Default: `"v5.2.0"`
Default: `"v5.0.0"`

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

Expand Down Expand Up @@ -248,6 +248,14 @@ object({

Default: `null`

==== [[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>

Description: n/a

Type: `bool`

Default: `false`

==== [[input_retention]] <<input_retention,retention>>

Description: Logs retention period. To deactivate retention, pass 0s.
Expand Down Expand Up @@ -350,7 +358,7 @@ object({
|[[input_target_revision]] <<input_target_revision,target_revision>>
|Override of target revision of the application chart.
|`string`
|`"v5.2.0"`
|`"v5.0.0"`
|no
|[[input_namespace]] <<input_namespace,namespace>>
Expand Down Expand Up @@ -413,6 +421,12 @@ object({
|`null`
|no
|[[input_enable_filebeat]] <<input_enable_filebeat,enable_filebeat>>
|n/a
|`bool`
|`false`
|no
|[[input_retention]] <<input_retention,retention>>
|Logs retention period. To deactivate retention, pass 0s.
|`string`
Expand Down
5 changes: 3 additions & 2 deletions sks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ module "loki-stack" {
app_autosync = var.app_autosync
dependency_ids = var.dependency_ids

retention = var.retention
ingress = var.ingress
retention = var.retention
ingress = var.ingress
enable_filebeat = var.enable_filebeat

helm_values = concat(local.helm_values, var.helm_values)
}
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ variable "ingress" {
default = null
}

variable "enable_filebeat" {
description = "" # TODO
type = bool
default = false
}

variable "retention" {
description = "Logs retention period. To deactivate retention, pass 0s."
type = string
Expand Down

0 comments on commit 9839b6f

Please sign in to comment.