Kubernetes: Lots of builds failing due to disallowed changes to the spec

Hi there,

I’ve finally gotten around to setting up Drone CI on the Kubernetes cluster here, however I’ve run into some issues. One of these issues is Drone updating specs which aren’t allowed to be updated:

Build Docker: Pod "drone-cohli9zzp4ct6d4x2wgj" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)   core.PodSpec{    Volumes: {{Name: "drone-pz5ehmjo3lc6126zjy1d", VolumeSource: {EmptyDir: &{}}}, {Name: "drone-s3gmsg3ec5h9osk9afli", VolumeSource: {DownwardAPI: &{Items: {{Path: "env", FieldRef: &{APIVersion: "v1", FieldPath: "m

This error occurs on, if I am to guess, 1 out of 5 builds.

Is there any way to solve this?
Thanks!

What version of Kubernetes and what version of the runner are you using?

Thanks for your reply!

I’m running Kubernetes versions:

Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.4", GitCommit:"3cce4a82b44f032d0cd1a1790e6d2f5a55d20aae", GitTreeState:"clean", BuildDate:"2021-08-11T18:16:05Z", GoVersion:"go1.16.7", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.3", GitCommit:"ca643a4d1f7bfe34773c74f79527be4afd95bf39", GitTreeState:"clean", BuildDate:"2021-07-15T20:59:07Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}

And drone version:

controller: drone/drone:2.4.0
runner: drone/drone-runner-kube:latest

I recommend using drone/drone-runner-kube:v1.0.0-rc.1 and then reporting back if you continue to experience issues.

Apologies for the late answer. With the 1.0.0-rc.1 tag the issue still appears.