kubernetes/pkg/api/v1
Kubernetes Submit Queue 6824f4c08a Merge pull request #28936 from rata/secret-configmap-file-mode
Automatic merge from submit-queue

Allow setting permission mode bits on secrets, configmaps and downwardAPI files

cc @thockin @pmorie 

Here is the first round to implement: https://github.com/kubernetes/kubernetes/pull/28733.

I made two commits: one with the actual change and the other with the auto-generated code. I think it's easier to review this way, but let me know if you prefer in some other way.

I haven't written any tests yet, I wanted to have a first glance and not write them till this (and the API) are more close to the "LGTM" :)

There are some things:
 * I'm not sure where to do the "AND 0777". I'll try to look better in the code base, but suggestions are always welcome :)
 * The write permission on group and others is not set when you do an `ls -l` on the running container. It does work with write permissions to the owner. Debugging seems to show that is something happening after this is correctly set on creation. Will look closer.
 * The default permission (when the new fields are not specified) are the same that on kubernetes v1.3
 * I do realize there are conflicts with master, but I think this is good enough to have a look. The conflicts is with the autog-enerated code, so the actual code is actually the same (and it takes like ~30 minutes to generate it here)
 * I didn't generate the docs (`generated-docs` and `generated-swagger-docs` from `hack/update-all.sh`) because my machine runs out of mem. So that's why it isn't in this first PR, will try to investigate and see why it happens.

Other than that, this works fine here with some silly scripts I did to create a secret&configmap&downwardAPI, a pod and check the file permissions. Tested the "defaultMode" and "mode" for all. But of course, will write tests once this is looking fine :)


Thanks a lot again!
Rodrigo
2016-08-18 05:59:48 -07:00
..
backward_compatibility_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
conversion_test.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
conversion.go Adding events to federation apiserver 2016-08-12 10:48:19 -07:00
defaults_test.go Add mode permission bits to configmap, secrets and downwardAPI 2016-08-17 14:44:41 -04:00
defaults.go Add mode permission bits to configmap, secrets and downwardAPI 2016-08-17 14:44:41 -04:00
doc.go Use Go canonical import paths 2016-07-16 13:48:21 -04:00
generated.pb.go Update generated code 2016-08-17 14:44:42 -04:00
generated.proto Merge pull request #28936 from rata/secret-configmap-file-mode 2016-08-18 05:59:48 -07:00
meta.go Remove "All rights reserved" from all the headers. 2016-06-29 17:47:36 -07:00
register.go fix register.go files up + add test import 2016-08-11 17:06:54 -07:00
types_swagger_doc_generated.go Update generated code 2016-08-17 14:44:42 -04:00
types.generated.go Update generated code 2016-08-17 14:44:42 -04:00
types.go Merge pull request #28936 from rata/secret-configmap-file-mode 2016-08-18 05:59:48 -07:00
zz_generated.conversion.go Update generated code 2016-08-17 14:44:42 -04:00
zz_generated.deepcopy.go Update generated code 2016-08-17 14:44:42 -04:00