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
18425172
Commit
18425172
authored
Jun 12, 2016
by
nikhiljindal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updating federation up scripts to work in non e2e setup
parent
8bcecac1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
common.sh
federation/cluster/common.sh
+4
-4
federation-up.sh
federation/cluster/federation-up.sh
+4
-0
template.go
federation/cluster/template.go
+1
-1
No files found.
federation/cluster/common.sh
View file @
18425172
...
...
@@ -46,7 +46,7 @@ if [[ -z "${FEDERATION_PUSH_REPO_BASE}" ]]; then
fi
FEDERATION_IMAGE_REPO_BASE
=
${
FEDERATION_IMAGE_REPO_BASE
:-
'gcr.io/google_containers'
}
FEDERATION_NAMESPACE
=
${
FEDERATION_NAMESPACE
:-
federation
-e2e
}
FEDERATION_NAMESPACE
=
${
FEDERATION_NAMESPACE
:-
federation
}
KUBE_PLATFORM
=
${
KUBE_PLATFORM
:-
linux
}
KUBE_ARCH
=
${
KUBE_ARCH
:-
amd64
}
...
...
@@ -98,7 +98,7 @@ function create-federation-api-objects {
FEDERATION_KUBECONFIG_PATH
=
"
${
KUBE_ROOT
}
/federation/cluster/kubeconfig"
federation_kubectl
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh --context=federat
ed
-cluster --namespace=default"
federation_kubectl
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh --context=federat
ion
-cluster --namespace=default"
manifests_root
=
"
${
KUBE_ROOT
}
/federation/manifests/"
...
...
@@ -151,7 +151,7 @@ function create-federation-api-objects {
# controller manager can use to talk to the federation-apiserver.
# Note that the file name should be "kubeconfig" so that the secret key gets the same name.
KUBECONFIG_DIR
=
$(
dirname
${
KUBECONFIG
:-
$DEFAULT_KUBECONFIG
})
CONTEXT
=
federat
ed
-cluster
\
CONTEXT
=
federat
ion
-cluster
\
KUBE_BEARER_TOKEN
=
"
$FEDERATION_API_TOKEN
"
\
KUBECONFIG
=
"
${
KUBECONFIG_DIR
}
/federation/federation-apiserver/kubeconfig"
\
create-kubeconfig
...
...
@@ -168,7 +168,7 @@ function create-federation-api-objects {
done
# Update the users kubeconfig to include federation-apiserver credentials.
CONTEXT
=
federat
ed
-cluster
\
CONTEXT
=
federat
ion
-cluster
\
KUBE_BEARER_TOKEN
=
"
$FEDERATION_API_TOKEN
"
\
SECONDARY_KUBECONFIG
=
true
\
create-kubeconfig
...
...
federation/cluster/federation-up.sh
View file @
18425172
...
...
@@ -22,4 +22,8 @@ KUBE_ROOT=$(readlink -m $(dirname "${BASH_SOURCE}")/../../)
.
${
KUBE_ROOT
}
/federation/cluster/common.sh
if
[[
-f
"
${
KUBE_ROOT
}
/federation/manifests/federated-image.tag"
]]
;
then
export
FEDERATION_IMAGE_TAG
=
"
$(
cat
"
${
KUBE_ROOT
}
/federation/manifests/federated-image.tag"
)
"
fi
create-federation-api-objects
federation/cluster/template.go
View file @
18425172
...
...
@@ -64,7 +64,7 @@ func main() {
}
func
templateYamlFile
(
params
map
[
string
]
string
,
inpath
string
,
out
io
.
Writer
)
error
{
if
tmpl
,
err
:=
template
.
New
(
path
.
Base
(
inpath
))
.
ParseFiles
(
inpath
);
err
!=
nil
{
if
tmpl
,
err
:=
template
.
New
(
path
.
Base
(
inpath
))
.
Option
(
"missingkey=zero"
)
.
ParseFiles
(
inpath
);
err
!=
nil
{
return
err
}
else
{
if
err
:=
tmpl
.
Execute
(
out
,
params
);
err
!=
nil
{
...
...
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