Open malcolm061990 opened 3 years ago
If someone is interested in solution I changed my alertmanager-config-external-my.jsonnet to:
local kp =
(import 'kube-prometheus/main.libsonnet') +
{
values+:: {
alertmanager+: {
config: importstr 'alertmanager-config-my.yaml',
namespace: 'monitoring',
},
},
};
{ ['alertmanager-' + name]: kp.alertmanager[name] for name in std.objectFields(kp.alertmanager) }
Now it generates the output correctly. But my question in this topic is still actual.
cc @paulfantom
Omission from my side, sorry for that.
@malcolm061990 your solution looks good to me, can you create a PR to fix the example?
Omission from my side, sorry for that.
@malcolm061990 your solution looks good to me, can you create a PR to fix the example?
Never created PRs in that project :) How can I create the PR?
If you ask generally how to create PR, then this should be good: https://opensource.com/article/19/7/create-pull-request-github
As for what needs to be done in that PR, I think swapping our current examples/alertmanager-config-external.jsonnet
with what you proposed in https://github.com/prometheus-operator/kube-prometheus/issues/989#issuecomment-787730912 should be good. After swapping it, run make generate
and push your changes :)
What happened? Wrong output files are created after generating manifests using examples/alertmanager-config-external.jsonnet from the repo.
How to reproduce it (as minimally and precisely as possible): Just modify Makefile target to (changing examples/kustomize.jsonnet to examples/alertmanager-config-external.jsonnet; added PHONY):
Run:
For some reason it generates all yaml fields in separated yaml files that is useless for applying to k8s cluster. But the values in these files are correct.
Environment
master branch of this project