You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use kubernetes backend and need to have several ports exposed from a service, the pipeline is getting canceled (that is actually also not very obvious, because there is no error in UI, you can see it only when checking logs from the agent directly)
The error is caused by a requirement to have ports names if there are more than one. So this configuration won't work:
{"level":"error","error":"rpc error: code = Unknown desc = Step finished with exit code 1, Service \"wp-01hhdbk671qq8d5hewnmp98f3e-0-services-0\" is invalid: [spec.ports[0].name: Required value, spec.ports[1].name: Required value]","time":"2023-12-11T21:12:46Z","message":"grpc error: wait(): code: Unknown: rpc error: code = Unknown desc = Step finished with exit code 1, Service \"wp-01hhdbk671qq8d5hewnmp98f3e-0-services-0\" is invalid: [spec.ports[0].name: Required value, spec.ports[1].name: Required value]"}
I think that the easiest solution would be to give random names to ports, since they are used by woodpecker only, so k8s users should actually not care about them. Then the pipeline syntax won't have to be updated, and it won't be a breaking change. If this solution sounds reasonable, I can implement it myself.
UPD: Or put a port number to the port name too, I think it's even easier, we just need to make sure it's a string
System Info
I'm using Woodpecker 2.0.0 installed by the official helm chart.
Component
agent
Describe the bug
When you use kubernetes backend and need to have several ports exposed from a service, the pipeline is getting canceled (that is actually also not very obvious, because there is no error in UI, you can see it only when checking logs from the agent directly)
The error is caused by a requirement to have ports names if there are more than one. So this configuration won't work:
Error:
I think that the easiest solution would be to give random names to ports, since they are used by woodpecker only, so k8s users should actually not care about them. Then the pipeline syntax won't have to be updated, and it won't be a breaking change. If this solution sounds reasonable, I can implement it myself.
UPD: Or put a port number to the port name too, I think it's even easier, we just need to make sure it's a string
System Info
I'm using Woodpecker 2.0.0 installed by the official helm chart.
Additional context
No response
Validations
next
version already [https://woodpecker-ci.org/faq#which-version-of-woodpecker-should-i-use]The text was updated successfully, but these errors were encountered: