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
15aa0c44
Commit
15aa0c44
authored
Dec 01, 2015
by
Brendan Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a facility for custom user startup scripts via env variable
parent
d8c1a9a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
configure-vm.sh
cluster/gce/configure-vm.sh
+10
-1
No files found.
cluster/gce/configure-vm.sh
View file @
15aa0c44
...
...
@@ -65,7 +65,7 @@ function set-good-motd() {
}
function
curl-metadata
()
{
curl
--fail
--silent
-H
'Metadata-Flavor: Google'
"http://metadata/computeMetadata/v1/instance/attributes/
${
1
}
"
curl
--fail
--
retry
5
--
silent
-H
'Metadata-Flavor: Google'
"http://metadata/computeMetadata/v1/instance/attributes/
${
1
}
"
}
function
set-kube-env
()
{
...
...
@@ -661,6 +661,15 @@ if [[ -z "${is_push}" ]]; then
remove-docker-artifacts
run-salt
set-good-motd
if
curl-metadata k8s-user-startup-script
>
"
${
INSTALL_DIR
}
/k8s-user-script.sh"
;
then
user_script
=
$(
cat
"
${
INSTALL_DIR
}
/k8s-user-script.sh"
)
fi
if
[[
!
-z
${
user_script
:-}
]]
;
then
chmod
u+x
"
${
INSTALL_DIR
}
/k8s-user-script.sh"
echo
"== running user startup script =="
"
${
INSTALL_DIR
}
/k8s-user-script.sh"
fi
echo
"== kube-up node config done =="
else
echo
"== kube-push node config starting =="
...
...
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