Merge pull request #62301 from filbranden/umask1

Automatic merge from submit-queue (batch tested with PRs 60197, 61614, 62074, 62071, 62301). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix umask to actually intended behavior.

**What this PR does / why we need it**:
Fix umask to actually intended behavior.

Follow up to #57052

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #52999

**Special notes for your reviewer**:
/assign @tallclair 
/cc @mikedanese @roberthbailey 

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-04-10 08:56:32 -07:00 committed by GitHub
commit 31d22870b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ EOF
function download-kube-env {
# Fetch kube-env from GCE metadata server.
(umask 700;
(umask 077;
local -r tmp_kube_env="/tmp/kube-env.yaml"
curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \
-H "X-Google-Metadata-Request: True" \
@ -72,7 +72,7 @@ for k,v in yaml.load(sys.stdin).iteritems():
function download-kube-master-certs {
# Fetch kube-env from GCE metadata server.
(umask 700;
(umask 077;
local -r tmp_kube_master_certs="/tmp/kube-master-certs.yaml"
curl --fail --retry 5 --retry-delay 3 ${CURL_RETRY_CONNREFUSED} --silent --show-error \
-H "X-Google-Metadata-Request: True" \