-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConfigMap in use is being deleted #39
Comments
AFAIK the tests should cover this... |
I noticed that the current oc image is using seiso 0.6.0, which is very outdated. There have been lots of changes since, but no new release tag (maybe it got forgotten). I have now pushed 0.7.0 and I'm going to update the oc image as well. After that, please try again with Seiso 0.7.0 |
There's now a new oc image available with Seiso 0.7.0. Please try again and see if the issue still persists. |
Using the latest version of Seiso in the pipeline has resolved the issue for the customer. |
This issue is still present in Seiso 0.7.1. We are using the latest appuio/oc image on GitLab. Since As a result, a deployment on APPUiO half an hour ago deleted the ConfigMap that is being referred to by the active Deployment object: ...
$ seiso configmaps -l app=lawbrary3 --delete
level=info msg="Seiso 0.7.1, commit fddf46ce9081c232cb98084f22abe254fd889165, date 2020-11-17T09:34:43Z"
level=info msg="Deleted ConfigMap lawb-production/grafana-datasources-86t8876df9"
... Please, reopen the issue! |
Seiso again deleted a ConfigMap in a pipeline run today, even though there was only one ConfigMap left and keep is ...
$ seiso configmaps -l app=lawbrary3 --delete
level=info msg="Seiso 0.7.1, commit fddf46ce9081c232cb98084f22abe254fd889165, date 2020-11-17T09:34:43Z"
level=info msg="Deleted ConfigMap lawb-production/grafana-datasources-86t8876df9"
... Please try to fix this problem and warn your customers about this bug. It would also help if more information were printed about (default) settings being used and why a candidate was selected for deletion. The use of |
Hi Peter We understand the situation is annoying for you. Seiso is clearly not production ready. |
Hello, I think it was certainly linked to #49 which fixed the ResourceContains in kubernetes/utils. Indeed, I did this PR because seiso were deleting currently running images. |
To explain why I'm almost sure the current issue is fixed: The method The configmap is only checking resources of types defined in Before the fix of #49, That's explain why it was difficult to reproduce the configmap deletion bug in real environment. Furthermore, the config map unit test has mocked the ResourceContains, that's why it always passed. |
ConfigMaps that are still in use should not be deleted (as confirmed by the README).
Unfortunately, the current implementation seems to identify configmaps that are still in use. This results in
ConfigMap
manifests being deleted for deployments that are running at that very moment, and failing volume mounts for configmaps when pods are restarted.This should be fixed by constructing a test case that manages to reproduce the behavior.
Related source locations
Example
A somewhat complete example of a Kustomize-based deployment, which is followed by a Seiso run:
Note the ConfigMap with the "7tc6fdbf65" hash that is being deleted, even though it's obviously included in the deployment.
The text was updated successfully, but these errors were encountered: