Delete app with red [x] will restart app instead of delete it totally #6334
Comments
And if you scale the app to 0, and then try to delete it from tha overview page, then the app is still listed there. |
Yeah, looks like that 'x' tries to delete |
And don't forget the deployment.... |
It looks adding a function to KubernetesModel to get all the objects using the |
Most objects had an |
FWIW deleting the Deployment / DeploymentConfig first often seems to remove all the other RC/RS /Pods for you |
I don't think dependent deletes is on until 1.4. until then it's client side logic to cascade deletes. |
ah ok thx. I guess |
Yep. We do the same in the Java client. Best is to scale down & wait rather than delete directly to prevent orphans I've found. |
I guess the same still applies though; try delete the Deployment/DeploymentConfig first; that should then do the heavly lifting of scaling down RC/RS etc - then tidy up empty stuff at the end |
Deleting the deployment via the API doesn't do any scaling iirc. Let me double check but like I said above, cascading deletes is client side logic. |
sure - I just mean we should always scale down/delete in this order: D/DC, then RS/RS, then pods to avoid flighting with the underlying controllers in kubernetes/openshift |
If the app has a D/DC then you should scale that down, which will in turn scale down RC/RS in normal D controller fashion. Wait until D running pods == 0 & then delete D. |
Yeah scaling the D/DC is the best approach IMO. An example scale request would be: $ body=$(cat << EOF
{
"kind": "Scale",
"apiVersion": "extensions/v1beta1",
"metadata": {
"namespace": "default",
"name": "ruby-hello-world"
},
"spec": {
"replicas": 0
}
}
EOF
)
$ curl -k -H "Content-Type: application/json" -X PUT -d "$body" https://<API_SERVER_ADDRESS>/oapi/v1/namespaces/<DC_NAMESPACE>/deploymentconfigs/<DC_NAME/scale |
Ah, k, will work over that logic some more then... On Sep 13, 2016 4:46 AM, "Jimmi Dyson" notifications@github.com wrote:
|
Damn, put the wrong issue # in my commit message :-) I have it scaling down stuff in this commit -> hawtio/hawtio-kubernetes@5849c3a |
I wonder if its the new deployment config that makes k8s restart the app.
If you want to delete an app (and all its services/pods/RC/deployments etc.) then you could just click the red [x] to delete it from app page.
But now it restart it instead.
The text was updated successfully, but these errors were encountered: