godaddy / godaddy/kubernetes-client
Delete deployment and associated pods?
- Dominant language
- JavaScript
- Stars
- 963
- Forks
- 189
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
```
const Api = require('kubernetes-client');
const deploy = new Api.Extensions({
url: 'https://SERVER:6443',
version: 'v1beta1', // Defaults to 'v1beta1'
insecureSkipTlsVerify: true,
auth: {
user: 'root',
pass: 'pass'
}
});
function print(err, result) {
console.log(JSON.stringify(err || result, null, 2));
}
// deploy.ns('fortesting').deploy('echoserver').get(print);
deploy.ns('fortesting').deploy({name: 'echoserver', qs: { PropagationPolicy: false }}).delete(print);
```
Output:
```
{
"code": 404
}
```
I can delete the deploy with 'deploy.ns('fortesting').deploy('echoserver').delete(print);` but this command cannot delete the pods, which I've created through deploy.
I've found the issue #62 , the option **orphanDependents** is depricated ([https://kubernetes.io/docs/api-reference/v1.6/#deployment-v1beta1-extensions](doc api)) it's now **PropagationPolicy**.
Contributor guide
Research direction
Start by reproducing the deletion call in the issue's JavaScript example and compare it with issue #62 and the linked Kubernetes Deployment API documentation. Check how the deployment delete options are sent and whether the callback's 404 is expected; the work is done when the documented deletion behavior correctly handles the associated pods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, kubernetes
- Domain
- api, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100