Managed workloads are not compatible with kubectl rollout restart
#4495
Labels
bug
Something isn't working
operator
Grafana Agent Operator related
variant/operator
Related to Grafana Agent Static Operator.
What's wrong?
Workloads (Deployment, StatefulSet, DaemonSet) owned and managed by the grafana agent operator do not work well with
kubectl rollout restart ...
. This is becausekubectl rollout restart
works by setting annotationkubectl.kubernetes.io/restartedAt
in.spec.template.metadata.annotations
, but the grafana agent operator will immediately remove that annotation again and thus interrupt/stop th rollout.The offending (missing) code is at
A possible fix could be to merge
.spec.template.metadata.annotations
(and maybe also.spec.template.metadata.labels
) similar to what is already done for.metadata.annotations
and.metadata.labels
.Steps to reproduce
This can be reproduced by restarting any workload managed by the grafana agent operator using
kubectl rollout restart ...
.System information
No response
Software version
No response
Configuration
No response
Logs
No response
The text was updated successfully, but these errors were encountered: