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
9cda80e8
Commit
9cda80e8
authored
Feb 23, 2019
by
SataQiu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shellcheck lint errors in cluster and hack scripts
parent
0133d141
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
9 deletions
+10
-9
node-helper.sh
cluster/gce/gci/node-helper.sh
+5
-1
update-storage-objects.sh
cluster/update-storage-objects.sh
+3
-3
.shellcheck_failures
hack/.shellcheck_failures
+0
-3
update-generated-runtime.sh
hack/update-generated-runtime.sh
+2
-2
No files found.
cluster/gce/gci/node-helper.sh
View file @
9cda80e8
...
...
@@ -33,9 +33,13 @@ function get-node-instance-metadata-from-file {
echo
"
${
metadata
}
"
}
# $1: template name (required).
# Assumed vars:
# scope_flags
# Parameters:
# $1: template name (required).
function
create-linux-node-instance-template
{
local
template_name
=
"
$1
"
ensure-gci-metadata-files
# shellcheck disable=2154 # 'scope_flags' is assigned by upstream
create-node-template
"
${
template_name
}
"
"
${
scope_flags
[*]
}
"
"
$(
get-node-instance-metadata-from-file
)
"
""
"linux"
}
cluster/update-storage-objects.sh
View file @
9cda80e8
...
...
@@ -25,7 +25,7 @@ set -o errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
source
"
${
KUBE_ROOT
}
/hack/lib/init.sh"
KUBECTL
=
"
${
KUBE_OUTPUT_HOSTBIN
}
/kubectl"
...
...
@@ -57,7 +57,7 @@ declare -a resources=(
)
# Find all the namespaces.
namespaces
=(
$(
"
${
KUBECTL
}
"
get namespaces
-o
go-template
=
"{{range.items}}{{.metadata.name}} {{end}}"
)
)
IFS
=
" "
read
-r
-a
namespaces
<<<
"
$(
"
${
KUBECTL
}
"
get namespaces
-o
go-template
=
"{{range.items}}{{.metadata.name}} {{end}}"
)
"
if
[
-z
"
${
namespaces
:-}
"
]
then
echo
"Unexpected: No namespace found. Nothing to do."
...
...
@@ -74,7 +74,7 @@ do
# TODO hopefully we can remove this once we use dynamic discovery of gettable/updateable
# resources.
set
+e
instances
=(
$(
"
${
KUBECTL
}
"
get
"
${
resource
}
"
--namespace
=
"
${
namespace
}
"
-o
go-template
=
"{{range.items}}{{.metadata.name}} {{end}}"
)
)
IFS
=
" "
read
-r
-a
instances
<<<
"
$(
"
${
KUBECTL
}
"
get
"
${
resource
}
"
--namespace
=
"
${
namespace
}
"
-o
go-template
=
"{{range.items}}{{.metadata.name}} {{end}}"
)
"
result
=
$?
set
-e
...
...
hack/.shellcheck_failures
View file @
9cda80e8
...
...
@@ -12,7 +12,6 @@
./cluster/gce/gci/health-monitor.sh
./cluster/gce/gci/master-helper.sh
./cluster/gce/gci/mounter/stage-upload.sh
./cluster/gce/gci/node-helper.sh
./cluster/gce/gci/shutdown.sh
./cluster/gce/list-resources.sh
./cluster/gce/upgrade-aliases.sh
...
...
@@ -34,7 +33,6 @@
./cluster/test-e2e.sh
./cluster/test-network.sh
./cluster/test-smoke.sh
./cluster/update-storage-objects.sh
./cluster/validate-cluster.sh
./hack/cherry_pick_pull.sh
./hack/generate-bindata.sh
...
...
@@ -79,7 +77,6 @@
./hack/update-generated-kms-dockerized.sh
./hack/update-generated-protobuf-dockerized.sh
./hack/update-generated-runtime-dockerized.sh
./hack/update-generated-runtime.sh
./hack/update-godep-licenses.sh
./hack/update-gofmt.sh
./hack/update-openapi-spec.sh
...
...
hack/update-generated-runtime.sh
View file @
9cda80e8
...
...
@@ -18,12 +18,12 @@ set -o errexit
set
-o
nounset
set
-o
pipefail
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/..
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
[0]
}
"
)
/..
# NOTE: All output from this script needs to be copied back to the calling
# source tree. This is managed in kube::build::copy_output in build/common.sh.
# If the output set is changed update that function.
${
KUBE_ROOT
}
/build/run.sh
hack/update-generated-runtime-dockerized.sh
"
$@
"
"
${
KUBE_ROOT
}
/build/run.sh"
hack/update-generated-runtime-dockerized.sh
"
$@
"
# ex: ts=2 sw=2 et filetype=sh
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