Skip to content
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

[kube-prometheus-stack] add tpl to some templates #4901

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

denzhel
Copy link
Contributor

@denzhel denzhel commented Oct 7, 2024

What this PR does / why we need it

We're moving our infra charts from Terraform to ArgoCD/ApplicationSets and we need the ability to template nodeSelector and tolerations

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@jkroepke
Copy link
Member

jkroepke commented Oct 7, 2024

Your change is already covered by additionalConfig, e.g. alertmanager.alertmanagerSpec.additionalConfig

alertmanager:
  alertmanagerSpec:
    additionalConfig:
      nodeSelector: {}

That should solve your case?

@denzhel denzhel force-pushed the kube-prometheus-stack-add-tpl branch from 5e35658 to 3414aaf Compare October 7, 2024 09:34
@denzhel
Copy link
Contributor Author

denzhel commented Oct 7, 2024

Your change is already covered by additionalConfig, e.g. alertmanager.alertmanagerSpec.additionalConfig

alertmanager:
  alertmanagerSpec:
    additionalConfig:
      nodeSelector: {}

That should solve your case?

Thanks @jkroepke for the quick response !

Correct, that solved the issue I had with alertmanager and prometheus but I'm still having the issue with prometheus-operator since there is no prometheusOperatorSpec.additionalConfig handling inside the template files.

I updated my PR accordingly.

@denzhel denzhel force-pushed the kube-prometheus-stack-add-tpl branch 2 times, most recently from c83eb8f to a3d6c7a Compare October 8, 2024 17:06
@denzhel denzhel force-pushed the kube-prometheus-stack-add-tpl branch from a3d6c7a to d5cfd14 Compare October 14, 2024 18:14
@denzhel
Copy link
Contributor Author

denzhel commented Oct 14, 2024

Hi @jkroepke :) can this be merged please ?

@@ -217,14 +217,14 @@ spec:
{{- end }}
{{- with .Values.prometheusOperator.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{ tpl (toYaml .) $ | indent 8 }}
{{- end }}
{{- with .Values.prometheusOperator.affinity }}
affinity:
{{ toYaml . | indent 8 }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please add tpl here as well? addinity are in the same line as nodeselector and tolerations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants