Closed matti closed 5 years ago
/lib/k8s/transport.rb:206:in `parse_response': DELETE /apis/apps/v1beta1/namespaces/default/deployments/nginx-deployment => HTTP 400 Bad Request: converting (url.Values).[]string.[]string to (v1.DeleteOptions).*v1.DeletionPropagation.v1.DeletionPropagation: couldn't copy '[]string' into 'v1.DeletionPropagation'; didn't understand types (K8s::Error::BadRequest)
and in 1.10.7-gke.6:
transport.rb:206::in `parse_response': DELETE /apis/apps/v1beta1/namespaces/default/deployments/nginx-deployment => HTTP 400 Bad Request: converting (url.Values).[]string.[]string to (v1.DeleteOptions).*v1.DeletionPropagation.v1.DeletionPropagation: couldn't copy '[]string' into 'v1.DeletionPropagation'; didn't understand types (K8s::Error::BadRequest)
``
this is a nasty one, I don't think there's much currently we can do on Mortar side. Needs some way on k8s-client that would allow Mortar to override, maybe via some env or something, the propagationPolicy
from query params to DELETE body. But having a body on DELETE is, well, somewhat borked. :)
@matti Would something like this work:
$ bundle exec mortar yank nginx
enter 'nginx' to confirm yank: nginx
/Users/jussi/code/k8s-client/lib/k8s/transport.rb:208:in `parse_response': DELETE /apis/apps/v1beta1/namespaces/default/deployments/myapp => HTTP 400 Bad Request: converting (url.Values).[]string.[]string to (v1.DeleteOptions).*v1.DeletionPropagation.v1.DeletionPropagation: couldn't copy '[]string' into 'v1.DeletionPropagation'; didn't understand types (K8s::Error::BadRequest)
$ KUBE_DELETE_OPTS_BODY=true bundle exec mortar yank nginx
enter 'nginx' to confirm yank: nginx
yanked nginx successfully!
Alternatively, or maybe complementary, that could be made as an flag for the commands.
WDYT?
As a user I don't understand why it just doesn't work - eg. detect that it is GKE and enable that automatically
fixed in #87
https://github.com/kubernetes/kubernetes/issues/43329#issuecomment-363678598
aka GKE default version