Skip to content

Commit 710b427

Browse files
author
hadar-co
committed
organize final schemas in dirs by group
1 parent cf4f3bd commit 710b427

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Utilities/crd-extractor.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ do
5656
singularNameValue=$(grep singular: "$TMP_CRD_DIR/"$resourceKind".yaml" -m 1)
5757
singularName=${singularNameValue##* }
5858

59+
# Get group
60+
resourceGroup=${resourceKind#*.}
61+
5962
# Save name and group for later directory organization
60-
CRD_GROUPS["$singularName"]="${resourceKind#*.}"
63+
CRD_GROUPS["$singularName"]="$resourceGroup"
6164

6265
let NUM_OF_CRDS++
6366
done < <(kubectl get crds 2>&1 | sed -n '/NAME/,$p' | tail -n +2)

0 commit comments

Comments
 (0)