From 120ed80c97ded067bba5c9399ab89795f4fef80b Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Wed, 29 May 2024 15:01:37 -0500 Subject: [PATCH] clean up --- .forgejo/workflows/schemas.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.forgejo/workflows/schemas.yaml b/.forgejo/workflows/schemas.yaml index 7cd852b1..faca9174 100644 --- a/.forgejo/workflows/schemas.yaml +++ b/.forgejo/workflows/schemas.yaml @@ -94,11 +94,12 @@ jobs: let ++NUM_OF_CRDS done < <(kubectl get crds 2>&1 | sed -n '/NAME/,$p' | tail -n +2) echo numCRDs: $NUM_OF_CRDS + # Download converter script curl https://raw.githubusercontent.com/yannh/kubeconform/master/scripts/openapi2jsonschema.py --output $TMP_CRD_DIR/openapi2jsonschema.py 2>/dev/null - cd $SCHEMAS_DIR # Convert crds to jsonSchema + cd $SCHEMAS_DIR python3 $TMP_CRD_DIR/openapi2jsonschema.py $TMP_CRD_DIR/*.yaml conversionResult=$? @@ -125,19 +126,6 @@ jobs: done fi - CYAN='\033[0;36m' - GREEN='\033[0;32m' - NC='\033[0m' # No Color - - if [ $conversionResult == 0 ]; then - printf "${GREEN}Successfully converted $NUM_OF_CRDS CRDs to JSON schema${NC}\n" - - printf "\nTo validate a CR using various tools, run the relevant command:\n" - printf "\n- ${CYAN}datree:${NC}\n\$ datree test /path/to/file\n" - printf "\n- ${CYAN}kubeconform:${NC}\n\$ kubeconform -summary -output json -schema-location default -schema-location '$SCHEMAS_DIR/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json' /path/to/file\n" - printf "\n- ${CYAN}kubeval:${NC}\n\$ kubeval --additional-schema-locations file:\"$SCHEMAS_DIR\" /path/to/file\n\n" - fi - rm -rf $TMP_CRD_DIR - name: Deploy to Cloudflare R2