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

Dynatrace Operator not respecting namespaceSelector labels #3999

Closed
emdneto opened this issue Oct 28, 2024 · 1 comment
Closed

Dynatrace Operator not respecting namespaceSelector labels #3999

emdneto opened this issue Oct 28, 2024 · 1 comment
Labels
support request request for further assistance with an issue

Comments

@emdneto
Copy link

emdneto commented Oct 28, 2024

Describe the bug
The Dynatrace Operator is currently not respecting the namespaceSelector matchLabels configuration. Despite setting specific labels to restrict the operator’s activity to certain namespaces, the Dynatrace OneAgent is being injected into all namespaces. This behavior deviates from the expected functionality, where only namespaces matching the specified labels should be affected by the operator. I'm following this guide: https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/guides/operation/annotate

To Reproduce
Follow this guide https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/guides/operation/annotate

Expected behavior
The Dynatrace Operator should only inject the OneAgent into namespaces that have the labels specified in namespaceSelector.matchLabels. Other namespaces without these labels should remain unaffected.

Additional context

  • dynatrace-operator:1.2.2

Namespace labels:

ns-xyz                             Active   3d7h     dynakube.internal.dynatrace.com/instance=xyz,kubernetes.io/metadata.name=ns-xyz

Dynakube config:

  oneAgent:
    cloudNativeFullStack:
      autoUpdate: false
      codeModulesImage: public.ecr.aws/dynatrace/dynatrace-codemodules:1.293.182.20240820-160950
      image: public.ecr.aws/dynatrace/dynatrace-oneagent:1.293.182.20240820-160950
      namespaceSelector:
        matchLabels:
          dynatrace: "true"
      tolerations:
      - operator: Exists
      version: 1.293.182

The problem is the namespace doesn't have the label dynatrace: true and even with that pods from that namespace has oneagent injected and the initContainer: install-oneagent

@chrismuellner chrismuellner added the support request request for further assistance with an issue label Oct 29, 2024
Copy link
Contributor

Thank you for opening a Dynatrace Operator Issue. We've identified and tagged the issue as a "Support request".

Dynatrace responds to requests like these via Dynatrace ONE support rather than Github. This helps our team respond as quickly as possible using the support team's tools and procedures.

Thanks for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support request request for further assistance with an issue
Projects
None yet
Development

No branches or pull requests

2 participants