-
Notifications
You must be signed in to change notification settings - Fork 40k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…29140-upstream-release-1.3 Automatic merge from submit-queue Automated cherry pick of #27961 #29140 upstream release 1.3 Cherry pick of #27961 and #29140 on release-1.3.
- Loading branch information
Showing
23 changed files
with
337 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2015 The Kubernetes Authors All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# A library of helper functions and constant for coreos os distro | ||
|
||
# $1: template name (required) | ||
function create-node-instance-template() { | ||
local template_name="$1" | ||
create-node-template "$template_name" "${scope_flags}" \ | ||
"kube-env=${KUBE_TEMP}/node-kube-env.yaml" \ | ||
"user-data=${KUBE_ROOT}/cluster/gce/coreos/node-${CONTAINER_RUNTIME}.yaml" \ | ||
"configure-node=${KUBE_ROOT}/cluster/gce/coreos/configure-node.sh" \ | ||
"configure-kubelet=${KUBE_ROOT}/cluster/gce/coreos/configure-kubelet.sh" \ | ||
"cluster-name=${KUBE_TEMP}/cluster-name.txt" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2015 The Kubernetes Authors All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# A library of helper functions and constant for debian os distro | ||
|
||
# $1: template name (required) | ||
function create-node-instance-template { | ||
local template_name="$1" | ||
prepare-startup-script | ||
create-node-template "$template_name" "${scope_flags}" \ | ||
"startup-script=${KUBE_TEMP}/configure-vm.sh" \ | ||
"kube-env=${KUBE_TEMP}/node-kube-env.yaml" \ | ||
"cluster-name=${KUBE_TEMP}/cluster-name.txt" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2016 The Kubernetes Authors All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# A library of helper functions and constant for GCI distro | ||
|
||
source "${KUBE_ROOT}/cluster/gce/gci/helper.sh" | ||
|
||
# create-master-instance creates the master instance. If called with | ||
# an argument, the argument is used as the name to a reserved IP | ||
# address for the master. (In the case of upgrade/repair, we re-use | ||
# the same IP.) | ||
# | ||
# It requires a whole slew of assumed variables, partially due to to | ||
# the call to write-master-env. Listing them would be rather | ||
# futile. Instead, we list the required calls to ensure any additional | ||
# | ||
# variables are set: | ||
# ensure-temp-dir | ||
# detect-project | ||
# get-bearer-token | ||
function create-master-instance { | ||
local address_opt="" | ||
[[ -n ${1:-} ]] && address_opt="--address ${1}" | ||
|
||
write-master-env | ||
ensure-gci-metadata-files | ||
gcloud compute instances create "${MASTER_NAME}" \ | ||
${address_opt} \ | ||
--project "${PROJECT}" \ | ||
--zone "${ZONE}" \ | ||
--machine-type "${MASTER_SIZE}" \ | ||
--image-project="${MASTER_IMAGE_PROJECT}" \ | ||
--image "${MASTER_IMAGE}" \ | ||
--tags "${MASTER_TAG}" \ | ||
--network "${NETWORK}" \ | ||
--scopes "storage-ro,compute-rw,monitoring,logging-write" \ | ||
--can-ip-forward \ | ||
--metadata-from-file \ | ||
"kube-env=${KUBE_TEMP}/master-kube-env.yaml,user-data=${KUBE_ROOT}/cluster/gce/gci/master.yaml,configure-sh=${KUBE_ROOT}/cluster/gce/gci/configure.sh,cluster-name=${KUBE_TEMP}/cluster-name.txt,gci-update-strategy=${KUBE_TEMP}/gci-update.txt,gci-ensure-gke-docker=${KUBE_TEMP}/gci-ensure-gke-docker.txt,gci-docker-version=${KUBE_TEMP}/gci-docker-version.txt" \ | ||
--disk "name=${MASTER_NAME}-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no" \ | ||
--boot-disk-size "${MASTER_ROOT_DISK_SIZE:-10}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2016 The Kubernetes Authors All rights reserved. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# A library of helper functions and constant for GCI distro | ||
source "${KUBE_ROOT}/cluster/gce/gci/helper.sh" | ||
|
||
# $1: template name (required). | ||
function create-node-instance-template { | ||
local template_name="$1" | ||
ensure-gci-metadata-files | ||
create-node-template "$template_name" "${scope_flags[*]}" \ | ||
"kube-env=${KUBE_TEMP}/node-kube-env.yaml" \ | ||
"user-data=${KUBE_ROOT}/cluster/gce/gci/node.yaml" \ | ||
"configure-sh=${KUBE_ROOT}/cluster/gce/gci/configure.sh" \ | ||
"cluster-name=${KUBE_TEMP}/cluster-name.txt" \ | ||
"gci-update-strategy=${KUBE_TEMP}/gci-update.txt" \ | ||
"gci-ensure-gke-docker=${KUBE_TEMP}/gci-ensure-gke-docker.txt" \ | ||
"gci-docker-version=${KUBE_TEMP}/gci-docker-version.txt" | ||
} |
Oops, something went wrong.