File tree 5 files changed +24
-2
lines changed
5 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,7 @@ jobs:
145
145
ngf_prefix=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 1)
146
146
ngf_tag=$(echo ${{ steps.ngf-meta.outputs.tags }} | cut -d ":" -f 2)
147
147
if [ ${{ github.event_name }} == "schedule" ]; then export GW_API_VERSION=main; fi
148
+ if [ ${{ startsWith(matrix.k8s-version, '1.23') || startsWith(matrix.k8s-version, '1.24') }} == "true" ]; then export INSTALL_WEBHOOK=true; fi
148
149
make install-ngf-local-no-build NGF_PREFIX=${ngf_prefix} NGF_TAG=${ngf_tag}
149
150
working-directory : ./conformance
150
151
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ CRDS=../deploy/manifests/crds/
13
13
STATIC_MANIFEST =provisioner/static-deployment.yaml
14
14
PROVISIONER_MANIFEST =provisioner/provisioner.yaml
15
15
NGINX_IMAGE =$(shell yq '.spec.template.spec.containers[1].image as $$nginx_ver | $$nginx_ver' $(STATIC_MANIFEST ) )
16
+ INSTALL_WEBHOOK ?= false
16
17
.DEFAULT_GOAL := help
17
18
18
19
.PHONY : help
@@ -47,7 +48,7 @@ load-images: ## Load NGF and NGINX images on configured kind cluster
47
48
48
49
.PHONY : prepare-ngf-dependencies
49
50
prepare-ngf-dependencies : update-ngf-manifest # # Install NGF dependencies on configured kind cluster
50
- ./scripts/install-gateway.sh $(GW_API_VERSION )
51
+ ./scripts/install-gateway.sh $(GW_API_VERSION ) $( INSTALL_WEBHOOK )
51
52
kubectl apply -f $(CRDS )
52
53
kubectl apply -f $(NGF_MANIFEST )
53
54
@@ -92,7 +93,7 @@ uninstall-ngf: uninstall-k8s-components undo-manifests-update ## Uninstall NGF o
92
93
.PHONY : uninstall-k8s-components
93
94
uninstall-k8s-components : # # Uninstall installed components on configured kind cluster
94
95
-kubectl delete -f $(NGF_MANIFEST )
95
- ./scripts/uninstall-gateway.sh $(GW_API_VERSION )
96
+ ./scripts/uninstall-gateway.sh $(GW_API_VERSION ) $( INSTALL_WEBHOOK )
96
97
kubectl delete clusterrole nginx-gateway-provisioner
97
98
kubectl delete clusterrolebinding nginx-gateway-provisioner
98
99
Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ update-ngf-manifest Update the NGF deployment manifest image names an
55
55
| SERVICE_MANIFEST | ../deploy/manifests/service/nodeport.yaml | The location of the NGF Service manifest |
56
56
| STATIC_MANIFEST | provisioner/static-deployment.yaml | The location of the NGF static deployment manifest |
57
57
| PROVISIONER_MANIFEST | provisioner/provisioner.yaml | The location of the NGF provisioner manifest |
58
+ | INSTALL_WEBHOOK | false | Install the Gateway API Validating Webhook. Necessary for Kubernetes versions < 1.25. |
58
59
59
60
### Step 1 - Create a kind Cluster
60
61
Original file line number Diff line number Diff line change @@ -5,12 +5,25 @@ if [ -z $1 ]; then
5
5
exit 1
6
6
fi
7
7
8
+ if [ -z $2 ]; then
9
+ echo " install webhook argument not set; exiting"
10
+ exit 1
11
+ fi
12
+
8
13
if [ $1 == " main" ]; then
9
14
temp_dir=$( mktemp -d)
10
15
cd ${temp_dir}
11
16
curl -s https://codeload.github.com./kubernetes-sigs/gateway-api/tar.gz/main | tar -xz --strip=2 gateway-api-main/config
12
17
kubectl apply -f crd/standard
18
+ if [ $2 == " true" ]; then
19
+ kubectl apply -f webhook
20
+ kubectl wait --for=condition=available --timeout=60s deployment gateway-api-admission-server -n gateway-system
21
+ fi
13
22
rm -rf ${temp_dir}
14
23
else
15
24
kubectl apply -f https://github.com./kubernetes-sigs/gateway-api/releases/download/v$1 /standard-install.yaml
25
+ if [ $2 == " true" ]; then
26
+ kubectl apply -f https://github.com./kubernetes-sigs/gateway-api/releases/download/v$1 /webhook-install.yaml
27
+ kubectl wait --for=condition=available --timeout=60s deployment gateway-api-admission-server -n gateway-system
28
+ fi
16
29
fi
Original file line number Diff line number Diff line change @@ -10,7 +10,13 @@ if [ $1 == "main" ]; then
10
10
cd ${temp_dir}
11
11
curl -s https://codeload.github.com./kubernetes-sigs/gateway-api/tar.gz/main | tar -xz --strip=2 gateway-api-main/config
12
12
kubectl delete -f crd/standard
13
+ if [ $2 == " true" ]; then
14
+ kubectl delete -f webhook
15
+ fi
13
16
rm -rf ${temp_dir}
14
17
else
15
18
kubectl delete -f https://github.com./kubernetes-sigs/gateway-api/releases/download/v$1 /standard-install.yaml
19
+ if [ $2 == " true" ]; then
20
+ kubectl delete -f https://github.com./kubernetes-sigs/gateway-api/releases/download/v$1 /webhook-install.yaml
21
+ fi
16
22
fi
You can’t perform that action at this time.
0 commit comments