Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RossyWhite/konmari
🧹Tidy up ConfigMaps and Secrets that don't spark joy ⚡
https://github.com/RossyWhite/konmari
configmap go k8s
Last synced: 2 months ago
JSON representation
🧹Tidy up ConfigMaps and Secrets that don't spark joy ⚡
- Host: GitHub
- URL: https://github.com/RossyWhite/konmari
- Owner: RossyWhite
- License: mit
- Created: 2020-02-19T12:57:51.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-12T13:51:41.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T23:16:22.756Z (6 months ago)
- Topics: configmap, go, k8s
- Language: Go
- Homepage:
- Size: 32.2 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-golang-repositories - konmari
README
# konmari 🧹
`konmari` is a garbage collector to delete `ConfigMaps` and `Secrets` that are no longer referenced by Pods.
## Running as a CronJob
`konmari` can be run as a job or cronjob inside of a pod.
When it runs, it deletes `ConfigMaps` or `Secrets` that are created before the period of time specified by `deletePeriod`, and are not referenced by any pod.※ Only `Opaque` type of `Secrets` are subject to delete.
### Setup RBAC
```bash
$ kuectl create -f kubernetes/rbac.yaml
```### Create a CronJob
```bash
$ kuectl create -f kubernetes/cronjob.yaml
```## Command line flags
| Flag | Description | Default |
| :--- | :--- | :--- |
| `namespace` | Namespace in which konmari run. | `default` |
| `deletePeriod` | Period to judge as old Object. | `30days` |
| `kubeconfig` | Path to kubeconfig file with authorization. | `""` |
| `dryrun` | Whether or not to actually delete Objects. | `false` |
| `disableSecrets` | Whether or not to ignore `Secrets`. | `false` |
| `disableConfigMaps` | Whether or not to ignore `ConfigMaps`. | `false` |