Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding crossplane aws-provider CRDs v1.20.0 #502

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RajatPorwal5
Copy link

@RajatPorwal5 RajatPorwal5 commented Mar 16, 2025

This PR aims to introduce from the crosslplane aws-provider CRDs version (v1.20.0) using the below script:
CRDs Path - https://github.com/crossplane-contrib/provider-upjet-aws/tree/main/package/crds

#!/usr/bin/env bash
# shellcheck disable=SC2064
set -euo pipefail

currnet_dir=$(dirname "$0")
cleanup_cmd="rm -rf ${PWD}/SCHEMAS/*"
trap "rm -fr $cleanup_cmd" 0            # EXIT
trap "rm -fr $cleanup_cmd; exit 1" 2    # INT
trap "rm -fr $cleanup_cmd; exit 1" 1 15 # HUP TERM

curl -sO https://raw.githubusercontent.com/yannh/kubeconform/master/scripts/openapi2jsonschema.py
git clone --depth 1 --branch v1.20.0 https://github.com/crossplane-contrib/provider-upjet-aws.git

for file in $(find provider-upjet-aws/package/crds -type f -name '*.yaml'); do
  dir_name=$(basename "$file" | awk -F'_' '{print $1}')
  file_name=$(basename "$file")
  mkdir -p SCHEMAS/"$dir_name"
  cp "$file" SCHEMAS/"$dir_name"/"$file_name"
  pushd SCHEMAS/"$dir_name"
  python ../../openapi2jsonschema.py "$file_name"
  rm -rf "$file_name"
  popd
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant