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
f82fa4dc
Commit
f82fa4dc
authored
Feb 22, 2018
by
Mike Danese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gce: allow extra addons to be sourced form a url
parent
fd1527a9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
configure-helper.sh
cluster/gce/gci/configure-helper.sh
+31
-0
No files found.
cluster/gce/gci/configure-helper.sh
View file @
f82fa4dc
...
@@ -1954,6 +1954,33 @@ function setup-addon-manifests {
...
@@ -1954,6 +1954,33 @@ function setup-addon-manifests {
fi
fi
}
}
# A function that downloads extra addons from a URL and puts them in the GCI
# manifests directory.
function
download-extra-addons
{
local
-r
out_dir
=
"
${
KUBE_HOME
}
/kube-manifests/kubernetes/gci-trusty/gce-extras"
mkdir
-p
"
${
out_dir
}
"
local
curl_cmd
=(
"curl"
"--fail"
"--retry"
"5"
"--retry-delay"
"3"
"--silent"
"--show-error"
)
if
[[
-n
"
${
CURL_RETRY_CONNREFUSED
:-}
"
]]
;
then
curl_cmd+
=(
"
${
CURL_RETRY_CONNREFUSED
}
"
)
fi
if
[[
-n
"
${
EXTRA_ADDONS_HEADER
:-}
"
]]
;
then
curl_cmd+
=(
"-H"
"
${
EXTRA_ADDONS_HEADER
}
"
)
fi
curl_cmd+
=(
"-o"
"
${
out_dir
}
/extras.json"
)
curl_cmd+
=(
"
${
EXTRA_ADDONS_URL
}
"
)
"
${
curl_cmd
[@]
}
"
}
# A helper function for copying manifests and setting dir/files
# A helper function for copying manifests and setting dir/files
# permissions.
# permissions.
#
#
...
@@ -2245,6 +2272,10 @@ EOF
...
@@ -2245,6 +2272,10 @@ EOF
setup-addon-manifests
"addons"
"istio/noauth"
setup-addon-manifests
"addons"
"istio/noauth"
fi
fi
fi
fi
if
[[
-n
"
${
EXTRA_ADDONS_URL
:-}
"
]]
;
then
download-extra-addons
setup-addon-manifests
"addons"
"gce-extras"
fi
# Place addon manager pod manifest.
# Place addon manager pod manifest.
cp
"
${
src_dir
}
/kube-addon-manager.yaml"
/etc/kubernetes/manifests
cp
"
${
src_dir
}
/kube-addon-manager.yaml"
/etc/kubernetes/manifests
...
...
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