Skip to content

[BUG] Restart strategy does not change behaviour of stakater #1011

@k8soneill

Description

@k8soneill

Describe the bug
When applying the reloader.stakater.com/rollout-strategy: "restart" annotation the docs suggest that the controller will delete the pod directly rather than update the deployment however no pod deletion is happening. We are using an operator backed deployment hence why we can see no restart applied as the operator overwrites any direct changes to the deployment meaning no new pods are deployed.

To Reproduce
Deploy a grafana instance via grafana operator. Mount a simple secret in the deployment spec.

Add the reloader.stakater.com/rollout-strategy: "restart" to the deployment, pod and secret (docs aren't clear which resource this should be added to)

Edit the secret value to trigger a stakater update.

Check to see if a new pod is running.

Expected behavior
The controller runs a delete operation directly on the pod leading to a new pod being created and the old one terminated. As per this section of the readme:

"By default, Reloader uses the rollout strategy — it updates the pod template to trigger a new rollout. This works well in most cases, but it can cause problems if you're using GitOps tools like ArgoCD, which detect this as configuration drift.

To avoid that, you can switch to the restart strategy, which simply restarts the pod without changing the pod template."

Screenshots

Environment

  • Operator Version: 1.4.8
  • OpenShift Version: 4.17.29

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions