generated from clouddrove/terraform-module-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
1,547 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
locals { | ||
name = "jaeger" | ||
|
||
default_helm_config = { | ||
name = try(var.jaeger_extra_configs.name, local.name) | ||
chart = try(var.jaeger_extra_configs.chart, local.name) | ||
repository = try(var.jaeger_extra_configs.repository, "https://jaegertracing.github.io/helm-charts") | ||
version = try(var.jaeger_extra_configs.version, "3.3.0") | ||
namespace = try(var.jaeger_extra_configs.namespace, "monitoring") | ||
create_namespace = try(var.jaeger_extra_configs.create_namespace, true) | ||
description = "Jaeger helm Chart deployment configuration" | ||
timeout = try(var.jaeger_extra_configs.timeout, "600") | ||
lint = try(var.jaeger_extra_configs.lint, "false") | ||
repository_key_file = try(var.jaeger_extra_configs.repository_key_file, "") | ||
repository_cert_file = try(var.jaeger_extra_configs.repository_cert_file, "") | ||
repository_username = try(var.jaeger_extra_configs.repository_username, "") | ||
repository_password = try(var.jaeger_extra_configs.repository_password, "") | ||
verify = try(var.jaeger_extra_configs.verify, "false") | ||
keyring = try(var.jaeger_extra_configs.keyring, "") | ||
disable_webhooks = try(var.jaeger_extra_configs.disable_webhooks, "false") | ||
reuse_values = try(var.jaeger_extra_configs.reuse_values, "false") | ||
reset_values = try(var.jaeger_extra_configs.reset_values, "false") | ||
force_update = try(var.jaeger_extra_configs.force_update, "false") | ||
recreate_pods = try(var.jaeger_extra_configs.recreate_pods, "false") | ||
cleanup_on_fail = try(var.jaeger_extra_configs.cleanup_on_fail, "false") | ||
max_history = try(var.jaeger_extra_configs.max_history, "0") | ||
atomic = try(var.jaeger_extra_configs.atomic, "false") | ||
skip_crds = try(var.jaeger_extra_configs.skip_crds, "false") | ||
render_subchart_notes = try(var.jaeger_extra_configs.render_subchart_notes, "true") | ||
disable_openapi_validation = try(var.jaeger_extra_configs.disable_openapi_validation, "false") | ||
wait = try(var.jaeger_extra_configs.wait, "true") | ||
wait_for_jobs = try(var.jaeger_extra_configs.wait_for_jobs, "false") | ||
dependency_update = try(var.jaeger_extra_configs.dependency_update, "false") | ||
replace = try(var.jaeger_extra_configs.replace, "false") | ||
} | ||
|
||
helm_config = merge( | ||
local.default_helm_config, | ||
var.helm_config | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module "helm_addon" { | ||
source = "../helm" | ||
|
||
manage_via_gitops = var.manage_via_gitops | ||
helm_config = local.helm_config | ||
addon_context = var.addon_context | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
output "namespace" { | ||
value = local.default_helm_config.namespace | ||
} | ||
|
||
output "chart_version" { | ||
value = local.default_helm_config.version | ||
} | ||
|
||
output "repository" { | ||
value = local.default_helm_config.repository | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
variable "helm_config" { | ||
description = "Helm provider config for Loki" | ||
type = any | ||
default = {} | ||
} | ||
|
||
variable "manage_via_gitops" { | ||
description = "Determines if the add-on should be managed via GitOps" | ||
type = bool | ||
default = false | ||
} | ||
|
||
variable "addon_context" { | ||
description = "Input configuration for the addon" | ||
type = object({ | ||
aws_caller_identity_account_id = string | ||
aws_caller_identity_arn = string | ||
aws_eks_cluster_endpoint = string | ||
aws_partition_id = string | ||
aws_region_name = string | ||
eks_cluster_id = string | ||
eks_oidc_issuer_url = string | ||
eks_oidc_provider_arn = string | ||
tags = map(string) | ||
}) | ||
} | ||
|
||
variable "jaeger_extra_configs" { | ||
description = "Override attributes of helm_release terraform resource" | ||
type = any | ||
default = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
terraform { | ||
required_version = ">= 1.0.0" | ||
|
||
required_providers { | ||
kubernetes = { | ||
source = "hashicorp/kubernetes" | ||
version = ">= 2.10" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
test_pod: | ||
enabled: true | ||
image: bats/bats:1.8.2 | ||
pullPolicy: IfNotPresent | ||
|
||
loki: | ||
enabled: true | ||
isDefault: true | ||
url: http://{{(include "loki.serviceName" .)}}:{{ .Values.loki.service.port }} | ||
readinessProbe: | ||
httpGet: | ||
path: /ready | ||
port: http-metrics | ||
initialDelaySeconds: 45 | ||
livenessProbe: | ||
httpGet: | ||
path: /ready | ||
port: http-metrics | ||
initialDelaySeconds: 45 | ||
datasource: | ||
jsonData: "{}" | ||
uid: "" | ||
|
||
|
||
promtail: | ||
enabled: true | ||
config: | ||
logLevel: info | ||
serverPort: 3101 | ||
clients: | ||
- url: http://{{ .Release.Name }}:3100/loki/api/v1/push | ||
|
||
fluent-bit: | ||
enabled: false | ||
|
||
grafana: | ||
enabled: false | ||
sidecar: | ||
datasources: | ||
label: "" | ||
labelValue: "" | ||
enabled: true | ||
maxLines: 1000 | ||
image: | ||
tag: 10.3.3 | ||
|
||
prometheus: | ||
enabled: false | ||
isDefault: false | ||
url: http://{{ include "prometheus.fullname" .}}:{{ .Values.prometheus.server.service.servicePort }}{{ .Values.prometheus.server.prefixURL }} | ||
datasource: | ||
jsonData: "{}" | ||
|
||
filebeat: | ||
enabled: false | ||
filebeatConfig: | ||
filebeat.yml: | | ||
# logging.level: debug | ||
filebeat.inputs: | ||
- type: container | ||
paths: | ||
- /var/log/containers/*.log | ||
processors: | ||
- add_kubernetes_metadata: | ||
host: ${NODE_NAME} | ||
matchers: | ||
- logs_path: | ||
logs_path: "/var/log/containers/" | ||
output.logstash: | ||
hosts: ["logstash-loki:5044"] | ||
logstash: | ||
enabled: false | ||
image: grafana/logstash-output-loki | ||
imageTag: 1.0.1 | ||
filters: | ||
main: |- | ||
filter { | ||
if [kubernetes] { | ||
mutate { | ||
add_field => { | ||
"container_name" => "%{[kubernetes][container][name]}" | ||
"namespace" => "%{[kubernetes][namespace]}" | ||
"pod" => "%{[kubernetes][pod][name]}" | ||
} | ||
replace => { "host" => "%{[kubernetes][node][name]}"} | ||
} | ||
} | ||
mutate { | ||
remove_field => ["tags"] | ||
} | ||
} | ||
outputs: | ||
main: |- | ||
output { | ||
loki { | ||
url => "http://loki:3100/loki/api/v1/push" | ||
#username => "test" | ||
#password => "test" | ||
} | ||
# stdout { codec => rubydebug } | ||
} | ||
# proxy is currently only used by loki test pod | ||
# Note: If http_proxy/https_proxy are set, then no_proxy should include the | ||
# loki service name, so that tests are able to communicate with the loki | ||
# service. | ||
proxy: | ||
http_proxy: "" | ||
https_proxy: "" | ||
no_proxy: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
locals { | ||
name = "loki-stack" | ||
|
||
default_helm_config = { | ||
name = try(var.loki_extra_configs.name, local.name) | ||
chart = try(var.loki_extra_configs.chart, local.name) | ||
repository = try(var.loki_extra_configs.repository, "https://grafana.github.io/helm-charts") | ||
version = try(var.loki_extra_configs.version, "2.10.2") | ||
namespace = try(var.loki_extra_configs.namespace, "monitoring") | ||
create_namespace = try(var.loki_extra_configs.create_namespace, true) | ||
description = "Loki helm Chart deployment configuration" | ||
timeout = try(var.loki_extra_configs.timeout, "600") | ||
lint = try(var.loki_extra_configs.lint, "false") | ||
repository_key_file = try(var.loki_extra_configs.repository_key_file, "") | ||
repository_cert_file = try(var.loki_extra_configs.repository_cert_file, "") | ||
repository_username = try(var.loki_extra_configs.repository_username, "") | ||
repository_password = try(var.loki_extra_configs.repository_password, "") | ||
verify = try(var.loki_extra_configs.verify, "false") | ||
keyring = try(var.loki_extra_configs.keyring, "") | ||
disable_webhooks = try(var.loki_extra_configs.disable_webhooks, "false") | ||
reuse_values = try(var.loki_extra_configs.reuse_values, "false") | ||
reset_values = try(var.loki_extra_configs.reset_values, "false") | ||
force_update = try(var.loki_extra_configs.force_update, "false") | ||
recreate_pods = try(var.loki_extra_configs.recreate_pods, "false") | ||
cleanup_on_fail = try(var.loki_extra_configs.cleanup_on_fail, "false") | ||
max_history = try(var.loki_extra_configs.max_history, "0") | ||
atomic = try(var.loki_extra_configs.atomic, "false") | ||
skip_crds = try(var.loki_extra_configs.skip_crds, "false") | ||
render_subchart_notes = try(var.loki_extra_configs.render_subchart_notes, "true") | ||
disable_openapi_validation = try(var.loki_extra_configs.disable_openapi_validation, "false") | ||
wait = try(var.loki_extra_configs.wait, "true") | ||
wait_for_jobs = try(var.loki_extra_configs.wait_for_jobs, "false") | ||
dependency_update = try(var.loki_extra_configs.dependency_update, "false") | ||
replace = try(var.loki_extra_configs.replace, "false") | ||
} | ||
|
||
helm_config = merge( | ||
local.default_helm_config, | ||
var.helm_config | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module "helm_addon" { | ||
source = "../helm" | ||
|
||
manage_via_gitops = var.manage_via_gitops | ||
helm_config = local.helm_config | ||
addon_context = var.addon_context | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
output "namespace" { | ||
value = local.default_helm_config.namespace | ||
} | ||
|
||
output "chart_version" { | ||
value = local.default_helm_config.version | ||
} | ||
|
||
output "repository" { | ||
value = local.default_helm_config.repository | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
variable "helm_config" { | ||
description = "Helm provider config for Loki" | ||
type = any | ||
default = {} | ||
} | ||
|
||
variable "manage_via_gitops" { | ||
description = "Determines if the add-on should be managed via GitOps" | ||
type = bool | ||
default = false | ||
} | ||
|
||
variable "addon_context" { | ||
description = "Input configuration for the addon" | ||
type = object({ | ||
aws_caller_identity_account_id = string | ||
aws_caller_identity_arn = string | ||
aws_eks_cluster_endpoint = string | ||
aws_partition_id = string | ||
aws_region_name = string | ||
eks_cluster_id = string | ||
eks_oidc_issuer_url = string | ||
eks_oidc_provider_arn = string | ||
tags = map(string) | ||
}) | ||
} | ||
|
||
variable "loki_extra_configs" { | ||
description = "Override attributes of helm_release terraform resource" | ||
type = any | ||
default = {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
terraform { | ||
required_version = ">= 1.0.0" | ||
|
||
required_providers { | ||
kubernetes = { | ||
source = "hashicorp/kubernetes" | ||
version = ">= 2.10" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
provisionDataStore: | ||
cassandra: false | ||
allInOne: | ||
enabled: true | ||
storage: | ||
type: memory | ||
agent: | ||
enabled: true | ||
collector: | ||
enabled: true | ||
query: | ||
enabled: true | ||
ingress: | ||
certManager: | ||
enabled: false | ||
|
||
|
||
esIndexCleaner: | ||
certManager: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
loki: | ||
enabled: true | ||
|
||
promtail: | ||
enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.