Re: Permissions problem mounting file from ConfigMap

2017-12-13 Thread Graham Dumpleton
I don't know. But should be within a minute or so. Do note that this refresh ability does depend on it being enabled in the cluster master configuration. It should be, although have seen where cluster was upgraded from 3.5 to 3.6, the setting somehow got lost and had to be fixed after the fact

Re: Permissions problem mounting file from ConfigMap

2017-12-13 Thread Joel Pearson
Oh, I didn't realise configmaps got updated without a Pod restart. How long does it take to update? I see in ( https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/#mounted-configmaps-are-updated-automatically) it says the kubelet sync period + ttl. What are the

Re: Permissions problem mounting file from ConfigMap

2017-12-13 Thread Graham Dumpleton
If you copy it rather than symlink, you will loose the ability that an update to the configmap will be reflected automatically inside of the container after a short period. If the file was something that was rescanned by the application, this allows changes to be pushed into a container without

Re: Permissions problem mounting file from ConfigMap

2017-12-13 Thread Tim Dudgeon
Graham, Thanks for your help on this. I had managed to work around the problem in a way similar to how you described (but copying not symlinking). Not nice, but it works! On 12/12/17 21:10, Graham Dumpleton wrote: A belated update on this. The problem with using subPath is due to a SELinux

Re: Permissions problem mounting file from ConfigMap

2017-12-12 Thread Graham Dumpleton
A belated update on this. The problem with using subPath is due to a SELinux issue in the kernel. There is an issue about it at: https://github.com/openshift/origin/issues/16951 Whether you see it will depend on how SELinux is setup I

Re: Permissions problem mounting file from ConfigMap

2017-12-09 Thread Tim Dudgeon
If you mount onto a new directory you get the same problem. It only seems to happen when specifying a subPath as follows:     - mountPath: /usr/local/tomcat/webapps/portal/META-INF/context.xml   name: squonk-sso-config   subPath: context.xml  

Re: Permissions problem mounting file from ConfigMap

2017-12-08 Thread Graham Dumpleton
The permissions is correct. It is shown as decimal, not the octal you are setting it with. >>> '%o' % 420 '644' What happens when you mount the configmap onto a directory separate from anything else? Graham > On 9 Dec 2017, at 4:02 am, Tim Dudgeon wrote: > > More on

Re: Permissions problem mounting file from ConfigMap

2017-12-08 Thread Tim Dudgeon
More on this. I find when I look a the deployment yaml that the volume ends up looking like this:   volumes:     - configMap:     defaultMode: 420     name: squonk-sso-config   name: squonk-sso-config This is despite `oc explain pod.spec.volumes.configMap`

Permissions problem mounting file from ConfigMap

2017-12-08 Thread Tim Dudgeon
Hi All, I'm having a problem mounting a file from a ConfigMap when running on an Openshift origin environment, but when doing the same on Minishift it works fine. I'm mounting the context.xml file from the ConfigMap into the container like this:   spec:     containers:     -