projectsyn / component-prometheus

Commodore component to wrap kube-prometheus jsonnet library.
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Initial implementation #1

Closed anothertobi closed 2 years ago

anothertobi commented 2 years ago

Checklist

anothertobi commented 2 years ago

Not sure how the golden tests work and what isn't ok in the jsonnet lint:

make: *** [Makefile:23: lint_jsonnet] Error 2

Isn't that useful.

@mhutter do you know what needs to be done?

Other than that, I think this PR is ready for a review :)

mhutter commented 2 years ago
jsonnetfmt --in-place --pad-arrays -- */*.jsonnet

needed to be done.

mhutter commented 2 years ago

From a design perspective, it's not clear to me whether multi-instance is the right approach for this component, or if we should rather provide users the possibility to create multiple Prometheus/Alertmanager/Grafana/Blackbox Exporter/... instances through the hierarchy which are all managed by a single instance of the component. This could look something like

@anothertobi WDYT? Having a single component instance that manages multiple Prometheus/... instances would

a. probably perform better b. allow us to verify things like making sure there's only a single prometheus-operator instance

anothertobi commented 2 years ago

@mhutter

a. probably perform better

Performance is mainly related to how many kube-prometheus components effectively have to be rendered. For this, it's irrelevant whether this component is single- or multi-instance.

b. allow us to verify things like making sure there's only a single prometheus-operator instance

We could only ensure that it's not possible to create multiple prometheus-operator instances with this component when used in the whole Syn lifecycle. I'd make it the responsibility of the user to only deploy one prometheus-operator.

We should keep it multi instance to allow multiple common values for different use-cases.

TheBigLee commented 2 years ago

Not sure how the golden tests work and what isn't ok in the jsonnet lint:

make: *** [Makefile:23: lint_jsonnet] Error 2

Isn't that useful.

@mhutter do you know what needs to be done?

Other than that, I think this PR is ready for a review :)

This should not be a problem anymore. Anyways. this can be solved by running make format

tobru commented 2 years ago

All components are named component-$name. This one should be named accordingly. Suggestion: component-syn-kube-prometheus

bastjan commented 2 years ago

@simu Could you please take another look? 😊

I'd like to merge this more or less as it is now and work on the next issues (authentication, rename, new template) in separate PRs.