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

Add affinity support for DT oneAgent #2427

Open
a7vicky opened this issue Nov 30, 2023 · 1 comment
Open

Add affinity support for DT oneAgent #2427

a7vicky opened this issue Nov 30, 2023 · 1 comment

Comments

@a7vicky
Copy link

a7vicky commented Nov 30, 2023

Is your feature request related to a problem? Please describe.

Since oneAgent is daemonset and daemonset supports affinity for pod's scheduling constraints, This would be nice to give users the flexibility to use matchExpressions to schedule pods on the desired nodes.

→ kubectl explain ds.spec.template.spec.affinity --recursive

KIND:     DaemonSet
VERSION:  apps/v1

RESOURCE: affinity <Object>

DESCRIPTION:
     If specified, the pod's scheduling constraints

     Affinity is a group of affinity scheduling rules.

FIELDS:
   nodeAffinity	<Object>
      preferredDuringSchedulingIgnoredDuringExecution	<[]Object>
         preference	<Object>
            matchExpressions	<[]Object>
               key	<string>
               operator	<string>
               values	<[]string>
            matchFields	<[]Object>
               key	<string>
               operator	<string>
               values	<[]string>
         weight	<integer>
      requiredDuringSchedulingIgnoredDuringExecution	<Object>
         nodeSelectorTerms	<[]Object>
            matchExpressions	<[]Object>
               key	<string>
               operator	<string>
               values	<[]string>
            matchFields	<[]Object>
               key	<string>
               operator	<string>
               values	<[]string>
   podAffinity	<Object>
      preferredDuringSchedulingIgnoredDuringExecution	<[]Object>
         podAffinityTerm	<Object>
            labelSelector	<Object>
               matchExpressions	<[]Object>
                  key	<string>
                  operator	<string>
                  values	<[]string>
               matchLabels	<map[string]string>
            namespaceSelector	<Object>
               matchExpressions	<[]Object>
                  key	<string>
                  operator	<string>
                  values	<[]string>
               matchLabels	<map[string]string>
            namespaces	<[]string>
            topologyKey	<string>
         weight	<integer>
      requiredDuringSchedulingIgnoredDuringExecution	<[]Object>
         labelSelector	<Object>
            matchExpressions	<[]Object>
               key	<string>
               operator	<string>
               values	<[]string>
            matchLabels	<map[string]string>
         namespaceSelector	<Object>
            matchExpressions	<[]Object>
               key	<string>
               operator	<string>
               values	<[]string>
            matchLabels	<map[string]string>
         namespaces	<[]string>
         topologyKey	<string>
   podAntiAffinity	<Object>
      preferredDuringSchedulingIgnoredDuringExecution	<[]Object>
         podAffinityTerm	<Object>
            labelSelector	<Object>
               matchExpressions	<[]Object>
                  key	<string>
                  operator	<string>
                  values	<[]string>
               matchLabels	<map[string]string>
            namespaceSelector	<Object>
               matchExpressions	<[]Object>
                  key	<string>
                  operator	<string>
                  values	<[]string>
               matchLabels	<map[string]string>
            namespaces	<[]string>
            topologyKey	<string>
         weight	<integer>
      requiredDuringSchedulingIgnoredDuringExecution	<[]Object>
         labelSelector	<Object>
            matchExpressions	<[]Object>
               key	<string>
               operator	<string>
               values	<[]string>
            matchLabels	<map[string]string>
         namespaceSelector	<Object>
            matchExpressions	<[]Object>
               key	<string>
               operator	<string>
               values	<[]string>
            matchLabels	<map[string]string>
         namespaces	<[]string>
         topologyKey	<string>

Describe the solution you'd like
Extend dynakube CRD fields to add affinity for oneAgnet daemonset and the dynatrace-operator creates daemonset using these fields.

Describe alternatives you've considered
nodeSelector: This is not a solution in our case because the label we want to use is dynamically added by the controller and the value for that label is not constant.

@mfabricanti
Copy link

Up!

I need to monitor only a few nodes of a cluster.
It would be nice to have the hability to use nodeAfinity for OneAgent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants