https://github.com/loft-sh/delete-vcluster
https://github.com/loft-sh/delete-vcluster
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/loft-sh/delete-vcluster
- Owner: loft-sh
- License: mit
- Created: 2021-09-10T14:01:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-16T13:51:13.000Z (about 2 years ago)
- Last Synced: 2025-05-31T07:26:02.853Z (8 months ago)
- Language: TypeScript
- Size: 1.03 MB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# delete-vcluster
This is a GitHub Action to delete a vcluster in Loft. It is intended to be used with the [setup-loft GitHub Action](https://github.com/loft-sh/setup-loft) to first install the Loft CLI.
## Usage
This action will delete a Loft VCluster.
### Example: Create and Delete a vcluster named `staging` on commits to `main`.
```yaml
name: Create Staging Cluster
on:
push:
branches:
- 'main'
jobs:
deploy-staging:
runs-on: ubuntu-latest
steps:
- name: Install Loft CLI
uses: loft-sh/setup-loft@main
with:
url: ${{ secrets.LOFT_URL }}
access-key: ${{ secrets.LOFT_ACCESS_KEY }}
- name: Create staging VCluster
uses: loft-sh/create-vcluster@main
with:
name: staging
- name: Delete staging VCluster
uses: loft-sh/delete-vcluster@main
with:
name: staging
```
## Customizing
### inputs
The following inputs can be used as `step.with` keys
| Name | Type | Description |
|---------------------|----------|------------------------------------|
| `name` | String | The name of the vcluster to delete
| `cluster` | String | The cluster on which to delete the vcluster (if there are multiple vclusters with the same name across multiple clusters)
| `project` | String | The project to use (requires Loft 3.0 and above)
| `space` | String | The space on which to delete the vcluster (if there are multiple vclusters with the same name across multiple spaces)
| `delete-space` | String | Should the corresponding space be deleted