Skip to content

Commit 401e19f

Browse files
authored
Apply configuration of SnippetsFilters to NGINX (#2604)
Problem: As a user of NGF, I want my SnippetsFilters configuration applied to NGF's data plane, so that I can leverage NGINX features not yet available in NGF. Solution: Apply configuration of valid SnippetsFilters referenced in HTTPRoutes and GRPCRoutes to the appropriate contexts in the NGINX config. If the SnippetsFilter referenced is invalid (wrong group or kind), the routing rule is not configured. If the SnippetsFilter cannot be resolved, the routing rule is configured, but the route will return a 500.
1 parent c9bdb70 commit 401e19f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4674
-1388
lines changed

charts/nginx-gateway-fabric/templates/deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ spec:
134134
mountPath: /etc/nginx/conf.d
135135
- name: nginx-stream-conf
136136
mountPath: /etc/nginx/stream-conf.d
137-
- name: module-includes
138-
mountPath: /etc/nginx/module-includes
137+
- name: nginx-main-includes
138+
mountPath: /etc/nginx/main-includes
139139
- name: nginx-secrets
140140
mountPath: /etc/nginx/secrets
141141
- name: nginx-run
@@ -173,8 +173,8 @@ spec:
173173
mountPath: /etc/nginx/conf.d
174174
- name: nginx-stream-conf
175175
mountPath: /etc/nginx/stream-conf.d
176-
- name: module-includes
177-
mountPath: /etc/nginx/module-includes
176+
- name: nginx-main-includes
177+
mountPath: /etc/nginx/main-includes
178178
- name: nginx-secrets
179179
mountPath: /etc/nginx/secrets
180180
- name: nginx-run
@@ -209,7 +209,7 @@ spec:
209209
emptyDir: {}
210210
- name: nginx-stream-conf
211211
emptyDir: {}
212-
- name: module-includes
212+
- name: nginx-main-includes
213213
emptyDir: {}
214214
- name: nginx-secrets
215215
emptyDir: {}

config/tests/static-deployment.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ spec:
7474
mountPath: /etc/nginx/conf.d
7575
- name: nginx-stream-conf
7676
mountPath: /etc/nginx/stream-conf.d
77-
- name: module-includes
78-
mountPath: /etc/nginx/module-includes
77+
- name: nginx-main-includes
78+
mountPath: /etc/nginx/main-includes
7979
- name: nginx-secrets
8080
mountPath: /etc/nginx/secrets
8181
- name: nginx-run
@@ -106,8 +106,8 @@ spec:
106106
mountPath: /etc/nginx/conf.d
107107
- name: nginx-stream-conf
108108
mountPath: /etc/nginx/stream-conf.d
109-
- name: module-includes
110-
mountPath: /etc/nginx/module-includes
109+
- name: nginx-main-includes
110+
mountPath: /etc/nginx/main-includes
111111
- name: nginx-secrets
112112
mountPath: /etc/nginx/secrets
113113
- name: nginx-run
@@ -127,7 +127,7 @@ spec:
127127
emptyDir: {}
128128
- name: nginx-stream-conf
129129
emptyDir: {}
130-
- name: module-includes
130+
- name: nginx-main-includes
131131
emptyDir: {}
132132
- name: nginx-secrets
133133
emptyDir: {}

deploy/aws-nlb/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ spec:
248248
name: nginx-conf
249249
- mountPath: /etc/nginx/stream-conf.d
250250
name: nginx-stream-conf
251-
- mountPath: /etc/nginx/module-includes
252-
name: module-includes
251+
- mountPath: /etc/nginx/main-includes
252+
name: nginx-main-includes
253253
- mountPath: /etc/nginx/secrets
254254
name: nginx-secrets
255255
- mountPath: /var/run/nginx
@@ -280,8 +280,8 @@ spec:
280280
name: nginx-conf
281281
- mountPath: /etc/nginx/stream-conf.d
282282
name: nginx-stream-conf
283-
- mountPath: /etc/nginx/module-includes
284-
name: module-includes
283+
- mountPath: /etc/nginx/main-includes
284+
name: nginx-main-includes
285285
- mountPath: /etc/nginx/secrets
286286
name: nginx-secrets
287287
- mountPath: /var/run/nginx
@@ -302,7 +302,7 @@ spec:
302302
- emptyDir: {}
303303
name: nginx-stream-conf
304304
- emptyDir: {}
305-
name: module-includes
305+
name: nginx-main-includes
306306
- emptyDir: {}
307307
name: nginx-secrets
308308
- emptyDir: {}

deploy/azure/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ spec:
245245
name: nginx-conf
246246
- mountPath: /etc/nginx/stream-conf.d
247247
name: nginx-stream-conf
248-
- mountPath: /etc/nginx/module-includes
249-
name: module-includes
248+
- mountPath: /etc/nginx/main-includes
249+
name: nginx-main-includes
250250
- mountPath: /etc/nginx/secrets
251251
name: nginx-secrets
252252
- mountPath: /var/run/nginx
@@ -277,8 +277,8 @@ spec:
277277
name: nginx-conf
278278
- mountPath: /etc/nginx/stream-conf.d
279279
name: nginx-stream-conf
280-
- mountPath: /etc/nginx/module-includes
281-
name: module-includes
280+
- mountPath: /etc/nginx/main-includes
281+
name: nginx-main-includes
282282
- mountPath: /etc/nginx/secrets
283283
name: nginx-secrets
284284
- mountPath: /var/run/nginx
@@ -301,7 +301,7 @@ spec:
301301
- emptyDir: {}
302302
name: nginx-stream-conf
303303
- emptyDir: {}
304-
name: module-includes
304+
name: nginx-main-includes
305305
- emptyDir: {}
306306
name: nginx-secrets
307307
- emptyDir: {}

deploy/default/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ spec:
245245
name: nginx-conf
246246
- mountPath: /etc/nginx/stream-conf.d
247247
name: nginx-stream-conf
248-
- mountPath: /etc/nginx/module-includes
249-
name: module-includes
248+
- mountPath: /etc/nginx/main-includes
249+
name: nginx-main-includes
250250
- mountPath: /etc/nginx/secrets
251251
name: nginx-secrets
252252
- mountPath: /var/run/nginx
@@ -277,8 +277,8 @@ spec:
277277
name: nginx-conf
278278
- mountPath: /etc/nginx/stream-conf.d
279279
name: nginx-stream-conf
280-
- mountPath: /etc/nginx/module-includes
281-
name: module-includes
280+
- mountPath: /etc/nginx/main-includes
281+
name: nginx-main-includes
282282
- mountPath: /etc/nginx/secrets
283283
name: nginx-secrets
284284
- mountPath: /var/run/nginx
@@ -299,7 +299,7 @@ spec:
299299
- emptyDir: {}
300300
name: nginx-stream-conf
301301
- emptyDir: {}
302-
name: module-includes
302+
name: nginx-main-includes
303303
- emptyDir: {}
304304
name: nginx-secrets
305305
- emptyDir: {}

deploy/experimental-nginx-plus/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,8 @@ spec:
260260
name: nginx-conf
261261
- mountPath: /etc/nginx/stream-conf.d
262262
name: nginx-stream-conf
263-
- mountPath: /etc/nginx/module-includes
264-
name: module-includes
263+
- mountPath: /etc/nginx/main-includes
264+
name: nginx-main-includes
265265
- mountPath: /etc/nginx/secrets
266266
name: nginx-secrets
267267
- mountPath: /var/run/nginx
@@ -292,8 +292,8 @@ spec:
292292
name: nginx-conf
293293
- mountPath: /etc/nginx/stream-conf.d
294294
name: nginx-stream-conf
295-
- mountPath: /etc/nginx/module-includes
296-
name: module-includes
295+
- mountPath: /etc/nginx/main-includes
296+
name: nginx-main-includes
297297
- mountPath: /etc/nginx/secrets
298298
name: nginx-secrets
299299
- mountPath: /var/run/nginx
@@ -314,7 +314,7 @@ spec:
314314
- emptyDir: {}
315315
name: nginx-stream-conf
316316
- emptyDir: {}
317-
name: module-includes
317+
name: nginx-main-includes
318318
- emptyDir: {}
319319
name: nginx-secrets
320320
- emptyDir: {}

deploy/experimental/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ spec:
251251
name: nginx-conf
252252
- mountPath: /etc/nginx/stream-conf.d
253253
name: nginx-stream-conf
254-
- mountPath: /etc/nginx/module-includes
255-
name: module-includes
254+
- mountPath: /etc/nginx/main-includes
255+
name: nginx-main-includes
256256
- mountPath: /etc/nginx/secrets
257257
name: nginx-secrets
258258
- mountPath: /var/run/nginx
@@ -283,8 +283,8 @@ spec:
283283
name: nginx-conf
284284
- mountPath: /etc/nginx/stream-conf.d
285285
name: nginx-stream-conf
286-
- mountPath: /etc/nginx/module-includes
287-
name: module-includes
286+
- mountPath: /etc/nginx/main-includes
287+
name: nginx-main-includes
288288
- mountPath: /etc/nginx/secrets
289289
name: nginx-secrets
290290
- mountPath: /var/run/nginx
@@ -305,7 +305,7 @@ spec:
305305
- emptyDir: {}
306306
name: nginx-stream-conf
307307
- emptyDir: {}
308-
name: module-includes
308+
name: nginx-main-includes
309309
- emptyDir: {}
310310
name: nginx-secrets
311311
- emptyDir: {}

deploy/nginx-plus/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ spec:
256256
name: nginx-conf
257257
- mountPath: /etc/nginx/stream-conf.d
258258
name: nginx-stream-conf
259-
- mountPath: /etc/nginx/module-includes
260-
name: module-includes
259+
- mountPath: /etc/nginx/main-includes
260+
name: nginx-main-includes
261261
- mountPath: /etc/nginx/secrets
262262
name: nginx-secrets
263263
- mountPath: /var/run/nginx
@@ -288,8 +288,8 @@ spec:
288288
name: nginx-conf
289289
- mountPath: /etc/nginx/stream-conf.d
290290
name: nginx-stream-conf
291-
- mountPath: /etc/nginx/module-includes
292-
name: module-includes
291+
- mountPath: /etc/nginx/main-includes
292+
name: nginx-main-includes
293293
- mountPath: /etc/nginx/secrets
294294
name: nginx-secrets
295295
- mountPath: /var/run/nginx
@@ -310,7 +310,7 @@ spec:
310310
- emptyDir: {}
311311
name: nginx-stream-conf
312312
- emptyDir: {}
313-
name: module-includes
313+
name: nginx-main-includes
314314
- emptyDir: {}
315315
name: nginx-secrets
316316
- emptyDir: {}

deploy/nodeport/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ spec:
245245
name: nginx-conf
246246
- mountPath: /etc/nginx/stream-conf.d
247247
name: nginx-stream-conf
248-
- mountPath: /etc/nginx/module-includes
249-
name: module-includes
248+
- mountPath: /etc/nginx/main-includes
249+
name: nginx-main-includes
250250
- mountPath: /etc/nginx/secrets
251251
name: nginx-secrets
252252
- mountPath: /var/run/nginx
@@ -277,8 +277,8 @@ spec:
277277
name: nginx-conf
278278
- mountPath: /etc/nginx/stream-conf.d
279279
name: nginx-stream-conf
280-
- mountPath: /etc/nginx/module-includes
281-
name: module-includes
280+
- mountPath: /etc/nginx/main-includes
281+
name: nginx-main-includes
282282
- mountPath: /etc/nginx/secrets
283283
name: nginx-secrets
284284
- mountPath: /var/run/nginx
@@ -299,7 +299,7 @@ spec:
299299
- emptyDir: {}
300300
name: nginx-stream-conf
301301
- emptyDir: {}
302-
name: module-includes
302+
name: nginx-main-includes
303303
- emptyDir: {}
304304
name: nginx-secrets
305305
- emptyDir: {}

deploy/openshift/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ spec:
253253
name: nginx-conf
254254
- mountPath: /etc/nginx/stream-conf.d
255255
name: nginx-stream-conf
256-
- mountPath: /etc/nginx/module-includes
257-
name: module-includes
256+
- mountPath: /etc/nginx/main-includes
257+
name: nginx-main-includes
258258
- mountPath: /etc/nginx/secrets
259259
name: nginx-secrets
260260
- mountPath: /var/run/nginx
@@ -285,8 +285,8 @@ spec:
285285
name: nginx-conf
286286
- mountPath: /etc/nginx/stream-conf.d
287287
name: nginx-stream-conf
288-
- mountPath: /etc/nginx/module-includes
289-
name: module-includes
288+
- mountPath: /etc/nginx/main-includes
289+
name: nginx-main-includes
290290
- mountPath: /etc/nginx/secrets
291291
name: nginx-secrets
292292
- mountPath: /var/run/nginx
@@ -307,7 +307,7 @@ spec:
307307
- emptyDir: {}
308308
name: nginx-stream-conf
309309
- emptyDir: {}
310-
name: module-includes
310+
name: nginx-main-includes
311311
- emptyDir: {}
312312
name: nginx-secrets
313313
- emptyDir: {}

deploy/snippets-filters-nginx-plus/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -257,8 +257,8 @@ spec:
257257
name: nginx-conf
258258
- mountPath: /etc/nginx/stream-conf.d
259259
name: nginx-stream-conf
260-
- mountPath: /etc/nginx/module-includes
261-
name: module-includes
260+
- mountPath: /etc/nginx/main-includes
261+
name: nginx-main-includes
262262
- mountPath: /etc/nginx/secrets
263263
name: nginx-secrets
264264
- mountPath: /var/run/nginx
@@ -289,8 +289,8 @@ spec:
289289
name: nginx-conf
290290
- mountPath: /etc/nginx/stream-conf.d
291291
name: nginx-stream-conf
292-
- mountPath: /etc/nginx/module-includes
293-
name: module-includes
292+
- mountPath: /etc/nginx/main-includes
293+
name: nginx-main-includes
294294
- mountPath: /etc/nginx/secrets
295295
name: nginx-secrets
296296
- mountPath: /var/run/nginx
@@ -311,7 +311,7 @@ spec:
311311
- emptyDir: {}
312312
name: nginx-stream-conf
313313
- emptyDir: {}
314-
name: module-includes
314+
name: nginx-main-includes
315315
- emptyDir: {}
316316
name: nginx-secrets
317317
- emptyDir: {}

deploy/snippets-filters/deploy.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,8 @@ spec:
248248
name: nginx-conf
249249
- mountPath: /etc/nginx/stream-conf.d
250250
name: nginx-stream-conf
251-
- mountPath: /etc/nginx/module-includes
252-
name: module-includes
251+
- mountPath: /etc/nginx/main-includes
252+
name: nginx-main-includes
253253
- mountPath: /etc/nginx/secrets
254254
name: nginx-secrets
255255
- mountPath: /var/run/nginx
@@ -280,8 +280,8 @@ spec:
280280
name: nginx-conf
281281
- mountPath: /etc/nginx/stream-conf.d
282282
name: nginx-stream-conf
283-
- mountPath: /etc/nginx/module-includes
284-
name: module-includes
283+
- mountPath: /etc/nginx/main-includes
284+
name: nginx-main-includes
285285
- mountPath: /etc/nginx/secrets
286286
name: nginx-secrets
287287
- mountPath: /var/run/nginx
@@ -302,7 +302,7 @@ spec:
302302
- emptyDir: {}
303303
name: nginx-stream-conf
304304
- emptyDir: {}
305-
name: module-includes
305+
name: nginx-main-includes
306306
- emptyDir: {}
307307
name: nginx-secrets
308308
- emptyDir: {}

0 commit comments

Comments
 (0)