Open catusax opened 1 year ago
not just secret, failed kaniko pods also preserved
kubectl get pod
kaniko-pnwwj 1/2 Error 0 8m46s
kaniko-xcfks 1/2 Error 0 6m30s
yes. also happening for me.
dockerConfig:
secretName: docker-cfg
fixes the issue so you dont need to delete but the other issue is that this uses just default namespace. should be allowed to provide a namespace.
building with kaniko and
cluster.dockerConfig.path
configured , if first build fails, skaffold wont delete the DockerConfigSecret, and it will prevent the second try.seems that teardownDockerConfigSecret func is a PostBuild function, and postbuild function only runs when build success.
setting randomDockerConfigSecret to true can solve the problem temporarily ,but all failed builds will create docker-cfg secret and needs to delete manually.
i think skaffold should use
kubectl apply
instead ofkubectl create
to create docker-cfg at here if _, err := secrets.Create(ctx, secret, metav1.CreateOptions{}); err != nil {should i make a pr?
Expected behavior
start building
Actual behavior
skaffold prints error
creating docker config secret "docker-cfg": secrets "docker-cfg" already exists
Information
Steps to reproduce the behavior
skaffold build
skaffold build
again