-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from msfidelis/feature/prometheus_grafana_service
Feature/prometheus grafana service
- Loading branch information
Showing
12 changed files
with
376 additions
and
6 deletions.
There are no files selected for viewing
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
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,30 @@ | ||
prometheus: | ||
# podMonitorNamespaceSelector: | ||
# any: true | ||
podMonitorSelector: {} | ||
podMonitorSelectorNilUsesHelmValues: false | ||
# ruleNamespaceSelector: | ||
# any: true | ||
ruleSelector: {} | ||
ruleSelectorNilUsesHelmValues: false | ||
# serviceMonitorNamespaceSelector: | ||
# any: true | ||
serviceMonitorSelector: {} | ||
serviceMonitorSelectorNilUsesHelmValues: false | ||
|
||
kubeStateMetrics: | ||
enabled: false | ||
|
||
grafana: | ||
enabled: false | ||
|
||
alertmanager: | ||
enabled: false | ||
|
||
prometheusOperator: | ||
enabled: true | ||
namespaces: '' | ||
denyNamespaces: '' | ||
prometheusInstanceNamespaces: '' | ||
alertmanagerInstanceNamespaces: '' | ||
thanosRulerInstanceNamespaces: '' |
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
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
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
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,136 @@ | ||
# resource "helm_release" "managed_prometheus" { | ||
|
||
# count = var.enable_managed_prometheus ? 1 : 0 | ||
|
||
# name = "prometheus" | ||
# chart = "prometheus" | ||
# repository = "https://prometheus-community.github.io/helm-charts" | ||
# namespace = "prometheus" | ||
# create_namespace = true | ||
|
||
# set { | ||
# name = "serviceAccounts.server.name" | ||
# value = "managed-prometheus" | ||
# } | ||
|
||
# set { | ||
# name = "serviceAccounts.server.annotations.eks\\.amazonaws\\.com/role-arn" | ||
# value = aws_iam_role.managed_prometheus_role.arn | ||
# } | ||
|
||
# set { | ||
# name = "server.remoteWrite[0].url" | ||
# value = format("%sapi/v1/remote_write", aws_prometheus_workspace.main[0].prometheus_endpoint) | ||
# } | ||
|
||
# set { | ||
# name = "server.remoteWrite[0].sigv4.region" | ||
# value = var.aws_region | ||
# } | ||
|
||
# set { | ||
# name = "server.remoteWrite[0].queue_config.max_samples_per_send" | ||
# value = "1000" | ||
# } | ||
|
||
# set { | ||
# name = "server.remoteWrite[0].queue_config.max_shards" | ||
# value = "200" | ||
# } | ||
|
||
# set { | ||
# name = "server.remoteWrite[0].queue_config.capacity" | ||
# value = "2500" | ||
# } | ||
|
||
# set { | ||
# name = "server.persistentVolume.enabled" | ||
# value = "false" | ||
# } | ||
|
||
|
||
# set { | ||
# name = "prometheus-pushgateway.enabled" | ||
# value = "false" | ||
# } | ||
|
||
|
||
# set { | ||
# name = "prometheus-pushgateway.enabled" | ||
# value = "false" | ||
# } | ||
|
||
# set { | ||
# name = "alertmanager.enabled" | ||
# value = "false" | ||
# } | ||
|
||
# depends_on = [ | ||
# aws_eks_cluster.eks_cluster, | ||
# aws_eks_node_group.cluster, | ||
# kubernetes_config_map.aws-auth | ||
# ] | ||
# } | ||
|
||
|
||
|
||
|
||
resource "helm_release" "managed_prometheus" { | ||
|
||
count = var.enable_managed_prometheus ? 1 : 0 | ||
|
||
name = "prometheus" | ||
chart = "kube-prometheus-stack" | ||
repository = "https://prometheus-community.github.io/helm-charts" | ||
namespace = "prometheus" | ||
create_namespace = true | ||
|
||
version = "45.8.0" | ||
|
||
set { | ||
name = "prometheus.serviceAccount.name" | ||
value = "managed-prometheus" | ||
} | ||
|
||
set { | ||
name = "prometheus.serviceAccount.annotations.eks\\.amazonaws\\.com/role-arn" | ||
value = aws_iam_role.managed_prometheus_role.arn | ||
} | ||
|
||
set { | ||
name = "prometheus.prometheusSpec.remoteWrite[0].url" | ||
value = format("%sapi/v1/remote_write", aws_prometheus_workspace.main[0].prometheus_endpoint) | ||
} | ||
|
||
set { | ||
name = "prometheus.prometheusSpec.remoteWrite[0].sigv4.region" | ||
value = var.aws_region | ||
} | ||
|
||
set { | ||
name = "prometheus.prometheusSpec.remoteWrite[0].queue_config.max_samples_per_send" | ||
value = "1000" | ||
} | ||
|
||
set { | ||
name = "prometheus.prometheusSpec.remoteWrite[0].queue_config.max_shards" | ||
value = "200" | ||
} | ||
|
||
set { | ||
name = "prometheus.prometheusSpec.remoteWrite[0].queue_config.capacity" | ||
value = "2500" | ||
} | ||
|
||
|
||
values = [ | ||
"${file("./helm/prometheus/managed/values.yml")}" | ||
] | ||
|
||
|
||
depends_on = [ | ||
aws_eks_cluster.eks_cluster, | ||
aws_eks_node_group.cluster, | ||
kubernetes_config_map.aws-auth | ||
] | ||
} |
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.