Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kubespray
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
Kubespray
Commits
2ee88984
Commit
2ee88984
authored
8 years ago
by
Matthew Mosesohn
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #900 from galthaus/cn-length
Cert fail if inventory names too long
parents
2a61ad1b
95bf380d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
roles/etcd/files/make-ssl-etcd.sh
+5
-3
5 additions, 3 deletions
roles/etcd/files/make-ssl-etcd.sh
roles/kubernetes/secrets/files/make-ssl.sh
+4
-2
4 additions, 2 deletions
roles/kubernetes/secrets/files/make-ssl.sh
with
9 additions
and
5 deletions
roles/etcd/files/make-ssl-etcd.sh
+
5
−
3
View file @
2ee88984
...
...
@@ -71,14 +71,15 @@ fi
# ETCD member
if
[
-n
"
$MASTERS
"
]
;
then
for
host
in
$MASTERS
;
do
cn
=
"
${
host
%%.*
}
"
# Member key
openssl genrsa
-out
member-
${
host
}
-key
.pem 2048
>
/dev/null 2>&1
openssl req
-new
-key
member-
${
host
}
-key
.pem
-out
member-
${
host
}
.csr
-subj
"/CN=etcd-member-
${
host
}
"
-config
${
CONFIG
}
>
/dev/null 2>&1
openssl req
-new
-key
member-
${
host
}
-key
.pem
-out
member-
${
host
}
.csr
-subj
"/CN=etcd-member-
${
cn
}
"
-config
${
CONFIG
}
>
/dev/null 2>&1
openssl x509
-req
-in
member-
${
host
}
.csr
-CA
ca.pem
-CAkey
ca-key.pem
-CAcreateserial
-out
member-
${
host
}
.pem
-days
365
-extensions
ssl_client
-extfile
${
CONFIG
}
>
/dev/null 2>&1
# Admin key
openssl genrsa
-out
admin-
${
host
}
-key
.pem 2048
>
/dev/null 2>&1
openssl req
-new
-key
admin-
${
host
}
-key
.pem
-out
admin-
${
host
}
.csr
-subj
"/CN=etcd-admin-
${
host
}
"
>
/dev/null 2>&1
openssl req
-new
-key
admin-
${
host
}
-key
.pem
-out
admin-
${
host
}
.csr
-subj
"/CN=etcd-admin-
${
cn
}
"
>
/dev/null 2>&1
openssl x509
-req
-in
admin-
${
host
}
.csr
-CA
ca.pem
-CAkey
ca-key.pem
-CAcreateserial
-out
admin-
${
host
}
.pem
-days
365
-extensions
ssl_client
-extfile
${
CONFIG
}
>
/dev/null 2>&1
done
fi
...
...
@@ -86,8 +87,9 @@ fi
# Node keys
if
[
-n
"
$HOSTS
"
]
;
then
for
host
in
$HOSTS
;
do
cn
=
"
${
host
%%.*
}
"
openssl genrsa
-out
node-
${
host
}
-key
.pem 2048
>
/dev/null 2>&1
openssl req
-new
-key
node-
${
host
}
-key
.pem
-out
node-
${
host
}
.csr
-subj
"/CN=etcd-node-
${
host
}
"
>
/dev/null 2>&1
openssl req
-new
-key
node-
${
host
}
-key
.pem
-out
node-
${
host
}
.csr
-subj
"/CN=etcd-node-
${
cn
}
"
>
/dev/null 2>&1
openssl x509
-req
-in
node-
${
host
}
.csr
-CA
ca.pem
-CAkey
ca-key.pem
-CAcreateserial
-out
node-
${
host
}
.pem
-days
365
-extensions
ssl_client
-extfile
${
CONFIG
}
>
/dev/null 2>&1
done
fi
...
...
This diff is collapsed.
Click to expand it.
roles/kubernetes/secrets/files/make-ssl.sh
+
4
−
2
View file @
2ee88984
...
...
@@ -82,9 +82,10 @@ fi
if
[
-n
"
$MASTERS
"
]
;
then
for
host
in
$MASTERS
;
do
cn
=
"
${
host
%%.*
}
"
# admin key
openssl genrsa
-out
admin-
${
host
}
-key
.pem 2048
>
/dev/null 2>&1
openssl req
-new
-key
admin-
${
host
}
-key
.pem
-out
admin-
${
host
}
.csr
-subj
"/CN=kube-admin-
${
host
}
"
>
/dev/null 2>&1
openssl req
-new
-key
admin-
${
host
}
-key
.pem
-out
admin-
${
host
}
.csr
-subj
"/CN=kube-admin-
${
cn
}
"
>
/dev/null 2>&1
openssl x509
-req
-in
admin-
${
host
}
.csr
-CA
ca.pem
-CAkey
ca-key.pem
-CAcreateserial
-out
admin-
${
host
}
.pem
-days
365
>
/dev/null 2>&1
done
fi
...
...
@@ -92,9 +93,10 @@ fi
# Nodes and Admin
if
[
-n
"
$HOSTS
"
]
;
then
for
host
in
$HOSTS
;
do
cn
=
"
${
host
%%.*
}
"
# node key
openssl genrsa
-out
node-
${
host
}
-key
.pem 2048
>
/dev/null 2>&1
openssl req
-new
-key
node-
${
host
}
-key
.pem
-out
node-
${
host
}
.csr
-subj
"/CN=kube-node-
${
host
}
"
>
/dev/null 2>&1
openssl req
-new
-key
node-
${
host
}
-key
.pem
-out
node-
${
host
}
.csr
-subj
"/CN=kube-node-
${
cn
}
"
>
/dev/null 2>&1
openssl x509
-req
-in
node-
${
host
}
.csr
-CA
ca.pem
-CAkey
ca-key.pem
-CAcreateserial
-out
node-
${
host
}
.pem
-days
365
>
/dev/null 2>&1
done
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment