woodpecker-ci / helm

This repo contains the helm charts of the Woodpecker project.
Apache License 2.0
20 stars 16 forks source link

Disabling agent persistence renders invalid StatefulSet #171

Closed IceBear2k closed 3 months ago

IceBear2k commented 4 months ago

Steps to reproduce

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 commented 3 months ago

Should be fixed by #185