summaryrefslogtreecommitdiff
path: root/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh
diff options
context:
space:
mode:
authorDirk Mueller <dirk@dmllr.de>2016-10-25 22:46:14 +0200
committerDirk Mueller <dirk@dmllr.de>2016-12-07 15:25:41 +0100
commit80fc5a2d42138c884894da212e923f96e6533ef0 (patch)
tree71bf83aa55bbaac04450deaddd4984917f0e51fe /magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh
parent73c5f6ea4fb513fbe508c5d91ef413d1a7ef640e (diff)
Add bashate checks to pep8 step
Similarly to pep8 checks, this allows enforcing a consistent style of the shell scripts accross modfications. For now only the indentation is enforced to reduce code churn. Closes-Bug: 1648099 Change-Id: Ie66cbe1aea4bd01a8bba8833ef6cbd2cff6a7c6a
Notes
Notes (review): Code-Review+2: Spyros Trigazis <strigazi@gmail.com> Code-Review+2: Adrian Otto <adrian.otto@rackspace.com> Workflow+1: Adrian Otto <adrian.otto@rackspace.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 07 Dec 2016 16:46:44 +0000 Reviewed-on: https://review.openstack.org/390668 Project: openstack/magnum Branch: refs/heads/master
Diffstat (limited to 'magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh')
-rw-r--r--magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh b/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh
index 22b4289..bc15c03 100644
--- a/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh
+++ b/magnum/drivers/common/templates/kubernetes/fragments/make-cert.sh
@@ -21,7 +21,7 @@ set -o nounset
21set -o pipefail 21set -o pipefail
22 22
23if [ "$TLS_DISABLED" == "True" ]; then 23if [ "$TLS_DISABLED" == "True" ]; then
24 exit 0 24 exit 0
25fi 25fi
26 26
27if [[ -z "${KUBE_NODE_PUBLIC_IP}" ]]; then 27if [[ -z "${KUBE_NODE_PUBLIC_IP}" ]]; then
@@ -33,11 +33,11 @@ fi
33 33
34sans="IP:${KUBE_NODE_PUBLIC_IP},IP:${KUBE_NODE_IP}" 34sans="IP:${KUBE_NODE_PUBLIC_IP},IP:${KUBE_NODE_IP}"
35if [ "${KUBE_NODE_PUBLIC_IP}" != "${KUBE_API_PUBLIC_ADDRESS}" ] \ 35if [ "${KUBE_NODE_PUBLIC_IP}" != "${KUBE_API_PUBLIC_ADDRESS}" ] \
36 && [ -n "${KUBE_API_PUBLIC_ADDRESS}" ]; then 36 && [ -n "${KUBE_API_PUBLIC_ADDRESS}" ]; then
37 sans="${sans},IP:${KUBE_API_PUBLIC_ADDRESS}" 37 sans="${sans},IP:${KUBE_API_PUBLIC_ADDRESS}"
38fi 38fi
39if [ "${KUBE_NODE_IP}" != "${KUBE_API_PRIVATE_ADDRESS}" ] \ 39if [ "${KUBE_NODE_IP}" != "${KUBE_API_PRIVATE_ADDRESS}" ] \
40 && [ -n "${KUBE_API_PRIVATE_ADDRESS}" ]; then 40 && [ -n "${KUBE_API_PRIVATE_ADDRESS}" ]; then
41 sans="${sans},IP:${KUBE_API_PRIVATE_ADDRESS}" 41 sans="${sans},IP:${KUBE_API_PRIVATE_ADDRESS}"
42fi 42fi
43MASTER_HOSTNAME=${MASTER_HOSTNAME:-} 43MASTER_HOSTNAME=${MASTER_HOSTNAME:-}
@@ -91,8 +91,8 @@ USER_TOKEN=`curl -k -s -i -X POST -H "$content_type" -d "$auth_json" $url \
91 91
92# Get CA certificate for this cluster 92# Get CA certificate for this cluster
93curl -k -X GET \ 93curl -k -X GET \
94 -H "X-Auth-Token: $USER_TOKEN" \ 94 -H "X-Auth-Token: $USER_TOKEN" \
95 $MAGNUM_URL/certificates/$CLUSTER_UUID | python -c 'import sys, json; print json.load(sys.stdin)["pem"]' > ${CA_CERT} 95 $MAGNUM_URL/certificates/$CLUSTER_UUID | python -c 'import sys, json; print json.load(sys.stdin)["pem"]' > ${CA_CERT}
96 96
97# Create config for server's csr 97# Create config for server's csr
98cat > ${cert_conf_dir}/server.conf <<EOF 98cat > ${cert_conf_dir}/server.conf <<EOF