mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 13:12:20 +00:00
If the file already exists we need to grant group read permissions explicitly.
This commit is contained in:
@@ -622,6 +622,7 @@ function write-pki-data {
|
|||||||
if [[ -n "${KUBE_PKI_READERS_GROUP:-}" ]]; then
|
if [[ -n "${KUBE_PKI_READERS_GROUP:-}" ]]; then
|
||||||
(umask 027; echo "${data}" | base64 --decode > "${path}")
|
(umask 027; echo "${data}" | base64 --decode > "${path}")
|
||||||
chgrp "${KUBE_PKI_READERS_GROUP:-}" "${path}"
|
chgrp "${KUBE_PKI_READERS_GROUP:-}" "${path}"
|
||||||
|
chmod g+r "${path}"
|
||||||
else
|
else
|
||||||
(umask 077; echo "${data}" | base64 --decode > "${path}")
|
(umask 077; echo "${data}" | base64 --decode > "${path}")
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user