{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/ingress-nginx/issues/2861","repository_url":"https://api.github.com/repos/kubernetes/ingress-nginx","labels_url":"https://api.github.com/repos/kubernetes/ingress-nginx/issues/2861/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/ingress-nginx/issues/2861/comments","events_url":"https://api.github.com/repos/kubernetes/ingress-nginx/issues/2861/events","html_url":"https://github.com/kubernetes/ingress-nginx/issues/2861","id":345351604,"node_id":"MDU6SXNzdWUzNDUzNTE2MDQ=","number":2861,"title":"Using custom nginx.tmpl fails at startup: /etc/nginx/template filesystem is read-only","user":{"login":"bgagnon","id":81865,"node_id":"MDQ6VXNlcjgxODY1","avatar_url":"https://avatars2.githubusercontent.com/u/81865?v=4","gravatar_id":"","url":"https://api.github.com/users/bgagnon","html_url":"https://github.com/bgagnon","followers_url":"https://api.github.com/users/bgagnon/followers","following_url":"https://api.github.com/users/bgagnon/following{/other_user}","gists_url":"https://api.github.com/users/bgagnon/gists{/gist_id}","starred_url":"https://api.github.com/users/bgagnon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgagnon/subscriptions","organizations_url":"https://api.github.com/users/bgagnon/orgs","repos_url":"https://api.github.com/users/bgagnon/repos","events_url":"https://api.github.com/users/bgagnon/events{/privacy}","received_events_url":"https://api.github.com/users/bgagnon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-27T20:09:00Z","updated_at":"2018-07-27T20:37:20Z","closed_at":null,"author_association":"NONE","body":"**Is this a BUG REPORT or FEATURE REQUEST?**: Bug report\r\n**NGINX Ingress controller version**: (dev)\r\n**Kubernetes version**: 1.10.3\r\n\r\n**Environment**:\r\n- **Cloud provider or hardware configuration**: Docker for Mac\r\n\r\n**What happened**:\r\n\r\nConfiguring a custom `nginx.tmpl` is no longer working in latest build.\r\n\r\n```yaml\r\n      containers:\r\n      - name: nginx-ingress-controller\r\n        image: quay.io/kubernetes-ingress-controller/nginx-ingress-controller:dev\r\n        securityContext:\r\n          capabilities:\r\n            drop:\r\n            - ALL\r\n            add:\r\n            - NET_BIND_SERVICE\r\n          runAsUser: 33\r\n        volumeMounts:\r\n        - mountPath: /etc/nginx/template\r\n          name: nginx-template-volume\r\n        - mountPath: /var/lib/nginx/\r\n          name: nginx-var-lib\r\n      volumes:\r\n      - name: nginx-template-volume\r\n        configMap:\r\n          name: nginx-configuration\r\n          items:\r\n          - key: nginx.tmpl\r\n            path: nginx.tmpl\r\n      - name: nginx-var-lib\r\n        emptyDir: {}\r\n```\r\n\r\nThe `Dockerfile`'s entrypoint wants to set permissions on the directory, but it's read-only because it is mounted from a `ConfigMap`:\r\n\r\n```\r\nchown: changing ownership of '/etc/nginx/template/nginx.tmpl': Read-only file system\r\nchown: changing ownership of '/etc/nginx/template/..data': Read-only file system\r\nchown: changing ownership of '/etc/nginx/template/..2018_07_27_19_46_12.086463885/nginx.tmpl': Read-only file system\r\nchown: changing ownership of '/etc/nginx/template/..2018_07_27_19_46_12.086463885': Read-only file system\r\nchown: changing ownership of '/etc/nginx/template': Read-only file system\r\n``` \r\n\r\nI tried forcing the `ConfigMap` volume as `readOnly: false` but it does not help."},"comment":{"url":"https://api.github.com/repos/kubernetes/ingress-nginx/issues/comments/408532306","html_url":"https://github.com/kubernetes/ingress-nginx/issues/2861#issuecomment-408532306","issue_url":"https://api.github.com/repos/kubernetes/ingress-nginx/issues/2861","id":408532306,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODUzMjMwNg==","user":{"login":"bgagnon","id":81865,"node_id":"MDQ6VXNlcjgxODY1","avatar_url":"https://avatars2.githubusercontent.com/u/81865?v=4","gravatar_id":"","url":"https://api.github.com/users/bgagnon","html_url":"https://github.com/bgagnon","followers_url":"https://api.github.com/users/bgagnon/followers","following_url":"https://api.github.com/users/bgagnon/following{/other_user}","gists_url":"https://api.github.com/users/bgagnon/gists{/gist_id}","starred_url":"https://api.github.com/users/bgagnon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgagnon/subscriptions","organizations_url":"https://api.github.com/users/bgagnon/orgs","repos_url":"https://api.github.com/users/bgagnon/repos","events_url":"https://api.github.com/users/bgagnon/events{/privacy}","received_events_url":"https://api.github.com/users/bgagnon/received_events","type":"User","site_admin":false},"created_at":"2018-07-27T20:37:20Z","updated_at":"2018-07-27T20:37:20Z","author_association":"NONE","body":"Looks like this was added in 8107e0f6 and further refined in  df76d4b4.\r\nThe `chown` steps cannot work if the directory is mounted from a `ConfigMap`."}}
{"actor":{"display_login":"bgagnon"}}