Skip to content
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

#54 ignore the occasional post delete cluster #79

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,20 @@ jobs:
run: |
kubectl cluster-info
kubectl get nodes
test-with-ignore-failed-clean:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0

- name: Create kind cluster with custom name
uses: ./
with:
kubectl_version: "v1.24.6"
ignore_failed_clean: true

- name: Test
run: |
kubectl cluster-info
kubectl get nodes
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ For more information on inputs, see the [API Documentation](https://developer.gi
- `verbosity`: info log verbosity, higher value produces more output
- `kubectl_version`: The kubectl version to use (default: v1.23.12)
- `install_only`: Skips cluster creation, only install kind (default: false)
- `ignore_failed_clean`: Whether to ignore the post delete cluster action failing (default: false)

### Example Workflow

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ inputs:
install_only:
description: "Skips cluster creation, only install kind (default: false)"
required: false
ignore_failed_clean:
description: "Whether to ignore the post-delete the cluster (default: false)"
default: false
required: false
runs:
using: "node16"
main: "main.js"
Expand Down
2 changes: 1 addition & 1 deletion cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ main() {
args+=(--name "${DEFAULT_CLUSTER_NAME}")
fi

kind delete cluster "${args[@]}"
kind delete cluster "${args[@]}" || "${INPUT_IGNORE_FAILED_CLEAN}"
}

main