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
646c22e4
Commit
646c22e4
authored
Feb 09, 2016
by
Greg Swallow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use local_ipv4 when public_ipv4 is not present.
parent
f36b604b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
make-ca-cert.sh
cluster/saltbase/salt/generate-cert/make-ca-cert.sh
+10
-1
No files found.
cluster/saltbase/salt/generate-cert/make-ca-cert.sh
View file @
646c22e4
...
...
@@ -33,7 +33,16 @@ if [ "$cert_ip" == "_use_gce_external_ip_" ]; then
fi
if
[
"
$cert_ip
"
==
"_use_aws_external_ip_"
]
;
then
cert_ip
=
$(
curl
-s
http://169.254.169.254/latest/meta-data/public-ipv4
)
# If there's no public IP assigned (e.g. this host is running on an internal subnet in a VPC), then
# curl will happily spit out the contents of AWS's 404 page and an exit code of zero.
#
# The string containing the 404 page trips up one of easyrsa's calls to openssl later; whichever
# one creates the CA certificate, because the 404 page is > 64 characters.
if
cert_ip
=
$(
curl
-f
-s
http://169.254.169.254/latest/meta-data/public-ipv4
)
;
then
:
else
cert_ip
=
$(
curl
-f
-s
http://169.254.169.254/latest/meta-data/local-ipv4
)
fi
fi
sans
=
"IP:
${
cert_ip
}
"
...
...
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