adding files 2

This commit is contained in:
Oracle Public Cloud User
2026-09-04 13:54:16 +00:00
parent b7ec9db2bc
commit 8b3cc8dd10
83 changed files with 5045 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
version: 0.1
component: command
timeoutInSeconds: 900
shell: bash
failImmediatelyOnError: true
env:
variables:
APP_NAMESPACE: "kagent-demo"
WAIT_TIMEOUT: "300s"
steps:
- type: Command
name: Confirm target namespace
command: |
echo "Full cleanup will delete the namespace and all resources inside it."
echo "APP_NAMESPACE=${APP_NAMESPACE}"
if [ "${APP_NAMESPACE}" = "default" ] || [ "${APP_NAMESPACE}" = "kube-system" ] || [ "${APP_NAMESPACE}" = "kagent" ]; then
echo "Refusing to delete protected namespace: ${APP_NAMESPACE}"
exit 1
fi
kubectl get namespace "${APP_NAMESPACE}"
- type: Command
name: Delete LoadBalancer before namespace cleanup
command: |
echo "Deleting LoadBalancer service first to start OCI load balancer cleanup"
kubectl delete service order-service-lb \
-n "${APP_NAMESPACE}" \
--ignore-not-found=true
- type: Command
name: Delete namespace
command: |
kubectl delete namespace "${APP_NAMESPACE}" \
--ignore-not-found=true \
--timeout="${WAIT_TIMEOUT}"
- type: Command
name: Verify namespace deletion
command: |
if kubectl get namespace "${APP_NAMESPACE}" >/dev/null 2>&1; then
echo "Namespace ${APP_NAMESPACE} still exists or is terminating."
kubectl get namespace "${APP_NAMESPACE}" -o wide
exit 1
fi
echo "Namespace ${APP_NAMESPACE} was deleted successfully."