Skip to content

Commit 5de8043

Browse files
author
hadar-co
authored
Merge pull request #43 from datreeio/namefix
ensure unique filename for each crd
2 parents 7913a31 + 380ea55 commit 5de8043

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Utilities/crd-extractor.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ mkdir -p $TMP_CRD_DIR
3737
NUM_OF_CRDS=0
3838
while read -r crd
3939
do
40-
ResourceKind=${crd%%.*}
41-
kubectl get crds ${crd} -o yaml > "$TMP_CRD_DIR/${ResourceKind}.yaml" 2>&1
40+
resourceKind=${crd%% *}
41+
kubectl get crds "$resourceKind" -o yaml > "$TMP_CRD_DIR/"$resourceKind".yaml" 2>&1
4242
let NUM_OF_CRDS++
4343
done < <(kubectl get crds 2>&1 | sed -n '/NAME/,$p' | tail -n +2)
4444

0 commit comments

Comments
 (0)