-
Notifications
You must be signed in to change notification settings - Fork 112
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
api/datadoghq/v2alpha1: add support for SSI targets #1670
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (75.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1670 +/- ##
==========================================
+ Coverage 49.48% 50.44% +0.96%
==========================================
Files 218 218
Lines 21240 22028 +788
==========================================
+ Hits 10511 11113 +602
- Misses 10182 10327 +145
- Partials 547 588 +41
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 37 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
f88199e
to
a66ab69
Compare
22e4ec5
to
a261331
Compare
a261331
to
6701f26
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.
Just a small suggestion but approved
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.
🚀
Co-authored-by: Alicia Scott <[email protected]>
This commit adds the tracer config options we've just added.
// used. If no target matches, the auto instrumentation will not be applied. Full config key: | ||
// apm_config.instrumentation.targets |
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.
we don't have a precedence of referencing the datadog.yaml config keys in this file; do you think it's needed?
(in general, a goal of the operator is to obscure some of the complicated config when setting up the agent)
// TracerConfigs is a list of configuration options to use for the installed tracers. These options will be added | ||
// as environment variables in addition to the injected tracer. Full config key: | ||
// apm_config.instrumentation.targets[].ddTraceConfigs | ||
TracerConfigs []TracerConfig `json:"ddTraceConfigs"` |
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 all of these parameters required? they don't have +optional
or omitempty
// PodSelector is a reconstruction of the metav1.LabelSelector struct to be able to unmarshal the configuration. It | ||
// can be converted to a metav1.LabelSelector using the AsLabelSelector method. Full config key: | ||
// apm_config.instrumentation.targets[].selector | ||
type PodSelector struct { |
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.
|
||
// TracerConfig is a struct that stores configuration options for a tracer. These will be injected as environment | ||
// variables to the workload that matches targeting. | ||
type TracerConfig struct { |
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.
[]corev1.EnvVar
could be used instead
What does this PR do?
We want to allow the datadog-operator to configure SSI targets in the cluster agent.
The config we want to add is here.
Motivation
See: INPLAT-424
Minimum Agent Versions
This change supports a new feature in the cluster agent, and is harmless to older cluster agents.
Describe your test plan
I setup minikube locally with a registry. I ran the following to install my operator based on the docs:
I then added the following config to
examples/datadogagent/datadog-agent-minimum.yaml
and ran the script for a DatadogAgent resource:Finally, I exec'd into the cluster agent pod and verified that the expected environment variable is set:
Checklist
bug
,enhancement
,refactoring
,documentation
,tooling
, and/ordependencies
qa/skip-qa
label