-
Notifications
You must be signed in to change notification settings - Fork 83
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
che #17186 Enabling metrics by default #322
Conversation
@davidfestal @tolusha will this change be enough to have metrics enabled in the default CR when installing via operatorHub? |
@ibuziuk
Here is an example how we set |
@tolusha done. Could you please clarify how can I verify it via operatorhub ? maybe there are some docs for this? |
Latest version of Eclipse Che installed and tested successfully on minikube. |
@ibuziuk This guide [1] help you to test your changes. |
BTW |
@tolusha done |
Latest version of Eclipse Che installed and tested successfully on minikube. |
@ibuziuk: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@ibuziuk
|
@tolusha it is just insane how intricate changing the default property value process is... Created eclipse-che/che#17338 |
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Latest version of Eclipse Che installed and tested successfully on minikube. |
@@ -414,7 +414,7 @@ type CheClusterSpecK8SOnly struct { | |||
} | |||
|
|||
type CheClusterSpecMetrics struct { | |||
// Enables `metrics` Che server endpoint. Default to `false`. | |||
// Enables `metrics` Che server endpoint. Default to `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.
Sorry to come too late here, but I'm not sure this documentation change is correct.
The value you propose in the CSV ALMExamples
field (that will then be provided by OperatorHub
when clicking on Create CheCluster
button is not the same thing as the default field value
The real default value is the value that will be seen by the Che operator controller when no metrics.enable
field is set. And since this enable
field is a GO boolean, according to typical GO json serialization rules, omitting it is the same as setting its value to false
. So I assume that default value is still false
in this sense.
Strictly speaking, if we want to always enable metrics by default even when a user provides its own CheCluster
custom resource without the metrics.enable
field, then we should probably either:
- Deprecate the
enable
field and add a newdisable
boolean field that would befalse
by default (typical GO behavior) - Have the
enable
field be a pointer to a boolean, so that you can distinguish between the no value and false cases. However this would not be backward-compatible with the previous versions of the CRD, so I'd rather go for option 1.
I assume this can be done in a future PR.
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.
@davidfestal
I see you point.
What about setting it to true
if metrics.enable
field isn't explicitly defined in CR?
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.
why should we do this, can't we simply fall back on default CR as described in the docs PR - eclipse-che/che-docs#1366
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.
verified it manually and this works just fine - #322 (comment)
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 see.
chectl
uses the deploy/crds/org_v1_che_cr.yaml
CR. So, metrics will be 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.
What about setting it to
true
ifmetrics.enable
field isn't explicitly defined in CR?
if metrics.enable
field isn't explicitly defined in CR, it is seen as false
by the controller afaict. When not using a pointer you cannot distinguish between 'no explicitly defined' and 'defined to false'.
eclipse-che/che#17186
CHE_METRICS_ENABLED will be set to true by default in the cm
list of metrics available in the Prometheus format - https://gist.github.com/ibuziuk/1859a134bb7575cecd7f7669100a14f4