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
3da686fe
Commit
3da686fe
authored
Jun 02, 2015
by
Brian Grant
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8894 from cjcullen/kmaster2
Add an explicit variable to indicate whether an instance is master or not
parents
08e20d3b
dcf5b16c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
configure-vm.sh
cluster/gce/configure-vm.sh
+0
-7
helper.sh
cluster/gce/coreos/helper.sh
+2
-0
helper.sh
cluster/gce/debian/helper.sh
+2
-0
No files found.
cluster/gce/configure-vm.sh
View file @
3da686fe
...
...
@@ -77,13 +77,6 @@ import pipes,sys,yaml
for k,v in yaml.load(sys.stdin).iteritems():
print "readonly {var}={value}".format(var = k, value = pipes.quote(str(v)))
'''
<
"
${
kube_env_yaml
}
"
)
# Infer master status from hostname
if
[[
$(
hostname
)
==
"
${
INSTANCE_PREFIX
}
-master"
]]
;
then
KUBERNETES_MASTER
=
"true"
else
KUBERNETES_MASTER
=
"false"
fi
}
function
remove-docker-artifacts
()
{
...
...
cluster/gce/coreos/helper.sh
View file @
3da686fe
...
...
@@ -25,6 +25,7 @@ function build-kube-env {
# TODO(dawnchen): master node is still running with debian image
if
[[
"
${
master
}
"
==
"true"
]]
;
then
cat
>
$file
<<
EOF
KUBERNETES_MASTER: "true"
ENV_TIMESTAMP:
$(
yaml-quote
$(
date
-u
+%Y-%m-%dT%T%z
))
INSTANCE_PREFIX:
$(
yaml-quote
${
INSTANCE_PREFIX
})
NODE_INSTANCE_PREFIX:
$(
yaml-quote
${
NODE_INSTANCE_PREFIX
})
...
...
@@ -60,6 +61,7 @@ KUBECFG_KEY: $(yaml-quote ${KUBECFG_KEY_BASE64:-})
EOF
else
cat
>>
$file
<<
EOF
KUBERNETES_MASTER: "false"
ENV_TIMESTAMP=
$(
yaml-quote
$(
date
-u
+%Y-%m-%dT%T%z
))
INSTANCE_PREFIX=
$(
yaml-quote
${
INSTANCE_PREFIX
})
NODE_INSTANCE_PREFIX=
$(
yaml-quote
${
NODE_INSTANCE_PREFIX
})
...
...
cluster/gce/debian/helper.sh
View file @
3da686fe
...
...
@@ -51,6 +51,7 @@ EOF
if
[[
"
${
master
}
"
==
"true"
]]
;
then
# Master-only env vars.
cat
>>
$file
<<
EOF
KUBERNETES_MASTER: "true"
KUBE_USER:
$(
yaml-quote
${
KUBE_USER
})
KUBE_PASSWORD:
$(
yaml-quote
${
KUBE_PASSWORD
})
KUBE_BEARER_TOKEN:
$(
yaml-quote
${
KUBE_BEARER_TOKEN
})
...
...
@@ -62,6 +63,7 @@ EOF
else
# Node-only env vars.
cat
>>
$file
<<
EOF
KUBERNETES_MASTER: "false"
KUBERNETES_MASTER_NAME:
$(
yaml-quote
${
MASTER_NAME
})
ZONE:
$(
yaml-quote
${
ZONE
})
EXTRA_DOCKER_OPTS:
$(
yaml-quote
${
EXTRA_DOCKER_OPTS
})
...
...
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