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
7b745e00
Commit
7b745e00
authored
Nov 10, 2017
by
Marcin Owsiany
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Review comments addressed.
parent
9c5a0587
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
15 deletions
+34
-15
common.sh
cluster/common.sh
+34
-15
No files found.
cluster/common.sh
View file @
7b745e00
...
@@ -1091,16 +1091,26 @@ function generate-certs {
...
@@ -1091,16 +1091,26 @@ function generate-certs {
--req-cn
=
kubecfg
--req-org
=
system:masters
\
--req-cn
=
kubecfg
--req-org
=
system:masters
\
--req-c
=
--req-st
=
--req-city
=
--req-email
=
--req-ou
=
\
--req-c
=
--req-st
=
--req-city
=
--req-email
=
--req-ou
=
\
build-client-full kubecfg nopass
)
&>
${
cert_create_debug_output
}
||
true
build-client-full kubecfg nopass
)
&>
${
cert_create_debug_output
}
||
true
if
[
!
-s
"
${
CERT_DIR
}
/pki/private/ca.key"
\
local
output_file_missing
=
0
-o
!
-s
"
${
CERT_DIR
}
/pki/ca.crt"
\
local
output_file
-o
!
-s
"
${
CERT_DIR
}
/pki/issued/
${
MASTER_NAME
}
.crt"
\
for
output_file
in
\
-o
!
-s
"
${
CERT_DIR
}
/pki/private/
${
MASTER_NAME
}
.key"
\
"
${
CERT_DIR
}
/pki/private/ca.key"
\
-o
!
-s
"
${
CERT_DIR
}
/pki/issued/kubelet.crt"
\
"
${
CERT_DIR
}
/pki/ca.crt"
\
-o
!
-s
"
${
CERT_DIR
}
/pki/private/kubelet.key"
\
"
${
CERT_DIR
}
/pki/issued/
${
MASTER_NAME
}
.crt"
\
-o
!
-s
"
${
CERT_DIR
}
/pki/issued/kubecfg.crt"
\
"
${
CERT_DIR
}
/pki/private/
${
MASTER_NAME
}
.key"
\
-o
!
-s
"
${
CERT_DIR
}
/pki/private/kubecfg.key"
\
"
${
CERT_DIR
}
/pki/issued/kubelet.crt"
\
-o
!
-s
"
${
CERT_DIR
}
/pki/issued/kube-apiserver.crt"
\
"
${
CERT_DIR
}
/pki/private/kubelet.key"
\
-o
!
-s
"
${
CERT_DIR
}
/pki/private/kube-apiserver.key"
]
;
then
"
${
CERT_DIR
}
/pki/issued/kubecfg.crt"
\
"
${
CERT_DIR
}
/pki/private/kubecfg.key"
\
"
${
CERT_DIR
}
/pki/issued/kube-apiserver.crt"
\
"
${
CERT_DIR
}
/pki/private/kube-apiserver.key"
do
if
[[
!
-s
"
${
output_file
}
"
]]
;
then
echo
"Expected file
${
output_file
}
not created"
>
&2
output_file_missing
=
1
fi
done
if
((
$output_file_missing
))
;
then
# TODO(roberthbailey,porridge): add better error handling here,
# TODO(roberthbailey,porridge): add better error handling here,
# see https://github.com/kubernetes/kubernetes/issues/55229
# see https://github.com/kubernetes/kubernetes/issues/55229
cat
"
${
cert_create_debug_output
}
"
>
&2
cat
"
${
cert_create_debug_output
}
"
>
&2
...
@@ -1146,11 +1156,20 @@ function generate-aggregator-certs {
...
@@ -1146,11 +1156,20 @@ function generate-aggregator-certs {
--req-cn
=
proxy-clientcfg
--req-org
=
system:aggregator
\
--req-cn
=
proxy-clientcfg
--req-org
=
system:aggregator
\
--req-c
=
--req-st
=
--req-city
=
--req-email
=
--req-ou
=
\
--req-c
=
--req-st
=
--req-city
=
--req-email
=
--req-ou
=
\
build-client-full proxy-clientcfg nopass
)
&>
${
cert_create_debug_output
}
||
true
build-client-full proxy-clientcfg nopass
)
&>
${
cert_create_debug_output
}
||
true
local
output_file_missing
=
0
if
[
!
-s
"
${
AGGREGATOR_CERT_DIR
}
/pki/private/ca.key"
\
local
output_file
-o
!
-s
"
${
AGGREGATOR_CERT_DIR
}
/pki/ca.crt"
\
for
output_file
in
\
-o
!
-s
"
${
AGGREGATOR_CERT_DIR
}
/pki/issued/proxy-client.crt"
\
"
${
AGGREGATOR_CERT_DIR
}
/pki/private/ca.key"
\
-o
!
-s
"
${
AGGREGATOR_CERT_DIR
}
/pki/private/proxy-client.key"
]
;
then
"
${
AGGREGATOR_CERT_DIR
}
/pki/ca.crt"
\
"
${
AGGREGATOR_CERT_DIR
}
/pki/issued/proxy-client.crt"
\
"
${
AGGREGATOR_CERT_DIR
}
/pki/private/proxy-client.key"
do
if
[[
!
-s
"
${
output_file
}
"
]]
;
then
echo
"Expected file
${
output_file
}
not created"
>
&2
output_file_missing
=
1
fi
done
if
((
$output_file_missing
))
;
then
# TODO(roberthbailey,porridge): add better error handling here,
# TODO(roberthbailey,porridge): add better error handling here,
# see https://github.com/kubernetes/kubernetes/issues/55229
# see https://github.com/kubernetes/kubernetes/issues/55229
cat
"
${
cert_create_debug_output
}
"
>
&2
cat
"
${
cert_create_debug_output
}
"
>
&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