Skip to content

Delete Namespace and Databases manually #68

Delete Namespace and Databases manually

Delete Namespace and Databases manually #68

name: Delete Namespace and Databases manually
on:
workflow_dispatch:
inputs:
namespace:
type: string
description: Kubernetes namespace to delete, has to start with e.g. spsh-1234
required: true
jobs:
check_namespace_input:
runs-on: ubuntu-latest
steps:
- name: Check if namespace is allowed, fails if it not starts with ticketnr, e.g. spsh-1234
run: |
regex='^([[:alpha:]]+?-[[:digit:]]+)'
[[ ${{ github.event.inputs.namespace }} =~ $regex ]]
echo "${BASH_REMATCH[1]}"
delete_namespace:
needs:
- check_namespace_input
uses: dBildungsplattform/spsh-app-deploy/.github/workflows/delete-namespace.yml@DBP-453-Create-Redis-DBCluster-available-for-session-storage-of-SPSH
with:
namespace: ${{ github.event.inputs.namespace }}
secrets:
SPSH_DEV_KUBECONFIG: ${{ secrets.SPSH_DEV_KUBECONFIG }}
deletion_successful:
needs:
- delete_namespace
runs-on: ubuntu-latest
steps:
- run: echo "Deletion of namespace" ${{ github.event.inputs.namespace }} "done"