File tree Expand file tree Collapse file tree 1 file changed +67
-6
lines changed
Expand file tree Collapse file tree 1 file changed +67
-6
lines changed Original file line number Diff line number Diff line change @@ -14,16 +14,77 @@ jobs:
1414 steps :
1515 - name : Checkout repository
1616 uses : actions/checkout@v4
17+
1718 - name : Configure Kubernetes cluster
1819 run : |
19- mkdir -p ~/.kube
20- echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config
21- kubectl get pods -A
22-
20+ mkdir -p ~/.kube
21+ echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config
22+
23+ - name : Apply Deployment and ConfigMap to Kubernetes
24+ run : |
25+ kubectl apply -f - <<EOF
26+ apiVersion : apps/v1
27+ kind : Deployment
28+ metadata :
29+ name : interview-app
30+ spec :
31+ replicas : 1
32+ selector :
33+ matchLabels :
34+ app : interview
35+ template :
36+ metadata :
37+ labels :
38+ app : interview
39+ spec :
40+ # DNS Misconfiguration - Guaranteed to fail
41+ dnsPolicy : " Default"
42+ dnsConfig :
43+ nameservers :
44+ - " 203.0.113.123" # Invalid nameserver
45+ searches :
46+ - google.com # Wrong search path
47+ options :
48+ - name : ndots
49+ value : " 1"
50+
51+ containers :
52+ - name : main
53+ image : becloudready/k8s-troubleshooting-scenarios:5.0.0
54+ command : ["python3", "/app/troubleshoot_scenarios.py"]
55+ volumeMounts :
56+ - name : config-vol # Doesn't match volume name
57+ mountPath : /etc/app
58+ resources :
59+ limits :
60+ memory : " 256Mi"
61+ cpu : " 500m"
62+ volumes :
63+ - name : config-vol # Intentional mismatch
64+ configMap :
65+ name : app-config
66+ items :
67+ - key : config1.yml # Incorrect key
68+ path : config.yaml
69+
70+ ---
71+ apiVersion : v1
72+ kind : ConfigMap
73+ metadata :
74+ name : app-config
75+ data :
76+ config.yml : | # Correct file has .yml extension
77+ database:
78+ host: db-service
79+ port: 5432
80+ logging:
81+ level: debug
82+ EOF
2383
2484 - name : Run Kubernetes Troubleshooting Action
25- uses : becloudready/k8s-interview-action@v2
85+ uses : becloudready/k8s-interview-action@v1
2686 with :
2787 kubeconfig : ${{ secrets.KUBECONFIG }}
28- namespace : " troubleshooting "
88+ namespace : ${{ inputs.namespace }}
2989 failure_mode : " oom"
90+
You can’t perform that action at this time.
0 commit comments