Skip to content

terminationGracePeriodSeconds not applied to daemonset #4003

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

Closed
tincho-burgos opened this issue May 16, 2025 · 0 comments · Fixed by #4006
Closed

terminationGracePeriodSeconds not applied to daemonset #4003

tincho-burgos opened this issue May 16, 2025 · 0 comments · Fixed by #4006
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@tincho-burgos
Copy link

Component(s)

collector

What happened?

Description

When setting terminationGracePeriodSeconds on the otel-collector agent, it is not applied to the underlying daemonset.
https://github.com/open-telemetry/opentelemetry-operator/blob/main/apis/v1beta1/common.go

https://github.com/open-telemetry/opentelemetry-operator/blob/0cda0e2e94bcb231647d20fc2d1592d4615ad37a/internal/manifests/collector/daemonset.go

Steps to Reproduce

helm template

---
# Source: dynatrace-otel-collector/templates/agent.yaml
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
  name: something-dynatrace-otel-collector-agent
spec:
  envFrom:
  - secretRef:
      name: something-dynatrace-otel-collector
  env:
  - name: KUBE_NODE_NAME
    valueFrom:
      fieldRef:
        fieldPath: spec.nodeName
  mode: "daemonset"
  terminationGracePeriodSeconds: 600
...
# Source values.yaml 
...
# Agent relies on a DaemonSet
agent:
  enabled: true
  terminationGracePeriodSeconds: 600

  resources:
    limits:
      memory: 512Mi
    requests:
      cpu: 50m
      memory: 256Mi

  securityContext:
    capabilities:
...

Expected Result

k get ds/collector 

...
      terminationGracePeriodSeconds: 600
...

Actual Result

The daemonset is using the default value

k get ds/collector 

...
      terminationGracePeriodSeconds: 30
...

Kubernetes Version

1.30

Operator version

1.125.0

Collector version

0.125.0

Environment information

Environment

OS Image: Amazon Linux 2
Operating System: linux
Architecture: arm64
Container Runtime Version: containerd://1.7.27

Log output

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
2 participants