Skip to content
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

[datadog-operator] NetworkPolicy missing for admission controller #1467

Open
sjanel opened this issue Jul 24, 2024 · 0 comments
Open

[datadog-operator] NetworkPolicy missing for admission controller #1467

sjanel opened this issue Jul 24, 2024 · 0 comments
Labels
chart/datadog-operator This issue or pull request is related to the datadog-operator chart

Comments

@sjanel
Copy link

sjanel commented Jul 24, 2024

Hello!

Describe what happened:
APM traces admission controllers webhooks do not work even with network policies options set.

I had to add an ingress rule from konnectivity-agent to datadog-cluster-agent NetworkPolicy to authorize cluster agent to receive hooks, like this:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: allow-from-konnectivity-agent-to-datadog-cluster-agent-ingress
  namespace: <datadog-agent-namespace>
spec:
  ingress:
  - from:
    - namespaceSelector: {}
      podSelector:
        matchLabels:
          k8s-app: konnectivity-agent
    ports:
    - port: 8000
      protocol: TCP
  podSelector:
    matchLabels:
      agent.datadoghq.com/component: cluster-agent
  policyTypes:
  - Ingress

I then get the traces working (init container is successfully injected to my application pod) thanks to this NetworkPolicy.

Describe what you expected:
I would have expected to see above ingress rule added when APM is enabled with NetworkPolicies:

    apm:
      instrumentation:
        enabled: true
    ....
    networkPolicy:
      create: true
      flavor: kubernetes

Steps to reproduce the issue:
Cluster with NetworkPolicy enabled, and APM traces.

Additional environment details (Operating System, Cloud provider, etc):
GKE v1.30.1, datadog-operator v1.7.0

I may have missed something in the configuration, please tell me in this case.

Thanks in advance!

@khewonc khewonc added the chart/datadog-operator This issue or pull request is related to the datadog-operator chart label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart/datadog-operator This issue or pull request is related to the datadog-operator chart
Projects
None yet
Development

No branches or pull requests

2 participants