Skip to content

shiftstack/prune

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prune stale OpenShift resources in OpenStack

List resources older than a threshold.

Ignores resources tagged with: shiftstack-prune=keep.

Use

Dry run:

export OS_CLOUD=<clouds.yaml entry>
./prune

Actual run:

export OS_CLOUD=<clouds.yaml entry>
./prune --no-dry-run

Configure the resoruce TTL with --resource-ttl=<duration> where <duration> is expressed as a Go duration. For example:

export OS_CLOUD=<clouds.yaml entry>
./prune --no-dry-run --resource-ttl=5h

Resource filtering

Filter resources by type:

# Only process servers and volumes
./prune --include=servers,volumes

# Process everything except images and networks
./prune --exclude=images,networks

Available resource types:

| Resource type    | Service    | Description                        |
|------------------|------------|------------------------------------|
| `appcreds`       | `keystone` | Application credentials            |
| `containers`     | `swift`    | Object storage containers          |
| `floatingips`    | `neutron`  | Public IP addresses               |
| `images`         | `glance`   | Virtual machine images            |
| `loadbalancers`  | `octavia`  | Load balancers                    |
| `networks`       | `neutron`  | Virtual networks                  |
| `ports`          | `neutron`  | Virtual network ports             |
| `routers`        | `neutron`  | Virtual routers                   |
| `securitygroups` | `neutron`  | Security groups                   |
| `servers`        | `nova`     | Virtual machines                  |
| `shares`         | `manila`   | Shared file systems               |
| `trunks`         | `neutron`  | Virtual network trunks            |
| `volumes`        | `cinder`   | Block storage volumes             |
| `volumesnapshots`| `cinder`   | Block storage volume snapshots    |

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published