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
9c9eb2af
Unverified
Commit
9c9eb2af
authored
Oct 31, 2018
by
k8s-ci-robot
Committed by
GitHub
Oct 31, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #68257 from mikedanese/cfghlpr-fixup
gce: move more stuff into main and refactor detect whether configure-helpers.sh was sourced
parents
c81a4a09
8c1e9285
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
21 deletions
+18
-21
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+17
-20
configure_helper_test.go
cluster/gce/gci/configure_helper_test.go
+1
-1
No files found.
cluster/gce/gci/configure-helper.sh
View file @
9c9eb2af
...
...
@@ -25,21 +25,6 @@ set -o errexit
set
-o
nounset
set
-o
pipefail
readonly
UUID_MNT_PREFIX
=
"/mnt/disks/by-uuid/google-local-ssds"
readonly
UUID_BLOCK_PREFIX
=
"/dev/disk/by-uuid/google-local-ssds"
readonly
COREDNS_AUTOSCALER
=
"Deployment/coredns"
readonly
KUBEDNS_AUTOSCALER
=
"Deployment/kube-dns"
# Resource requests of master components.
KUBE_CONTROLLER_MANAGER_CPU_REQUEST
=
"
${
KUBE_CONTROLLER_MANAGER_CPU_REQUEST
:-
200m
}
"
KUBE_SCHEDULER_CPU_REQUEST
=
"
${
KUBE_SCHEDULER_CPU_REQUEST
:-
75m
}
"
# Use --retry-connrefused opt only if it's supported by curl.
CURL_RETRY_CONNREFUSED
=
""
if
curl
--help
|
grep
-q
--
'--retry-connrefused'
;
then
CURL_RETRY_CONNREFUSED
=
'--retry-connrefused'
fi
function
setup-os-params
{
# Reset core_pattern. On GCI, the default core_pattern pipes the core dumps to
# /sbin/crash_reporter which is more restrictive in saving crash dumps. So for
...
...
@@ -2750,6 +2735,21 @@ EOF
function
main
()
{
echo
"Start to configure instance for kubernetes"
readonly
UUID_MNT_PREFIX
=
"/mnt/disks/by-uuid/google-local-ssds"
readonly
UUID_BLOCK_PREFIX
=
"/dev/disk/by-uuid/google-local-ssds"
readonly
COREDNS_AUTOSCALER
=
"Deployment/coredns"
readonly
KUBEDNS_AUTOSCALER
=
"Deployment/kube-dns"
# Resource requests of master components.
KUBE_CONTROLLER_MANAGER_CPU_REQUEST
=
"
${
KUBE_CONTROLLER_MANAGER_CPU_REQUEST
:-
200m
}
"
KUBE_SCHEDULER_CPU_REQUEST
=
"
${
KUBE_SCHEDULER_CPU_REQUEST
:-
75m
}
"
# Use --retry-connrefused opt only if it's supported by curl.
CURL_RETRY_CONNREFUSED
=
""
if
curl
--help
|
grep
-q
--
'--retry-connrefused'
;
then
CURL_RETRY_CONNREFUSED
=
'--retry-connrefused'
fi
KUBE_HOME
=
"/home/kubernetes"
CONTAINERIZED_MOUNTER_HOME
=
"
${
KUBE_HOME
}
/containerized_mounter"
PV_RECYCLER_OVERRIDE_TEMPLATE
=
"
${
KUBE_HOME
}
/kube-manifests/kubernetes/pv-recycler-template.yaml"
...
...
@@ -2841,9 +2841,6 @@ function main() {
echo
"Done for the configuration for kubernetes"
}
# use --source-only to test functions defined in this script.
if
[[
"$#"
-eq
1
&&
"
${
1
}
"
==
"--source-only"
]]
;
then
:
else
main
"
${
@
}
"
if
[[
"
${
BASH_SOURCE
[0]
}
"
==
"
${
0
}
"
]]
;
then
main
"
${
@
}
"
fi
cluster/gce/gci/configure_helper_test.go
View file @
9c9eb2af
...
...
@@ -125,7 +125,7 @@ func (c *ManifestTestCase) mustCreateEnv(envTemplate string, env interface{}) {
func
(
c
*
ManifestTestCase
)
mustInvokeFunc
(
envTemplate
string
,
env
interface
{})
{
c
.
mustCreateEnv
(
envTemplate
,
env
)
args
:=
fmt
.
Sprintf
(
"source %s ; source %s
--source-only
; %s"
,
c
.
envScriptPath
,
configureHelperScriptName
,
c
.
manifestFuncName
)
args
:=
fmt
.
Sprintf
(
"source %s ; source %s; %s"
,
c
.
envScriptPath
,
configureHelperScriptName
,
c
.
manifestFuncName
)
cmd
:=
exec
.
Command
(
"bash"
,
"-c"
,
args
)
bs
,
err
:=
cmd
.
CombinedOutput
()
...
...
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