Skip to content

Affinity in sumologic-sumologic-otelcol-events StatefulSet is Discarded  #3830

@ugrkm

Description

@ugrkm

Describe the bug A clear and concise description of what the bug is.
I want to be able configure affinity for sumologic-otelcol-events StatefulSet with using helm values file.

I checked how affinity is added. It seems like the template checks if it is empty, and if not, it adds other components such as podAntiAffinity. However, it does not add affinity itself. See: https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/v4.9.0/deploy/helm/sumologic/templates/events/otelcol/statefulset.yaml#L47-L57

If we look at https://github.com/SumoLogic/sumologic-kubernetes-collection/blob/v4.9.0/deploy/helm/sumologic/templates/logs/otelcol/statefulset.yaml#L56-L58 we can see that the affinity is included in the sumologic-sumologic-otelcol-logs StatefulSet.

Configuration Configuration used for Collection e.g. user-values.yaml for helm.

sumologic:
  otelevents:
    statefulset:
      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - weight: 10
            preference:
              matchExpressions:
                - key: my-key
                  operator: In
                  values:
                    - "my-value"

To Reproduce Steps to reproduce the behavior.
You can try using above config as helm values file.
Expected behavior A clear and concise description of what you expected to happen.
We should see the affinity block added to sumologic-otel-col-events StatefulSet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions