-
Notifications
You must be signed in to change notification settings - Fork 324
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
Merged metrics with consul-dataplane #1635
Conversation
09c0e45
to
d377b69
Compare
62d1d90
to
32cb989
Compare
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.
Looking pretty good so far! I left some comments in-line, nothing super-major though. It's mostly about some potential extraneous configuration and missing tests.
acceptance/tests/fixtures/bases/static-metrics-app/deployment.yaml
Outdated
Show resolved
Hide resolved
// if data.PrometheusKeyFile == "" { | ||
// return corev1.Container{}, fmt.Errorf("must set %q when providing prometheus TLS config", annotationPrometheusKeyFile) | ||
// } | ||
//} |
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.
are there any tests for this that we need to remove/migrate?
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 tests for this have been migrated over to consul_dataplane_test.go.
Pass metrics flags to consul-dataplane
Cleanup: remove consul-sidecar code, annotations and tests remove consul-sidecar from values.yaml and bats tests
Get acceptance tests running
6536020
to
c305e76
Compare
…-merging"" This reverts commit f1fbc3e.
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.
Great work!
env := suite.Environment() | ||
cfg := suite.Config() | ||
ctx := env.DefaultContext(t) | ||
ns := ctx.KubectlOptions(t).Namespace | ||
|
||
helmValues := map[string]string{ | ||
// Remove before merging | ||
"global.imageConsulDataplane": "curtbushko/consul-dataplane:latest", | ||
"global.imageK8S": "curtbushko/consul-k8s-control-plane-dev:latest", |
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.
Don't forget to remove!
env := suite.Environment() | ||
cfg := suite.Config() | ||
ctx := env.DefaultContext(t) | ||
ns := ctx.KubectlOptions(t).Namespace | ||
|
||
helmValues := map[string]string{ | ||
"global.datacenter": "dc1", | ||
"global.metrics.enabled": "true", | ||
// Remove before merging |
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.
Don't forget to remove!
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.
Looks good!! Just one more comment about /metrics
path for gateways, but I won't block on that, assuming it's addressed.
-log-json={{ $root.Values.global.logJSON }} | ||
-log-json={{ $root.Values.global.logJSON }} \ | ||
{{- if (and $root.Values.global.metrics.enabled $root.Values.global.metrics.enableGatewayMetrics) }} | ||
-telemetry-prom-scrape-path={{ $root.Values.connectInject.metrics.defaultPrometheusScrapePath }} |
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 we need to hard-code this one to /metrics
(that's how it worked before). This value is controlled by the value from the connectInject
stanza which usually does not control gateways. Also, if someone changes this value, the prometheus annotations on the gateway deployment will not change because we're not consuming this value in the gateway annotations.
Co-authored-by: Iryna Shustava <ishustava@users.noreply.github.com>
…mage names from testing
Changes proposed in this PR: - Add support for merged metrics with consul-dataplane. - Merging metrics now takes place in the consul-dataplane itself instead of relying on the consul-sidecar - Pairs with a new flag added to consul-dataplane in PR: Add telemetry-prom-merge-port flag for merged metrics
Changes proposed in this PR:
This PR is best reviewed by commit(ish).
f9fe189 - passes metrics flags to the consul-dataplane binary.
ea62a71 - Re-enables the metrics acceptance tests and gets them running with consul-dataplane.
87630a7 - Removes consul-sidecar as it is no longer needed at all for merging metrics.
dde818d6536020 - Please ignore. Git/me being silly.
32cb989 - Update CHANGELOG.md
How I've tested this PR:
How I expect reviewers to test this PR:
👀
Checklist: