-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using custom nginx.tmpl fails at startup: /etc/nginx/template filesystem is read-only #2861
Comments
@bgagnon this is my fault. As part to run the ingress controller as a user I made changes to the startup of the container. |
Also note that setting I can think of one workaround involving an |
No worries @aledbf, and thank you for the fast response. |
This workaround is functional: initContainers:
- name: copy-nginx-template
image: busybox
args:
- cp
- /tmp/nginx/nginx.tmpl
- /etc/nginx/template/nginx.tmpl
volumeMounts:
- name: nginx-template-volume
mountPath: /tmp/nginx
- mountPath: /etc/nginx/template
name: nginx-template-dir
volumes:
- name: nginx-template-dir
emptyDir: {}
- name: nginx-var-lib
emptyDir: {}
- name: nginx-template-volume
configMap:
name: nginx-configuration
items:
- key: nginx.tmpl
path: nginx.tmpl |
Closing. Fixed in #2877 |
Is this a BUG REPORT or FEATURE REQUEST?: Bug report
NGINX Ingress controller version: (dev)
Kubernetes version: 1.10.3
Environment:
What happened:
Configuring a custom
nginx.tmpl
is no longer working in latest build.The
Dockerfile
's entrypoint wants to set permissions on the directory, but it's read-only because it is mounted from aConfigMap
:I tried forcing the
ConfigMap
volume asreadOnly: false
but it does not help.The text was updated successfully, but these errors were encountered: