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

Disabling agent persistence renders invalid StatefulSet #171

Closed
IceBear2k opened this issue Mar 16, 2024 · 1 comment
Closed

Disabling agent persistence renders invalid StatefulSet #171

IceBear2k opened this issue Mar 16, 2024 · 1 comment

Comments

@IceBear2k
Copy link

Steps to reproduce

  • Use version 1.2.1 from https://woodpecker-ci.org/
  • Set woodpecker.agent.persistence.enabled to false

Description

While using defaults with agent persistence of 1GiB works fine out-of-the-box, trying to disable agent persistence results in an invalid StatefulSet, not spawning any agent pods and failing with the following error:

Warning FailedCreate 3m3s (x17 over 8m31s) statefulset-controller create Pod woodpecker-agent-0 in StatefulSet woodpecker-agent failed error: Pod "woodpecker-agent-0" is invalid: spec.containers[1].image: Required value`

See screenshot for comparison between default agent persistence and disabling agent persistence.
image

This is a result of the If-statement here https://github.com/woodpecker-ci/helm/blob/main/charts/woodpecker/charts/agent/templates/statefulset.yaml#L109 and especially the If-Else-statement further down here https://github.com/woodpecker-ci/helm/blob/main/charts/woodpecker/charts/agent/templates/statefulset.yaml#L133

I don't quite get what the point of the If-Else-statement is in the first place, since there won't be a volume mount at all, when agent persistence is disabled.

@pat-s
Copy link
Contributor

pat-s commented Apr 18, 2024

Should be fixed by #185

@pat-s pat-s closed this as completed Apr 18, 2024
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