Skip to content

Commit

Permalink
Merge pull request #226 from liangyuanpeng/gatewayapi
Browse files Browse the repository at this point in the history
gateway-api: bump version to 1.0 and add a script for update.
  • Loading branch information
Peefy authored Aug 20, 2024
2 parents ee03122 + 2f37471 commit c483cb2
Show file tree
Hide file tree
Showing 16 changed files with 11,053 additions and 1,442 deletions.
2 changes: 1 addition & 1 deletion gateway-api/kcl.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "gateway-api"
edition = "0.0.1"
version = "0.1.0"
version = "0.2.0"

[dependencies]
k8s = "1.28"
43 changes: 43 additions & 0 deletions gateway-api/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash

set -o errexit
set -o nounset
set -eoux pipefail

VERSION="v1.1.0"

rm -rf gateway-api
git clone https://github.com/kubernetes-sigs/gateway-api.git -b ${VERSION} --depth=1

for API in gateway-api/config/crd/standard/*
do
if [ "$(basename "${API}")" = "kustomization.yaml" ];then
continue
fi
kcl-openapi generate model --crd -f $API --skip-validation -t standard
done

for API in gateway-api/config/crd/experimental/*
do
if [ "$(basename "${API}")" = "kustomization.yaml" ];then
continue
fi
kcl-openapi generate model --crd -f $API --skip-validation -t experimental
done

rm -rf standard/models/k8s
rm -rf experimental/models/k8s

mkdir -p v1 v1alpha2 v1beta1

mv standard/models/*_v1_*.k v1/ || true
mv standard/models/*_v1alpha2_*.k v1alpha2/ || true
mv standard/models/*_v1beta1_*.k v1beta1/ || true

mv experimental/models/*_v1_*.k v1/ || true
mv experimental/models/*_v1alpha2_*.k v1alpha2/ || true
mv experimental/models/*_v1beta1_*.k v1beta1/ || true

rm -rf standard
rm -rf experimental
rm -rf gateway-api
Loading

0 comments on commit c483cb2

Please sign in to comment.