Skip to content

Commit 3c53358

Browse files
committed
Use kustomize to generate a single CRDs file
1 parent 0503e08 commit 3c53358

File tree

10 files changed

+1188
-42
lines changed

10 files changed

+1188
-42
lines changed

Diff for: .goreleaser.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,9 @@ milestones:
6666
snapshot:
6767
name_template: "edge"
6868

69-
before:
70-
hooks:
71-
- make crds-release-file
72-
7369
release:
7470
extra_files:
75-
- glob: ./build/out/crds.yaml
71+
- glob: ./deploy/crds.yaml
7672
- glob: ./deploy/manifests/nginx-gateway.yaml
7773
- glob: ./deploy/manifests/nginx-plus-gateway.yaml
7874
- glob: ./deploy/manifests/nginx-gateway-experimental.yaml

Diff for: Makefile

-4
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,6 @@ generate-manifests: ## Generate manifests using Helm.
115115
helm template nginx-gateway $(CHART_DIR) $(HELM_TEMPLATE_COMMON_ARGS) --set service.annotations.'service\.beta\.kubernetes\.io\/aws-load-balancer-type'="nlb" -n nginx-gateway -s templates/service.yaml > $(strip $(MANIFEST_DIR))/service/loadbalancer-aws-nlb.yaml
116116
helm template nginx-gateway $(CHART_DIR) $(HELM_TEMPLATE_COMMON_ARGS) --set service.type=NodePort --set service.externalTrafficPolicy="" -n nginx-gateway -s templates/service.yaml > $(strip $(MANIFEST_DIR))/service/nodeport.yaml
117117

118-
.PHONY: crds-release-file
119-
crds-release-file: ## Generate combined crds file for releases
120-
scripts/combine-crds.sh
121-
122118
.PHONY: clean
123119
clean: ## Clean the build
124120
-rm -r $(OUT_DIR)

Diff for: config/crd/bases/kustomization.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resources:
2+
- gateway.nginx.org_clientsettingspolicies.yaml
3+
- gateway.nginx.org_nginxgateways.yaml
4+
- gateway.nginx.org_nginxproxies.yaml
5+
- gateway.nginx.org_observabilitypolicies.yaml

Diff for: config/crd/kustomization.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
resources:
2-
- bases/gateway.nginx.org_nginxgateways.yaml
3-
- https://github.com/kubernetes-sigs/gateway-api/blob/main/config/crd?timeout=120&ref=v1.0.0
2+
- bases

Diff for: conformance/Makefile

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ KIND_KUBE_CONFIG=$${HOME}/.kube/kind/config
1111
CONFORMANCE_TAG = latest
1212
CONFORMANCE_PREFIX = conformance-test-runner
1313
NGF_MANIFEST=../deploy/manifests/nginx-gateway.yaml
14-
CRDS=../deploy/manifests/crds/
1514
STATIC_MANIFEST=provisioner/static-deployment.yaml
1615
PROVISIONER_MANIFEST=provisioner/provisioner.yaml
1716
INSTALL_WEBHOOK ?= false
@@ -63,13 +62,13 @@ load-images-with-plus: ## Load NGF and NGINX Plus images on configured kind clus
6362
.PHONY: prepare-ngf-dependencies
6463
prepare-ngf-dependencies: update-ngf-manifest ## Install NGF dependencies on configured kind cluster
6564
./scripts/install-gateway.sh $(GW_API_VERSION) $(INSTALL_WEBHOOK) $(ENABLE_EXPERIMENTAL)
66-
kubectl apply -f $(CRDS)
65+
kustomize build ../config/crd/bases | kubectl apply -f -
6766
kubectl apply -f $(NGF_MANIFEST)
6867

6968
.PHONY: prepare-ngf-dependencies-with-plus
7069
prepare-ngf-dependencies-with-plus: update-ngf-manifest-with-plus ## Install NGF dependencies with Plus on configured kind cluster
7170
./scripts/install-gateway.sh $(GW_API_VERSION) $(INSTALL_WEBHOOK)
72-
kubectl apply -f $(CRDS)
71+
kustomize build ../config/crd/bases | kubectl apply -f -
7372
kubectl apply -f $(NGF_MANIFEST)
7473

