Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
186b83fe
Unverified
Commit
186b83fe
authored
Feb 04, 2019
by
Bob Killen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix shellcheck lint errors in test/kubemark/gce/util.sh
parent
5f4b9198
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
15 deletions
+14
-15
.shellcheck_failures
hack/.shellcheck_failures
+0
-1
util.sh
test/kubemark/gce/util.sh
+14
-14
No files found.
hack/.shellcheck_failures
View file @
186b83fe
...
@@ -145,7 +145,6 @@
...
@@ -145,7 +145,6 @@
./test/images/volume/rbd/create_block.sh
./test/images/volume/rbd/create_block.sh
./test/images/volume/rbd/mon.sh
./test/images/volume/rbd/mon.sh
./test/images/volume/rbd/osd.sh
./test/images/volume/rbd/osd.sh
./test/kubemark/gce/util.sh
./test/kubemark/iks/shutdown.sh
./test/kubemark/iks/shutdown.sh
./test/kubemark/iks/startup.sh
./test/kubemark/iks/startup.sh
./test/kubemark/iks/util.sh
./test/kubemark/iks/util.sh
...
...
test/kubemark/gce/util.sh
View file @
186b83fe
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../../..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/../../..
source
"
${
KUBE_ROOT
}
/test/kubemark/common/util.sh"
source
"
${
KUBE_ROOT
}
/test/kubemark/common/util.sh"
...
@@ -47,7 +47,7 @@ function get-or-create-master-ip {
...
@@ -47,7 +47,7 @@ function get-or-create-master-ip {
}
}
function
create-master-instance-with-resources
{
function
create-master-instance-with-resources
{
GCLOUD_COMMON_ARGS
=
"--project
${
PROJECT
}
--zone
${
ZONE
}
"
GCLOUD_COMMON_ARGS
=
(
--project
"
${
PROJECT
}
"
--zone
"
${
ZONE
}
"
)
# Override the master image project to cos-cloud for COS images staring with `cos` string prefix.
# Override the master image project to cos-cloud for COS images staring with `cos` string prefix.
DEFAULT_GCI_PROJECT
=
google-containers
DEFAULT_GCI_PROJECT
=
google-containers
if
[[
"
${
GCI_VERSION
}
"
==
"cos"
*
]]
;
then
if
[[
"
${
GCI_VERSION
}
"
==
"cos"
*
]]
;
then
...
@@ -56,13 +56,13 @@ function create-master-instance-with-resources {
...
@@ -56,13 +56,13 @@ function create-master-instance-with-resources {
MASTER_IMAGE_PROJECT
=
${
KUBE_GCE_MASTER_PROJECT
:-${
DEFAULT_GCI_PROJECT
}}
MASTER_IMAGE_PROJECT
=
${
KUBE_GCE_MASTER_PROJECT
:-${
DEFAULT_GCI_PROJECT
}}
run-gcloud-compute-with-retries disks create
"
${
MASTER_NAME
}
-pd"
\
run-gcloud-compute-with-retries disks create
"
${
MASTER_NAME
}
-pd"
\
${
GCLOUD_COMMON_ARGS
}
\
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
\
--type
"
${
MASTER_DISK_TYPE
}
"
\
--type
"
${
MASTER_DISK_TYPE
}
"
\
--size
"
${
MASTER_DISK_SIZE
}
"
&
--size
"
${
MASTER_DISK_SIZE
}
"
&
if
[
"
${
EVENT_PD
:-}
"
==
"true"
]
;
then
if
[
"
${
EVENT_PD
:-}
"
==
"true"
]
;
then
run-gcloud-compute-with-retries disks create
"
${
MASTER_NAME
}
-event-pd"
\
run-gcloud-compute-with-retries disks create
"
${
MASTER_NAME
}
-event-pd"
\
${
GCLOUD_COMMON_ARGS
}
\
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
\
--type
"
${
MASTER_DISK_TYPE
}
"
\
--type
"
${
MASTER_DISK_TYPE
}
"
\
--size
"
${
MASTER_DISK_SIZE
}
"
&
--size
"
${
MASTER_DISK_SIZE
}
"
&
fi
fi
...
@@ -72,7 +72,7 @@ function create-master-instance-with-resources {
...
@@ -72,7 +72,7 @@ function create-master-instance-with-resources {
wait
wait
run-gcloud-compute-with-retries instances create
"
${
MASTER_NAME
}
"
\
run-gcloud-compute-with-retries instances create
"
${
MASTER_NAME
}
"
\
${
GCLOUD_COMMON_ARGS
}
\
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
\
--address
"
${
MASTER_IP
}
"
\
--address
"
${
MASTER_IP
}
"
\
--machine-type
"
${
MASTER_SIZE
}
"
\
--machine-type
"
${
MASTER_SIZE
}
"
\
--image-project
=
"
${
MASTER_IMAGE_PROJECT
}
"
\
--image-project
=
"
${
MASTER_IMAGE_PROJECT
}
"
\
...
@@ -84,13 +84,13 @@ function create-master-instance-with-resources {
...
@@ -84,13 +84,13 @@ function create-master-instance-with-resources {
--disk
"name=
${
MASTER_NAME
}
-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
--disk
"name=
${
MASTER_NAME
}
-pd,device-name=master-pd,mode=rw,boot=no,auto-delete=no"
run-gcloud-compute-with-retries instances add-metadata
"
${
MASTER_NAME
}
"
\
run-gcloud-compute-with-retries instances add-metadata
"
${
MASTER_NAME
}
"
\
${
GCLOUD_COMMON_ARGS
}
\
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
\
--metadata-from-file
startup-script
=
"
${
KUBE_ROOT
}
/test/kubemark/resources/start-kubemark-master.sh"
&
--metadata-from-file
startup-script
=
"
${
KUBE_ROOT
}
/test/kubemark/resources/start-kubemark-master.sh"
&
if
[
"
${
EVENT_PD
:-}
"
==
"true"
]
;
then
if
[
"
${
EVENT_PD
:-}
"
==
"true"
]
;
then
echo
"Attaching
${
MASTER_NAME
}
-event-pd to
${
MASTER_NAME
}
"
echo
"Attaching
${
MASTER_NAME
}
-event-pd to
${
MASTER_NAME
}
"
run-gcloud-compute-with-retries instances attach-disk
"
${
MASTER_NAME
}
"
\
run-gcloud-compute-with-retries instances attach-disk
"
${
MASTER_NAME
}
"
\
${
GCLOUD_COMMON_ARGS
}
\
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
\
--disk
"
${
MASTER_NAME
}
-event-pd"
\
--disk
"
${
MASTER_NAME
}
-event-pd"
\
--device-name
=
"master-event-pd"
&
--device-name
=
"master-event-pd"
&
fi
fi
...
@@ -112,20 +112,20 @@ function execute-cmd-on-master-with-retries() {
...
@@ -112,20 +112,20 @@ function execute-cmd-on-master-with-retries() {
}
}
function
copy-files
()
{
function
copy-files
()
{
run-gcloud-compute-with-retries scp
--recurse
--zone
=
"
${
ZONE
}
"
--project
=
"
${
PROJECT
}
"
$@
run-gcloud-compute-with-retries scp
--recurse
--zone
=
"
${
ZONE
}
"
--project
=
"
${
PROJECT
}
"
"
$@
"
}
}
function
delete-master-instance-and-resources
{
function
delete-master-instance-and-resources
{
GCLOUD_COMMON_ARGS
=
"--project
${
PROJECT
}
--zone
${
ZONE
}
--quiet"
GCLOUD_COMMON_ARGS
=
(
--project
"
${
PROJECT
}
"
--zone
"
${
ZONE
}
"
--quiet
)
gcloud compute instances delete
"
${
MASTER_NAME
}
"
\
gcloud compute instances delete
"
${
MASTER_NAME
}
"
\
${
GCLOUD_COMMON_ARGS
}
||
true
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
||
true
gcloud compute disks delete
"
${
MASTER_NAME
}
-pd"
\
gcloud compute disks delete
"
${
MASTER_NAME
}
-pd"
\
${
GCLOUD_COMMON_ARGS
}
||
true
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
||
true
gcloud compute disks delete
"
${
MASTER_NAME
}
-event-pd"
\
gcloud compute disks delete
"
${
MASTER_NAME
}
-event-pd"
\
${
GCLOUD_COMMON_ARGS
}
&> /dev/null
||
true
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
&> /dev/null
||
true
gcloud compute addresses delete
"
${
MASTER_NAME
}
-ip"
\
gcloud compute addresses delete
"
${
MASTER_NAME
}
-ip"
\
--project
"
${
PROJECT
}
"
\
--project
"
${
PROJECT
}
"
\
...
@@ -138,9 +138,9 @@ function delete-master-instance-and-resources {
...
@@ -138,9 +138,9 @@ function delete-master-instance-and-resources {
if
[
"
${
SEPARATE_EVENT_MACHINE
:-
false
}
"
==
"true"
]
;
then
if
[
"
${
SEPARATE_EVENT_MACHINE
:-
false
}
"
==
"true"
]
;
then
gcloud compute instances delete
"
${
EVENT_STORE_NAME
}
"
\
gcloud compute instances delete
"
${
EVENT_STORE_NAME
}
"
\
${
GCLOUD_COMMON_ARGS
}
||
true
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
||
true
gcloud compute disks delete
"
${
EVENT_STORE_NAME
}
-pd"
\
gcloud compute disks delete
"
${
EVENT_STORE_NAME
}
-pd"
\
${
GCLOUD_COMMON_ARGS
}
||
true
"
${
GCLOUD_COMMON_ARGS
[@]
}
"
||
true
fi
fi
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment