Skip to content

Commit a22f793

Browse files
committed
Fix var/lib volume for N+
1 parent 2733c57 commit a22f793

File tree

14 files changed

+19
-51
lines changed

14 files changed

+19
-51
lines changed

build/Dockerfile.nginx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ARG NGINX_CONF_DIR
66
ARG BUILD_AGENT
77

88
RUN apk add --no-cache libcap \
9-
&& mkdir -p /var/lib/nginx /usr/lib/nginx/modules \
9+
&& mkdir -p /usr/lib/nginx/modules \
1010
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
1111
&& setcap -v 'cap_net_bind_service=+ep' /usr/sbin/nginx \
1212
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \
@@ -18,7 +18,7 @@ COPY ${NGINX_CONF_DIR}/nginx.conf /etc/nginx/nginx.conf
1818
COPY ${NGINX_CONF_DIR}/grpc-error-locations.conf /etc/nginx/grpc-error-locations.conf
1919
COPY ${NGINX_CONF_DIR}/grpc-error-pages.conf /etc/nginx/grpc-error-pages.conf
2020

21-
RUN chown -R 101:1001 /etc/nginx /var/cache/nginx /var/lib/nginx
21+
RUN chown -R 101:1001 /etc/nginx /var/cache/nginx
2222

2323
LABEL org.nginx.ngf.image.build.agent="${BUILD_AGENT}"
2424

build/Dockerfile.nginxplus

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ RUN --mount=type=secret,id=nginx-repo.crt,dst=/etc/apk/cert.pem,mode=0644 \
1919
&& adduser -S -D -H -u 101 -h /var/cache/nginx -s /sbin/nologin -G nginx -g nginx nginx \
2020
&& printf "%s\n" "https://pkgs.nginx.com/plus/${NGINX_PLUS_VERSION}/alpine/v$(grep -E -o '^[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
2121
&& apk add --no-cache nginx-plus nginx-plus-module-njs nginx-plus-module-otel libcap \
22-
&& mkdir -p /var/lib/nginx /usr/lib/nginx/modules \
22+
&& mkdir -p /usr/lib/nginx/modules \
2323
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx \
2424
&& setcap -v 'cap_net_bind_service=+ep' /usr/sbin/nginx \
2525
&& setcap 'cap_net_bind_service=+ep' /usr/sbin/nginx-debug \

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,11 @@ spec:
222222
mountPath: /var/run/nginx
223223
- name: nginx-cache
224224
mountPath: /var/cache/nginx
225-
- name: nginx-lib
226-
mountPath: /var/lib/nginx
227225
- name: nginx-includes
228226
mountPath: /etc/nginx/includes
229227
{{- if .Values.nginx.plus }}
228+
- name: nginx-lib
229+
mountPath: /var/lib/nginx/state
230230
{{- if .Values.nginx.usage.secretName }}
231231
- name: nginx-plus-license
232232
mountPath: /etc/nginx/license.jwt
@@ -278,14 +278,14 @@ spec:
278278
emptyDir: {}
279279
- name: nginx-cache
280280
emptyDir: {}
281-
- name: nginx-lib
282-
emptyDir: {}
283281
- name: nginx-includes
284282
emptyDir: {}
285283
- name: nginx-includes-bootstrap
286284
configMap:
287285
name: nginx-includes-bootstrap
288286
{{- if .Values.nginx.plus }}
287+
- name: nginx-lib
288+
emptyDir: {}
289289
{{- if .Values.nginx.usage.secretName }}
290290
- name: nginx-plus-license
291291
secret:

config/tests/static-deployment.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ spec:
141141
mountPath: /var/run/nginx
142142
- name: nginx-cache
143143
mountPath: /var/cache/nginx
144-
- name: nginx-lib
145-
mountPath: /var/lib/nginx
146144
- name: nginx-includes
147145
mountPath: /etc/nginx/includes
148146
terminationGracePeriodSeconds: 30
@@ -164,8 +162,6 @@ spec:
164162
emptyDir: {}
165163
- name: nginx-cache
166164
emptyDir: {}
167-
- name: nginx-lib
168-
emptyDir: {}
169165
- name: nginx-includes
170166
emptyDir: {}
171167
- name: nginx-includes-bootstrap

deploy/aws-nlb/deploy.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,6 @@ spec:
301301
name: nginx-run
302302
- mountPath: /var/cache/nginx
303303
name: nginx-cache
304-
- mountPath: /var/lib/nginx
305-
name: nginx-lib
306304
- mountPath: /etc/nginx/includes
307305
name: nginx-includes
308306
initContainers:
@@ -351,8 +349,6 @@ spec:
351349
name: nginx-run
352350
- emptyDir: {}
353351
name: nginx-cache
354-
- emptyDir: {}
355-
name: nginx-lib
356352
- emptyDir: {}
357353
name: nginx-includes
358354
- configMap:

deploy/azure/deploy.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,6 @@ spec:
298298
name: nginx-run
299299
- mountPath: /var/cache/nginx
300300
name: nginx-cache
301-
- mountPath: /var/lib/nginx
302-
name: nginx-lib
303301
- mountPath: /etc/nginx/includes
304302
name: nginx-includes
305303
initContainers:
@@ -350,8 +348,6 @@ spec:
350348
name: nginx-run
351349
- emptyDir: {}
352350
name: nginx-cache
353-
- emptyDir: {}
354-
name: nginx-lib
355351
- emptyDir: {}
356352
name: nginx-includes
357353
- configMap:

deploy/default/deploy.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,6 @@ spec:
298298
name: nginx-run
299299
- mountPath: /var/cache/nginx
300300
name: nginx-cache
301-
- mountPath: /var/lib/nginx
302-
name: nginx-lib
303301
- mountPath: /etc/nginx/includes
304302
name: nginx-includes
305303
initContainers:
@@ -348,8 +346,6 @@ spec:
348346
name: nginx-run
349347
- emptyDir: {}
350348
name: nginx-cache
351-
- emptyDir: {}
352-
name: nginx-lib
353349
- emptyDir: {}
354350
name: nginx-includes
355351
- configMap:

deploy/experimental-nginx-plus/deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ spec:
318318
name: nginx-run
319319
- mountPath: /var/cache/nginx
320320
name: nginx-cache
321-
- mountPath: /var/lib/nginx
322-
name: nginx-lib
323321
- mountPath: /etc/nginx/includes
324322
name: nginx-includes
323+
- mountPath: /var/lib/nginx/state
324+
name: nginx-lib
325325
- mountPath: /etc/nginx/license.jwt
326326
name: nginx-plus-license
327327
subPath: license.jwt
@@ -373,13 +373,13 @@ spec:
373373
name: nginx-run
374374
- emptyDir: {}
375375
name: nginx-cache
376-
- emptyDir: {}
377-
name: nginx-lib
378376
- emptyDir: {}
379377
name: nginx-includes
380378
- configMap:
381379
name: nginx-includes-bootstrap
382380
name: nginx-includes-bootstrap
381+
- emptyDir: {}
382+
name: nginx-lib
383383
- name: nginx-plus-license
384384
secret:
385385
secretName: nplus-license

deploy/experimental/deploy.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ spec:
304304
name: nginx-run
305305
- mountPath: /var/cache/nginx
306306
name: nginx-cache
307-
- mountPath: /var/lib/nginx
308-
name: nginx-lib
309307
- mountPath: /etc/nginx/includes
310308
name: nginx-includes
311309
initContainers:
@@ -354,8 +352,6 @@ spec:
354352
name: nginx-run
355353
- emptyDir: {}
356354
name: nginx-cache
357-
- emptyDir: {}
358-
name: nginx-lib
359355
- emptyDir: {}
360356
name: nginx-includes
361357
- configMap:

deploy/nginx-plus/deploy.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,10 @@ spec:
312312
name: nginx-run
313313
- mountPath: /var/cache/nginx
314314
name: nginx-cache
315-
- mountPath: /var/lib/nginx
316-
name: nginx-lib
317315
- mountPath: /etc/nginx/includes
318316
name: nginx-includes
317+
- mountPath: /var/lib/nginx/state
318+
name: nginx-lib
319319
- mountPath: /etc/nginx/license.jwt
320320
name: nginx-plus-license
321321
subPath: license.jwt
@@ -367,13 +367,13 @@ spec:
367367
name: nginx-run
368368
- emptyDir: {}
369369
name: nginx-cache
370-
- emptyDir: {}
371-
name: nginx-lib
372370
- emptyDir: {}
373371
name: nginx-includes
374372
- configMap:
375373
name: nginx-includes-bootstrap
376374
name: nginx-includes-bootstrap
375+
- emptyDir: {}
376+
name: nginx-lib
377377
- name: nginx-plus-license
378378
secret:
379379
secretName: nplus-license

deploy/nodeport/deploy.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,6 @@ spec:
298298
name: nginx-run
299299
- mountPath: /var/cache/nginx
300300
name: nginx-cache
301-
- mountPath: /var/lib/nginx
302-
name: nginx-lib
303301
- mountPath: /etc/nginx/includes
304302
name: nginx-includes
305303
initContainers:
@@ -348,8 +346,6 @@ spec:
348346
name: nginx-run
349347
- emptyDir: {}
350348
name: nginx-cache
351-
- emptyDir: {}
352-
name: nginx-lib
353349
- emptyDir: {}
354350
name: nginx-includes
355351
- configMap:

deploy/openshift/deploy.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,6 @@ spec:
306306
name: nginx-run
307307
- mountPath: /var/cache/nginx
308308
name: nginx-cache
309-
- mountPath: /var/lib/nginx
310-
name: nginx-lib
311309
- mountPath: /etc/nginx/includes
312310
name: nginx-includes
313311
initContainers:
@@ -356,8 +354,6 @@ spec:
356354
name: nginx-run
357355
- emptyDir: {}
358356
name: nginx-cache
359-
- emptyDir: {}
360-
name: nginx-lib
361357
- emptyDir: {}
362358
name: nginx-includes
363359
- configMap:

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ spec:
315315
name: nginx-run
316316
- mountPath: /var/cache/nginx
317317
name: nginx-cache
318-
- mountPath: /var/lib/nginx
319-
name: nginx-lib
320318
- mountPath: /etc/nginx/includes
321319
name: nginx-includes
320+
- mountPath: /var/lib/nginx/state
321+
name: nginx-lib
322322
- mountPath: /etc/nginx/license.jwt
323323
name: nginx-plus-license
324324
subPath: license.jwt
@@ -370,13 +370,13 @@ spec:
370370
name: nginx-run
371371
- emptyDir: {}
372372
name: nginx-cache
373-
- emptyDir: {}
374-
name: nginx-lib
375373
- emptyDir: {}
376374
name: nginx-includes
377375
- configMap:
378376
name: nginx-includes-bootstrap
379377
name: nginx-includes-bootstrap
378+
- emptyDir: {}
379+
name: nginx-lib
380380
- name: nginx-plus-license
381381
secret:
382382
secretName: nplus-license

deploy/snippets-filters/deploy.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,6 @@ spec:
301301
name: nginx-run
302302
- mountPath: /var/cache/nginx
303303
name: nginx-cache
304-
- mountPath: /var/lib/nginx
305-
name: nginx-lib
306304
- mountPath: /etc/nginx/includes
307305
name: nginx-includes
308306
initContainers:
@@ -351,8 +349,6 @@ spec:
351349
name: nginx-run
352350
- emptyDir: {}
353351
name: nginx-cache
354-
- emptyDir: {}
355-
name: nginx-lib
356352
- emptyDir: {}
357353
name: nginx-includes
358354
- configMap:

0 commit comments

Comments
 (0)