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,58 @@
version: 0.1
component: command
timeoutInSeconds: 900
shell: bash
failImmediatelyOnError: true
env:
variables:
APP_NAMESPACE: kagent-demo
PAYMENT_DEPLOYMENT: payment-service
PAYMENT_CONTAINER: payment-service
BROKEN_IMAGE_PULL_SECRET: missing-ocir-secret
steps:
- type: Command
name: Apply business degradation ConfigMap
command: |
kubectl apply -f k8s/broken/revenue-risk-configmap.yaml
kubectl rollout restart deployment/order-service -n "${APP_NAMESPACE}"
- type: Command
name: Apply limited HPA
command: |
kubectl apply -f k8s/broken/order-hpa-limited.yaml
kubectl get hpa order-service -n "${APP_NAMESPACE}" -o wide
- type: Command
name: Break payment image pull secret
command: |
kubectl patch deployment "${PAYMENT_DEPLOYMENT}" -n "${APP_NAMESPACE}" \
--type merge \
-p "{
\"spec\": {
\"template\": {
\"spec\": {
\"imagePullSecrets\": [
{\"name\": \"${BROKEN_IMAGE_PULL_SECRET}\"}
],
\"containers\": [
{
\"name\": \"${PAYMENT_CONTAINER}\",
\"imagePullPolicy\": \"Always\"
}
]
}
}
}
}"
kubectl rollout restart deployment/"${PAYMENT_DEPLOYMENT}" -n "${APP_NAMESPACE}"
- type: Command
name: Show simulated failures
command: |
sleep 45
kubectl get pods -n "${APP_NAMESPACE}" -o wide
kubectl get hpa -n "${APP_NAMESPACE}" -o wide
kubectl get events -n "${APP_NAMESPACE}" --sort-by=.lastTimestamp | tail -60