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
8fefc4ff
Commit
8fefc4ff
authored
Dec 08, 2016
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use cfssl in Docker, but directly
parent
f8dd91fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
local-up-cluster.sh
hack/local-up-cluster.sh
+14
-4
No files found.
hack/local-up-cluster.sh
View file @
8fefc4ff
...
@@ -147,6 +147,14 @@ function test_docker {
...
@@ -147,6 +147,14 @@ function test_docker {
fi
fi
}
}
function
test_cfssl_installed
{
if
!
command
-v
cfssl &>/dev/null
||
!
command
-v
cfssljson &>/dev/null
;
then
echo
"Failed to successfully run 'cfssl', please verify that cfssl and cfssljson are in
\$
PATH."
echo
"Hint: export PATH=
\$
PATH:
\$
GOPATH/bin; go get -u github.com/cloudflare/cfssl/cmd/..."
exit
1
fi
}
function
test_rkt
{
function
test_rkt
{
if
[[
-n
"
${
RKT_PATH
}
"
]]
;
then
if
[[
-n
"
${
RKT_PATH
}
"
]]
;
then
${
RKT_PATH
}
list 2> /dev/null 1> /dev/null
${
RKT_PATH
}
list 2> /dev/null 1> /dev/null
...
@@ -359,11 +367,12 @@ function create_client_certkey {
...
@@ -359,11 +367,12 @@ function create_client_certkey {
SEP
=
","
SEP
=
","
shift
1
shift
1
done
done
echo
"{
\"
CN
\"
:
\"
${
CN
}
\"
,
\"
names
\"
:[
${
NAMES
}
],
\"
hosts
\"
:[
\"\"
],
\"
key
\"
:{
\"
algo
\"
:
\"
rsa
\"
,
\"
size
\"
:2048}}"
| docker run
-i
--entrypoint
/bin/bash
-v
"
${
CERT_DIR
}
:/certs"
-w
/certs cfssl/cfssl:latest
-ec
"cfssl gencert -ca=
${
CA
}
.crt -ca-key=
${
CA
}
.key -config=client-ca-config.json - | cfssljson -bare client-
${
ID
}
"
${
CONTROLPLANE_SUDO
}
/bin/bash
-e
<<
EOF
${
CONTROLPLANE_SUDO
}
/bin/bash
-e
<<
EOF
mv "
${
CERT_DIR
}
/client-
${
ID
}
-key.pem" "
${
CERT_DIR
}
/client-
${
ID
}
.key"
cd
${
CERT_DIR
}
mv "
${
CERT_DIR
}
/client-
${
ID
}
.pem" "
${
CERT_DIR
}
/client-
${
ID
}
.crt"
echo '{"CN":"
${
CN
}
","names":[
${
NAMES
}
],"hosts":[""],"key":{"algo":"rsa","size":2048}}' | cfssl gencert -ca=
${
CA
}
.crt -ca-key=
${
CA
}
.key -config=client-ca-config.json - | cfssljson -bare client-
${
ID
}
rm -f "
${
CERT_DIR
}
/client-
${
ID
}
.csr"
mv "client-
${
ID
}
-key.pem" "client-
${
ID
}
.key"
mv "client-
${
ID
}
.pem" "client-
${
ID
}
.crt"
rm -f "client-
${
ID
}
.csr"
EOF
EOF
}
}
...
@@ -796,6 +805,7 @@ if [[ "${START_MODE}" != "kubeletonly" ]]; then
...
@@ -796,6 +805,7 @@ if [[ "${START_MODE}" != "kubeletonly" ]]; then
fi
fi
test_openssl_installed
test_openssl_installed
test_cfssl_installed
### IF the user didn't supply an output/ for the build... Then we detect.
### IF the user didn't supply an output/ for the build... Then we detect.
if
[
"
$GO_OUT
"
==
""
]
;
then
if
[
"
$GO_OUT
"
==
""
]
;
then
...
...
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