{"id":16119029,"url":"https://github.com/germainlefebvre4/ns-killer","last_synced_at":"2025-07-26T17:05:24.422Z","repository":{"id":50161110,"uuid":"228632458","full_name":"germainlefebvre4/ns-killer","owner":"germainlefebvre4","description":"NS Killer is a Kubernetes project to kill all namespaces living over X times. Quite useful when auto-generating development environments on the fly and giving them a lifecycle out-of-the-box from Kubernetes or even Helm.","archived":false,"fork":false,"pushed_at":"2022-12-08T11:41:58.000Z","size":96,"stargazers_count":20,"open_issues_count":10,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T03:22:38.831Z","etag":null,"topics":["configmap","delete","docker","dockerhub","exclude","hacktoberfest","helm","include","kubernetes","lifecycle","namespace","namespaces-living","ns-killer","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/germainlefebvre4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-17T14:19:05.000Z","updated_at":"2023-08-28T14:59:07.000Z","dependencies_parsed_at":"2023-01-25T12:45:42.058Z","dependency_job_id":null,"html_url":"https://github.com/germainlefebvre4/ns-killer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/germainlefebvre4%2Fns-killer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/germainlefebvre4%2Fns-killer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/germainlefebvre4%2Fns-killer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/germainlefebvre4%2Fns-killer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/germainlefebvre4","download_url":"https://codeload.github.com/germainlefebvre4/ns-killer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243878439,"owners_count":20362432,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configmap","delete","docker","dockerhub","exclude","hacktoberfest","helm","include","kubernetes","lifecycle","namespace","namespaces-living","ns-killer","python"],"created_at":"2024-10-09T20:52:09.486Z","updated_at":"2025-03-17T18:30:43.684Z","avatar_url":"https://github.com/germainlefebvre4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NS Killer\n\n## What is NS Killer?\nA Kubernetes project to kill all namespace living over X times. Quite useful when auto-generated development environments on the fly and give them a lifecycle out-of-the-box from Kubernetes or even Helm.\n\n## Getting started\n### Docker\n```bash\ndocker run -ti -d --name=ns-killer germainlefebvre4/ns-killer\n```\n\nDocker image is avaiblable on [Docker Hub](https://hub.docker.com/r/germainlefebvre4/ns-killer).\n\n### Kubernetes\n```bash\nkubectl apply -f kubernetes/CronJob\n```\n\n## Requirements\nPython version needs to be:\n* `3.7`\n* `3.8`\n\nPython versions `3.6` and under are not supported because of interpretation of datetime library.\n\n## Configuration\nThe container has no parameters. Configuration is provided by a file at `/etc/config/ns-killer`.\n\nConfiguration file is structured as following:\n\n| Attribute | Description | Values | Default | Implemented? |\n|---|---|---|---|---|\n| config.dryrun | Enable the dryrun mode | (string) `enabled` | False | Yes |\n| config.retention.kind | Time unit for the frequency loop | (string) `minutes`, `hours`, `days`, `weeks`, `months` | - | Yes |\n| config.retention.time | Time data for the frequency loop | (integer) | - | Yes |\n| config.namespace.exclude | List of namespaces to keep | list of (string) | - | Yes |\n| config.namespace.only | List of namespaces to delete. This parameter make the exclude list evicted. | list of (string) | - | Yes |\n\n### Example\n```yaml\nconfig:\n  dryrun: enabled\n  retention:\n    kind: hours\n    time: 2\nnamespace:\n  exclude:\n    - ns-killer\n    - kube-system\n    - kube-public\n    - kube-node-lease\n    - default\n    - ingress-nginx\n    - cert-manager\n    - gitlab-managed-apps\n    - cattle-system\n    - monitoring\n    - prometheus\n    - jenkins\n    - mongodb\n    - rabbitmq-ha\n    - wordpress\n    - gcr-cleanup\n  only: []\n```\n\n## Where to use this image\nLet's run this image in a Kubernetes cluster.\n\nKubernetes manifest are present in directory [kubernetes/](https://github.com/germainlefebvre4/ns-killer/tree/master/kuberneteskubernetes).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgermainlefebvre4%2Fns-killer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgermainlefebvre4%2Fns-killer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgermainlefebvre4%2Fns-killer/lists"}