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.
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.
Steps to reproduce
1.2.1
fromhttps://woodpecker-ci.org/
woodpecker.agent.persistence.enabled
tofalse
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:
See screenshot for comparison between default agent persistence and disabling agent persistence.![image](https://github.com/woodpecker-ci/helm/assets/4847450/019c1d09-2136-4cdd-9fcd-6f3d5a8e330c)
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.