-
Notifications
You must be signed in to change notification settings - Fork 183
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
optional metrics resources #683
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you still need to closing end statement for the if then LGTM
One thing that was brought up on the issue that we missed, we should do this same conditional rendering for all metrics components. The service, configMap, HPA, etc. |
Have added the checks for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be based on metrics.enabled
like it was in the first commit (then changed).
That's because now we'll disable fluentd
based on prometheus-operator
and that's confusing.
Also to be consistent we should add fluentd.enabled
but it doesn't make sense because we use FluentD for everything.
So for logs we have to use logs.enabled
. We already have traces.enabled
.
I'd suggest to go with metrics.enabled
as well.
I'm afraid that we cannot disable metrics using prometheus flag, because customers can have their own prometheus and still wants to send metrics. We should go with two flags unfortunately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to figure out what to do with metrics without prometheus case
Good point on existing Prometheus case. It will require two seperate flags. |
Please check this out, we should be able to use one flag to rule them all: helm/helm#2111 |
…com/SumoLogic/sumologic-kubernetes-collection into vsinghal-optional-metrics-resources
@@ -1,3 +1,4 @@ | |||
{{- if eq .Values.fluentd.metrics.enabled true }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather use a new flag - sumologic.metrics.enabled
like we do for traces
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or actually both sumologic.metrics.enabled
and fluentd.metrics.enabled
in this case (as this configmap is for fluentd)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used this flag as this is part of fluentd
itself. and we already have fluentd.events.enabled
as compared to traces which is not part of the fluentd section.
Also I feel having both sumologic.metrics.enabled
and fluentd.metrics.enabled
will not add any functionality as it can be covered by only one.
Thoughts? cc @frankreno @samjsong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, I'm not sure I understand the usecase for having both sumologic.metrics.enabled
and fluentd.metrics.enabled
. I can't think of a case where you would want the fluentd pipeline enabled but not the metrics resources, or vice versa. @perk-sumo can you share your reasoning please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel we should have sumologic.metrics.enabled
instead of fluentd.metrics.enabled
, especially if we gonna replace fluentd in the future, but it's meaningful change, so I would stick to the current flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is to have global flag that is not attached to the underlying implementation so that we (or the user) can switch the tool easily.
There are couple of usecases:
- disable all the metrics, all the fluentd's, prometheus, configmaps etc - set
sumologic.metrics.enabled=false
- enable all the metrics in the default mode:
sumologic.metrics.enabled=true
- enable metrics, but use own prometheus:
sumologic.metrics.enabled=true
andprometheus-operator.enabled=false
- enable metrics, but use own fluentd for tagging:
sumologic.metrics.enabled=true
andfluentd.metrics.enabled=false
- enable metrics, but use experimental OTC for that:
sumologic.metrics.enabled=true
andfluentd.metrics.enabled=false
,prometheus-operator.enabled=false
,otelcol.metrics.enabled=true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What @perk-sumo suggestion seems to be the cleanest approach.
@@ -6,7 +6,7 @@ dependencies: | |||
- name: prometheus-operator | |||
version: 8.13.8 | |||
repository: https://kubernetes-charts.storage.googleapis.com/ | |||
condition: prometheus-operator.enabled | |||
condition: sumologic.metrics.enabled,prometheus-operator.enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Please add this into the fluent-bit as well:
condition: sumologic.logs.enabled,fluent-bit.enabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the redo :)
I've left couple of suggestions but overall it's heading in the good direction 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, except @perk-sumo findings
// @perk-sumo suggestions are awesome :O
// Is it the new feature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Same comments as @perk-sumo.
Co-authored-by: Marcin Stozek <58700054+perk-sumo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Description
Fixes #678
Testing performed