-
Notifications
You must be signed in to change notification settings - Fork 118
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
feat: datadog metric provider for KLT #948
feat: datadog metric provider for KLT #948
Conversation
19ef8dd
to
e61360f
Compare
Update: marked SecretKeySelector as optional. Now e can expect as many keys as we need in the Kubernetes secret. I have made some improvements and can fetch the metric data from the API. If you look at the code here, I have to provide the I am planning to get these keys from Kubernetes secret. I found some reference in dynatrace implementation here. p := metricsapi.KeptnMetricsProvider{
Spec: metricsapi.KeptnMetricsProviderSpec{
SecretKeyRef: v1.SecretKeySelector{
LocalObjectReference: v1.LocalObjectReference{
Name: "myapitoken",
},
Key: "mykey",
},
TargetServer: svr.URL,
},
} Basically I am trying to write I would appreciate it If anyone can give me some hint. |
7e2bd93
to
4d16296
Compare
✅ Deploy Preview for keptn-lifecycle-toolkit ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
4d16296
to
2e6ed2b
Compare
…lient library due to its limitation Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
…alidation Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
2e6ed2b
to
7be4ac9
Compare
metrics-operator/controllers/common/providers/datadog/common.go
Outdated
Show resolved
Hide resolved
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #948 +/- ##
==========================================
+ Coverage 57.50% 58.02% +0.51%
==========================================
Files 119 128 +9
Lines 9914 10210 +296
==========================================
+ Hits 5701 5924 +223
- Misses 4015 4072 +57
- Partials 198 214 +16
... and 15 files with indirect coverage changes
Flags with carried forward coverage won't be shown. Click here to find out more. |
metrics-operator/controllers/common/providers/datadog/datadog.go
Outdated
Show resolved
Hide resolved
@sudiptob2 as you can see we have a picky linter complaining about how your import are sorted https://github.com/keptn/lifecycle-toolkit/actions/runs/4343018946 usually, this can be automagically fixed by running we have a brief explanation of this in our CONTRIBUTING.md |
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
codecoverage pipeline fails, this is because the provider is not in this test here https://github.com/sudiptob2/lifecycle-toolkit/blob/feat/554/datadog-metric-provider/metrics-operator/controllers/common/providers/provider_test.go |
thanks, a great catch, I missed that. I will update it. Also, I am addressing the other issues you suggested. 🙏 |
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.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.
Great job @sudiptob2 🙌
I have only a minor remark/question
metrics-operator/controllers/common/providers/datadog/datadog.go
Outdated
Show resolved
Hide resolved
metrics-operator/controllers/common/providers/datadog/datadog.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.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.
as per https://github.com/keptn/lifecycle-toolkit/pull/948/files#r1129308074
it would be good to implement an avg
hmm, thanks for the confirmation, working on it. |
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
Kudos, SonarCloud Quality Gate passed!
|
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. Great work @sudiptob2 🙌
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
Fixes #554
Due to a breaking change I have closed my previous draft and opened this updated one.
I am hoping to get your opinion on DataDog APIs. I'm still getting the hang of things and would appreciate your input on what I've learned so far and where to go next. As a newcomer to DataDog, I'm eager to soak up as much knowledge as possible, so any assistance you can provide would be awesome 👍
Progress
datadog.go
is to fetch the SLIs from the DataDog API.Sliresult
✔️"datadoghq.com", "us3.datadoghq.com", "us5.datadoghq.com", "datadoghq.eu", "ddog-gov.com"
Suggestion required
SecretKeyRef
, I am not sure about the syntax on how to handle 2 keys here. Update: markedSecretKeySelector
as optional. Now e can expect as many keys as we need in the Kubernetes secret.I need suggestions and mentorship to successfully implement this. I would appreciate any reference materials or comment.