sigs.k8s.io/gateway-api@v1.0.0/hack/build-install-yaml.sh (about) 1 #!/usr/bin/env bash 2 3 # Copyright 2022 The Kubernetes Authors. 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 17 set -o errexit 18 set -o nounset 19 set -o pipefail 20 21 thisyear=`date +"%Y"` 22 23 mkdir -p release/ 24 25 # Make clean files with boilerplate 26 cat hack/boilerplate/boilerplate.sh.txt > release/experimental-install.yaml 27 sed -i "s/YEAR/$thisyear/g" release/experimental-install.yaml 28 cat << EOF >> release/experimental-install.yaml 29 # 30 # Gateway API Experimental channel install 31 # 32 EOF 33 34 cat hack/boilerplate/boilerplate.sh.txt > release/standard-install.yaml 35 sed -i "s/YEAR/$thisyear/g" release/standard-install.yaml 36 cat << EOF >> release/standard-install.yaml 37 # 38 # Gateway API Standard channel install 39 # 40 EOF 41 42 cat hack/boilerplate/boilerplate.sh.txt > release/webhook-install.yaml 43 sed -i "s/YEAR/$thisyear/g" release/webhook-install.yaml 44 cat << EOF >> release/webhook-install.yaml 45 # 46 # Gateway API deprecated webhook install 47 # 48 EOF 49 50 for file in `ls config/crd/experimental/gateway*.yaml` 51 do 52 echo "---" >> release/experimental-install.yaml 53 echo "#" >> release/experimental-install.yaml 54 echo "# $file" >> release/experimental-install.yaml 55 echo "#" >> release/experimental-install.yaml 56 cat $file >> release/experimental-install.yaml 57 done 58 59 for file in `ls config/crd/standard/*.yaml` 60 do 61 echo "---" >> release/standard-install.yaml 62 echo "#" >> release/standard-install.yaml 63 echo "# $file" >> release/standard-install.yaml 64 echo "#" >> release/standard-install.yaml 65 cat $file >> release/standard-install.yaml 66 done 67 68 for file in `ls config/webhook/*.yaml` 69 do 70 echo "---" >> release/webhook-install.yaml 71 echo "#" >> release/webhook-install.yaml 72 echo "# $file" >> release/webhook-install.yaml 73 echo "#" >> release/webhook-install.yaml 74 cat $file >> release/webhook-install.yaml 75 done 76 77 echo "Generated:" release/*-install.yaml