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
08f17bfa
Commit
08f17bfa
authored
Apr 14, 2015
by
Lénaïc Huard
Committed by
Jeff Lowdermilk
Apr 20, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make libvirt-coreos cluster use create-kubeconfig
parent
4f6dc990
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
14 deletions
+9
-14
common.sh
cluster/common.sh
+1
-1
kubectl.sh
cluster/kubectl.sh
+0
-5
util.sh
cluster/libvirt-coreos/util.sh
+8
-8
No files found.
cluster/common.sh
View file @
08f17bfa
...
...
@@ -46,7 +46,7 @@ function create-kubeconfig() {
touch
"
${
KUBECONFIG
}
"
fi
local
cluster_args
=(
"--server=
https://
${
KUBE_MASTER_IP
}
"
"--server=
${
KUBE_SERVER
:-
https
://
${
KUBE_MASTER_IP
}
}
"
)
if
[[
-z
"
${
CA_CERT
:-}
"
]]
;
then
cluster_args+
=(
"--insecure-skip-tls-verify=true"
)
...
...
cluster/kubectl.sh
View file @
08f17bfa
...
...
@@ -120,11 +120,6 @@ elif [[ "$KUBERNETES_PROVIDER" == "vagrant" ]]; then
config
=(
"--kubeconfig=
$HOME
/.kubernetes_vagrant_kubeconfig"
)
elif
[[
"
$KUBERNETES_PROVIDER
"
==
"libvirt-coreos"
]]
;
then
detect-master
>
/dev/null
config
=(
"--server=http://
${
KUBE_MASTER_IP
}
:8080"
)
fi
echo
"current-context:
\"
$(${
kubectl
}
"
${
config
[@]
:+
${
config
[@]
}}
"
config view
-o
template
--template
=
'{{index . "current-context"}}'
)
\"
"
>
&2
...
...
cluster/libvirt-coreos/util.sh
View file @
08f17bfa
...
...
@@ -18,7 +18,8 @@
KUBE_ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
/../..
readonly
ROOT
=
$(
dirname
"
${
BASH_SOURCE
}
"
)
source
$ROOT
/
${
KUBE_CONFIG_FILE
:-
"config-default.sh"
}
source
"
$ROOT
/
${
KUBE_CONFIG_FILE
:-
"config-default.sh"
}
"
source
"
$KUBE_ROOT
/cluster/common.sh"
export
LIBVIRT_DEFAULT_URI
=
qemu:///system
...
...
@@ -199,6 +200,7 @@ function wait-cluster-readiness {
function
kube-up
{
detect-master
detect-minions
get-password
initialize-pool keep_base_image
initialize-network
...
...
@@ -236,11 +238,9 @@ function kube-up {
done
export
KUBECONFIG
=
"
${
KUBECONFIG
:-${
HOME
}
/.kube/.kubeconfig
}
"
local
kubectl
=
"
${
KUBE_ROOT
}
/cluster/kubectl.sh"
"
${
kubectl
}
"
config set-cluster libvirt-coreos
--server
=
http://
${
KUBE_MASTER_IP
-
}
:8080
"
${
kubectl
}
"
config set-context libvirt-coreos
--cluster
=
libvirt-coreos
"
${
kubectl
}
"
config use-context libvirt-coreos
--cluster
=
libvirt-coreos
export
KUBE_SERVER
=
"http://192.168.10.1:8080"
export
CONTEXT
=
"libvirt-coreos"
create-kubeconfig
wait-cluster-readiness
...
...
@@ -331,8 +331,8 @@ function test-teardown {
# Set the {KUBE_USER} and {KUBE_PASSWORD} environment values required to interact with provider
function
get-password
{
export
KUBE_USER
=
core
e
cho
"TODO get-password"
export
KUBE_USER
=
''
e
xport
KUBE_PASSWORD
=
''
}
# SSH to a node by name or IP ($1) and run a command ($2).
...
...
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