-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Allow namespaces to be over-ridden in all addons (prometheus and others) #498
Comments
I can't answer the why but I think instead we should default to what the associated addon's helm chart provides while offering the users the ability to change to suite. Changing this from a question to an enhancement |
Agreed. I just wasn't sure if there was a reason for this, so I figured I'd start by asking. |
@spkane What you are seeing in Did you try passing your own config with Here is the doc https://aws-ia.github.io/terraform-aws-eks-blueprints/add-ons/prometheus/ |
@vara-bonthu I had this setup in my code when I was testing it: enable_prometheus = true
prometheus_helm_config = {
version = "15.8.5"
create_namespace = true
namespace = "monitoring"
values = [templatefile("${path.module}/helm_values/prometheus-values.yaml.tftpl", {nodeSelector = local.primaryNodeSelector})]
} but since it has been a week, let me test it one more time and double check. The values template looks like this: # See:
# https://github.com/prometheus-community/helm-charts/blob/main/charts/prometheus/values.yaml
#
# This is a template, so we can get values from terraform.
#
alertmanager:
nodeSelector: ${jsonencode({ for ns_key, ns_value in nodeSelector : ns_key => ns_value })}
server:
nodeSelector: ${jsonencode({ for ns_key, ns_value in nodeSelector : ns_key => ns_value })}
retention: 1h
resources:
requests:
cpu: 500m
memory: 512Mi
global:
scrape_interval: 15s
pushgateway:
nodeSelector: ${jsonencode({ for ns_key, ns_value in nodeSelector : ns_key => ns_value })} |
Ahhh. I think the error might actually be here: https://github.com/aws-samples/eks-blueprints-add-ons/blob/main/chart/templates/prometheus.yaml#L33 It looks like the destination namespace is hard-coded here (and maybe in other examples) and does not respect what was set in the Terraform code. |
Yes, you are spot on here. Fix needs to go in this repo and the |
Resolved here with #595 Similar issue exists for addons repo aws-samples/eks-blueprints-add-ons#43 |
Please describe your quesiton here
The namespace for the prometheus addon is hardcoded. Why is this?
I have spent a bit of time trying to change this, before realizing why I couldn't get it to change as expected.
Provide link to the example related to the question
terraform-aws-eks-blueprints/modules/kubernetes-addons/prometheus/locals.tf
Line 8 in deec7d5
Additional context
Similar issue/fix: #287
More
The text was updated successfully, but these errors were encountered: