fix chroot module mount path (#9090)
This commit is contained in:
parent
261ce42517
commit
1a078af307
2 changed files with 9 additions and 1 deletions
|
@ -147,7 +147,11 @@ spec:
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
{{- if .Values.controller.extraModules }}
|
{{- if .Values.controller.extraModules }}
|
||||||
- name: modules
|
- name: modules
|
||||||
|
{{ if .Values.controller.image.chroot }}
|
||||||
|
mountPath: /chroot/modules_mount
|
||||||
|
{{ else }}
|
||||||
mountPath: /modules_mount
|
mountPath: /modules_mount
|
||||||
|
{{ end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if .Values.controller.customTemplate.configMapName }}
|
{{- if .Values.controller.customTemplate.configMapName }}
|
||||||
- mountPath: /etc/nginx/template
|
- mountPath: /etc/nginx/template
|
||||||
|
|
|
@ -84,7 +84,7 @@ RUN bash -xeu -c ' \
|
||||||
# LD_LIBRARY_PATH does not work so below is needed for opentelemetry/other modules
|
# LD_LIBRARY_PATH does not work so below is needed for opentelemetry/other modules
|
||||||
# Put libs of newer modules under `/modules_mount/<other>/lib` and add that path below
|
# Put libs of newer modules under `/modules_mount/<other>/lib` and add that path below
|
||||||
# Could get complicated arch specific paths become a need
|
# Could get complicated arch specific paths become a need
|
||||||
&& echo "/lib:/usr/lib:/usr/local/lib:/modules_mount/otel/lib" > /etc/ld-musl-x86_64.path
|
&& echo "/lib:/usr/lib:/usr/local/lib:/modules_mount/etc/nginx/modules/otel" > /chroot/etc/ld-musl-x86_64.path
|
||||||
|
|
||||||
RUN apk add --no-cache libcap \
|
RUN apk add --no-cache libcap \
|
||||||
&& setcap cap_sys_chroot,cap_net_bind_service=+ep /nginx-ingress-controller \
|
&& setcap cap_sys_chroot,cap_net_bind_service=+ep /nginx-ingress-controller \
|
||||||
|
@ -113,6 +113,10 @@ RUN ln -sf /chroot/etc/nginx /etc/nginx \
|
||||||
&& mknod -m 0666 /chroot/dev/zero c 1 5 \
|
&& mknod -m 0666 /chroot/dev/zero c 1 5 \
|
||||||
&& mknod -m 0666 /chroot/dev/tty c 5 0
|
&& mknod -m 0666 /chroot/dev/tty c 5 0
|
||||||
|
|
||||||
|
RUN mkdir -p /chroot/modules_mount \
|
||||||
|
&& mkdir -p modules_mount \
|
||||||
|
&& ln -s /modules_mount /chroot/modules_mount
|
||||||
|
|
||||||
USER www-data
|
USER www-data
|
||||||
|
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
|
Loading…
Reference in a new issue