debug
Some checks failed
Schemas / Schemas (push) Failing after 37s

This commit is contained in:
Joseph Hanson 2024-05-29 11:38:21 -05:00
parent 9b94c1d5b3
commit 0f3c3640f0
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o

View file

@ -60,7 +60,24 @@ jobs:
env:
KUBECONFIG: "${{ steps.kubeconfig.outputs.filePath }}"
run: |
kubectl get crds 2>&1 | sed -n '/NAME/,$p' | tail -n +2
# Extract CRDs from cluster
NUM_OF_CRDS=0
while read -r crd
do
filename=${crd%% *}
kubectl get crds "$filename" -o yaml > "$TMP_CRD_DIR/$filename.yaml" 2>&1
echo "Extracted CRD: $filename"
resourceKind=$(grep "kind:" "$TMP_CRD_DIR/$filename.yaml" | awk 'NR==2{print $2}' | tr '[:upper:]' '[:lower:]')
resourceGroup=$(grep "group:" "$TMP_CRD_DIR/$filename.yaml" | awk 'NR==1{print $2}')
# Save name and group for later directory organization
CRD_GROUPS["$resourceKind"]="$resourceGroup"
let ++NUM_OF_CRDS
done < <(kubectl get crds 2>&1 | sed -n '/NAME/,$p' | tail -n +2)
echo numCRDs: $NUM_OF_CRDS
- name: Download and run crd-extractor
env:
KUBECONFIG: "${{ steps.kubeconfig.outputs.filePath }}"