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

How to Setup nodeAffinity for the open-telemetry/opentelemetry-kube-stack replicaset (collectors)? #70

Open
mgrossFreudenberg opened this issue Jan 17, 2025 · 1 comment

Comments

@mgrossFreudenberg
Copy link

We use the helm opentelemetry-kube-stack open-telemetry/opentelemetry-kube-stack to monitor our K8S.

I tried to override nodeaffinity in the helm configuration however it is not picked up by the replicaset monitoring the cluster.

Part of the helm configuration changed:

...
affinity:
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
        - matchExpressions:
            - key: agentpool
              operator: NotIn
              values:
                - wpool
....
@rogercoll
Copy link
Contributor

@mgrossFreudenberg Could you share which version of the open-telemetry/opentelemetry-kube-stack Helm Chart is being used? Is the shared configuration defined at the root level of the YAML file?

The affinity configuration can be globally applied to any Pod deployed by the Helm Chart if it is defined under the defaultCRConfig:

...
defaultCRConfig:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
          - matchExpressions:
              - key: agentpool
                operator: In
                values:
                  - wpool
...

The config can also be applied to a specific collector type (e.g the cluster collector which gathers the K8s metrics/events):

...
collectors:
  #  Cluster is a K8s deployment EDOT collector focused on gathering telemetry
  #  at the cluster level (Kubernetes Events and cluster metrics).
  cluster:
    affinity:
      nodeAffinity:
        requiredDuringSchedulingIgnoredDuringExecution:
          nodeSelectorTerms:
            - matchExpressions:
                - key: agentpool
                  operator: In
                  values:
                    - wpool
...

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