mirror of https://github.com/k3s-io/k3s
Merge pull request #52868 from ihmccreery/node-service-account
Automatic merge from submit-queue (batch tested with PRs 52868, 53196, 54207). 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>. Allow users to configure the service account made available on their nodes **What this PR does / why we need it**: This allows users (and tests) to configure what GCP service account nodes are given when they are created, to allow users to grant fewer permissions to their nodes via IAM (instead of scopes). Read more about service accounts and scopes here: https://cloud.google.com/compute/docs/access/service-accounts **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #53603 **Special notes for your reviewer**: **Release note**: ```release-note Allow GCE users to configure the service account made available on their nodes ```pull/6/head
commit
a0ee4b9b44
|
@ -79,6 +79,7 @@ MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
|
|||
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-cos-cloud}
|
||||
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${GCI_VERSION}}
|
||||
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-cos-cloud}
|
||||
NODE_SERVICE_ACCOUNT=${KUBE_GCE_NODE_SERVICE_ACCOUNT:-default}
|
||||
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
||||
RKT_VERSION=${KUBE_RKT_VERSION:-1.23.0}
|
||||
RKT_STAGE1_IMAGE=${KUBE_RKT_STAGE1_IMAGE:-coreos.com/rkt/stage1-coreos}
|
||||
|
|
|
@ -78,6 +78,7 @@ MASTER_IMAGE=${KUBE_GCE_MASTER_IMAGE:-}
|
|||
MASTER_IMAGE_PROJECT=${KUBE_GCE_MASTER_PROJECT:-cos-cloud}
|
||||
NODE_IMAGE=${KUBE_GCE_NODE_IMAGE:-${GCI_VERSION}}
|
||||
NODE_IMAGE_PROJECT=${KUBE_GCE_NODE_PROJECT:-cos-cloud}
|
||||
NODE_SERVICE_ACCOUNT=${KUBE_GCE_NODE_SERVICE_ACCOUNT:-default}
|
||||
CONTAINER_RUNTIME=${KUBE_CONTAINER_RUNTIME:-docker}
|
||||
GCI_DOCKER_VERSION=${KUBE_GCI_DOCKER_VERSION:-}
|
||||
RKT_VERSION=${KUBE_RKT_VERSION:-1.23.0}
|
||||
|
|
|
@ -616,6 +616,7 @@ function create-node-template() {
|
|||
--boot-disk-size "${NODE_DISK_SIZE}" \
|
||||
--image-project="${NODE_IMAGE_PROJECT}" \
|
||||
--image "${NODE_IMAGE}" \
|
||||
--service-account "${NODE_SERVICE_ACCOUNT}" \
|
||||
--tags "${NODE_TAG}" \
|
||||
${accelerator_args} \
|
||||
${local_ssds} \
|
||||
|
@ -1355,6 +1356,7 @@ function create-nodes() {
|
|||
# - NODE_DISK_SIZE
|
||||
# - NODE_IMAGE_PROJECT
|
||||
# - NODE_IMAGE
|
||||
# - NODE_SERVICE_ACCOUNT
|
||||
# - NODE_TAG
|
||||
# - NETWORK
|
||||
# - ENABLE_IP_ALIASES
|
||||
|
@ -1385,6 +1387,7 @@ function create-heapster-node() {
|
|||
--boot-disk-size "${NODE_DISK_SIZE}" \
|
||||
--image-project="${NODE_IMAGE_PROJECT}" \
|
||||
--image "${NODE_IMAGE}" \
|
||||
--service-account "${NODE_SERVICE_ACCOUNT}" \
|
||||
--tags "${NODE_TAG}" \
|
||||
${network} \
|
||||
$(get-scope-flags) \
|
||||
|
|
Loading…
Reference in New Issue