Skip to content

Commit 5f7ea75

Browse files
authored
Merge pull request #241 from draios/ddl/ocp-routes-k8s-pdb
2 parents fb2c5a6 + 0b47d61 commit 5f7ea75

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

support_bundle/get_support_bundle.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,14 @@ main() {
402402
kubectl ${CONTEXT_OPTS} ${KUBE_OPTS} get pvc | grep sysdig | tee -a ${LOG_DIR}/pvc_output.log
403403
kubectl ${CONTEXT_OPTS} ${KUBE_OPTS} get storageclass | tee -a ${LOG_DIR}/sc_output.log || echo "No permission to get StorageClasses"
404404

405-
# Get info on deployments, statefulsets, persistentVolumeClaims, daemonsets, and ingresses
405+
# Get info on deployments, statefulsets, persistentVolumeClaims, daemonsets, ingresses, ocp routes and pod distruption budgets
406406
echo "Gathering Manifest Information"
407-
for object in svc deployment sts pvc daemonset ingress replicaset networkpolicy cronjob configmap; do
407+
objects=("svc" "deployment" "sts" "pvc" "daemonset" "ingress" "replicaset" "networkpolicy" "cronjob" "configmap" "pdb")
408+
# Check within API server if "routes" api resource is available (in order to gather ingresses on OCP)
409+
if $(kubectl api-resources | grep -q "routes"); then
410+
objects+=("routes")
411+
fi
412+
for object in "${objects[@]}"; do
408413
items=$(kubectl ${CONTEXT_OPTS} ${KUBE_OPTS} get ${object} -o jsonpath="{.items[*]['metadata.name']}")
409414
mkdir -p ${LOG_DIR}/${object}
410415
for item in ${items}; do

0 commit comments

Comments
 (0)