7574
.PHONY: deploy-updated-provisioner

Diff for: deploy/crds.yaml

+1,172-2
Large diffs are not rendered by default.

Diff for: deploy/manifests/crds

-1
This file was deleted.

Diff for: docs/developer/quickstart.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ This will build the docker images `nginx-gateway-fabric:<your-user>` and `nginx-
154154

155155
```shell
156156
make generate-manifests HELM_TEMPLATE_COMMON_ARGS="--set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never"
157-
kubectl apply -f deploy/manifests/crds
157+
kubectl apply -f deploy/crds.yaml
158158
kubectl apply -f deploy/manifests/nginx-gateway.yaml
159159
kubectl apply -f deploy/manifests/service/nodeport.yaml
160160
```
@@ -163,7 +163,7 @@ This will build the docker images `nginx-gateway-fabric:<your-user>` and `nginx-
163163

164164
```shell
165165
make generate-manifests HELM_TEMPLATE_COMMON_ARGS="--set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx-plus --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never --set nginx.plus=true"
166-
kubectl apply -f deploy/manifests/crds
166+
kubectl apply -f deploy/crds.yaml
167167
kubectl apply -f deploy/manifests/nginx-gateway.yaml
168168
kubectl apply -f deploy/manifests/service/nodeport.yaml
169169
```
@@ -172,7 +172,7 @@ This will build the docker images `nginx-gateway-fabric:<your-user>` and `nginx-
172172

173173
```shell
174174
make generate-manifests HELM_TEMPLATE_COMMON_ARGS="--set nginxGateway.image.repository=nginx-gateway-fabric --set nginxGateway.image.tag=$(whoami) --set nginxGateway.image.pullPolicy=Never --set nginx.image.repository=nginx-gateway-fabric/nginx --set nginx.image.tag=$(whoami) --set nginx.image.pullPolicy=Never"
175-
kubectl apply -f deploy/manifests/crds
175+
kubectl apply -f deploy/crds.yaml
176176
kubectl apply -f deploy/manifests/nginx-gateway-experimental.yaml
177177
kubectl apply -f deploy/manifests/service/nodeport.yaml
178178
```

Diff for: scripts/combine-crds.sh

-13
This file was deleted.

Diff for: site/content/installation/installing-ngf/manifests.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,13 @@ Deploying NGINX Gateway Fabric with Kubernetes manifests takes only a few steps.
3333
#### Stable release
3434

3535
```shell
36-
kubectl apply -f https://github.com/nginxinc/nginx-gateway-fabric/releases/download/v1.2.0/crds.yaml
36+
kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/v1.2.0/deploy/crds.yaml
3737
```
3838

3939
#### Edge version
4040

4141
```shell
42-
git clone https://github.com/nginxinc/nginx-gateway-fabric.git
43-
cd nginx-gateway-fabric
44-
```
45-
46-
```shell
47-
kubectl apply -f deploy/manifests/crds
42+
kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/main/deploy/crds.yaml
4843
```
4944

5045
### 3. Deploy NGINX Gateway Fabric
@@ -164,7 +159,7 @@ To upgrade NGINX Gateway Fabric and get the latest features and improvements, ta
164159
- To upgrade the Custom Resource Definitions (CRDs), run:
165160

166161
```shell
167-
kubectl apply -f https://github.com/nginxinc/nginx-gateway-fabric/releases/download/v1.2.0/crds.yaml
162+
kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/v1.2.0/deploy/crds.yaml
168163
```
169164

170165
1. **Upgrade NGINX Gateway Fabric deployment:**
@@ -238,7 +233,7 @@ Follow these steps to uninstall NGINX Gateway Fabric and Gateway API from your K
238233
```
239234

240235
```shell
241-
kubectl delete -f https://github.com/nginxinc/nginx-gateway-fabric/releases/download/v1.2.0/crds.yaml
236+
kubectl delete -f https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/v1.2.0/deploy/crds.yaml
242237
```
243238

244239
1. **Remove the Gateway API resources:**

0 commit comments

Comments
 (0)