Skip to content

Commit

Permalink
Merge pull request #43 from datreeio/namefix
Browse files Browse the repository at this point in the history
ensure unique filename for each crd
  • Loading branch information
hadar-co authored Aug 25, 2022
2 parents 7913a31 + 380ea55 commit 5de8043
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Utilities/crd-extractor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ mkdir -p $TMP_CRD_DIR
NUM_OF_CRDS=0
while read -r crd
do
ResourceKind=${crd%%.*}
kubectl get crds ${crd} -o yaml > "$TMP_CRD_DIR/${ResourceKind}.yaml" 2>&1
resourceKind=${crd%% *}
kubectl get crds "$resourceKind" -o yaml > "$TMP_CRD_DIR/"$resourceKind".yaml" 2>&1
let NUM_OF_CRDS++
done < <(kubectl get crds 2>&1 | sed -n '/NAME/,$p' | tail -n +2)

Expand Down

0 comments on commit 5de8043

Please sign in to comment.