-
Notifications
You must be signed in to change notification settings - Fork 130
[AGENTONB-2593] DDOT gateway with interface component #2276
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
base: tbavelier/component-reconcile-interface-rf-clean
Are you sure you want to change the base?
[AGENTONB-2593] DDOT gateway with interface component #2276
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (29.50%) 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 @@
## tbavelier/component-reconcile-interface-rf-clean #2276 +/- ##
====================================================================================
- Coverage 38.11% 37.93% -0.19%
====================================================================================
Files 257 264 +7
Lines 21066 21523 +457
====================================================================================
+ Hits 8029 8164 +135
- Misses 12418 12732 +314
- Partials 619 627 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
songy23
left a 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.
A high-level question: where are Services defined in operator? In DDOT Gateway we need to create a k8s Service to expose the gateway pods: https://github.com/DataDog/helm-charts/blob/main/charts/datadog/templates/agent-services.yaml#L119
| } | ||
|
|
||
| func (o *otelCollectorFeature) ManageOtelCollectorGateway(managers feature.PodTemplateManagers, provider string) error { | ||
| return nil |
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 otel agents in Daemonset need to use a different config when gateway is enabled: http://github.com/DataDog/helm-charts/blob/main/charts/datadog/templates/_otel_agent_config.yaml#L3
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.
Yup, but this is not the place to do it. It would be in otelCollector feature and ManageNodeAgent or even higher up in the feature Configure. Because the otelCollector feature is the one that is modified based on whether or not gateway is enabled. I pushed 8d5bdc5 that quickly showcases how the otelCollector daemonset could be modified based on gateway being enabled:
╭─ ~/dd/datadog-operator tbavelier/dd…ce-component kind-local-k8s/system 11:24:15
╰─❯ k get dd datadog-agent -oyaml | yq .spec.features.otelCollector
enabled: true
╭─ ~/dd/datadog-operator tbavelier/dd…ce-component kind-local-k8s/system 11:26:20
╰─❯ k get dd datadog-agent -oyaml | yq .spec.features.otelCollectorGateway
null
╭─ ~/dd/datadog-operator tbavelier/dd…ce-component kind-local-k8s/system 11:26:38
╰─❯ k describe ds datadog-agent | grep -i "IS_OTEL_GATEWAY_ENABLED"
╭─ ~/dd/datadog-operator tbavelier/dd…ce-component kind-local-k8s/system 11:27:08
╰─❯ k apply -f ~/misc/k8s_stuff/minikube/operator/datadog-agent.yaml
datadogagent.datadoghq.com/datadog-agent configured
╭─ ~/dd/datadog-operator tbavelier/dd…ce-component kind-local-k8s/system 11:27:25
╰─❯ k get dd datadog-agent -oyaml | yq .spec.features.otelCollectorGateway
enabled: true
╭─ ~/dd/datadog-operator tbavelier/dd…ce-component kind-local-k8s/system 11:27:31
╰─❯ k describe ds datadog-agent | grep -i "IS_OTEL_GATEWAY_ENABLED"
IS_OTEL_GATEWAY_ENABLED: true
This is done within the ╰─❯ k describe svc datadog-agent-otel-collector-gateway
Name: datadog-agent-otel-collector-gateway
Namespace: system
Labels: app.kubernetes.io/instance=datadog-agent
app.kubernetes.io/managed-by=datadog-operator
app.kubernetes.io/name=datadog-agent-deployment
app.kubernetes.io/part-of=system-datadog--agent
app.kubernetes.io/version=
operator.datadoghq.com/managed-by-store=true
Annotations: <none>
Selector: agent.datadoghq.com/component=otel-collector-gateway,app.kubernetes.io/part-of=system-datadog--agent
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.96.102.42
IPs: 10.96.102.42
Port: otlpgrpcport 4317/TCP
TargetPort: 4317/TCP
Endpoints: 10.244.1.10:4317
Port: otlphttpport 4318/TCP
TargetPort: 4318/TCP
Endpoints: 10.244.1.10:4318
Session Affinity: None
Internal Traffic Policy: Local
Events: <none> |
songy23
left a 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.
Looks good so far, just a few naming suggestions
7f1efb8 to
ed3e0fb
Compare
What does this PR do?
DDOT gateway support using the componentreconciler
Motivation
What inspired you to submit this pull request?
Additional Notes
Anything else we should know when reviewing?
Minimum Agent Versions
Are there minimum versions of the Datadog Agent and/or Cluster Agent required?
Describe your test plan
Write there any instructions and details you may have to test your PR.
Checklist
bug,enhancement,refactoring,documentation,tooling, and/ordependenciesqa/skip-qalabel