summaryrefslogtreecommitdiffstats
path: root/roles/openshift_logging/files
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-01-23 17:15:01 -0500
committerGitHub <noreply@github.com>2017-01-23 17:15:01 -0500
commit27271874f77a5ac32da199d689b88a82cb903f08 (patch)
treee0c802a5af8dc07f0a16b5d41ebea55de4a34d06 /roles/openshift_logging/files
parentc2bdcebcf9bc8aebba6d09a80c6b5cccdb17786d (diff)
parent066494438d5baff9f555cd56a8bde94df148dc31 (diff)
downloadopenshift-27271874f77a5ac32da199d689b88a82cb903f08.tar.gz
openshift-27271874f77a5ac32da199d689b88a82cb903f08.tar.bz2
openshift-27271874f77a5ac32da199d689b88a82cb903f08.tar.xz
openshift-27271874f77a5ac32da199d689b88a82cb903f08.zip
Merge pull request #3135 from ewolinetz/fix_logging_jks_gen
Updating to use local_action script to generate jks certs for logging
Diffstat (limited to 'roles/openshift_logging/files')
-rw-r--r--roles/openshift_logging/files/generate-jks.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/roles/openshift_logging/files/generate-jks.sh b/roles/openshift_logging/files/generate-jks.sh
index 995ec0b98..9fe557f83 100644
--- a/roles/openshift_logging/files/generate-jks.sh
+++ b/roles/openshift_logging/files/generate-jks.sh
@@ -1,6 +1,10 @@
#! /bin/sh
set -ex
+function usage() {
+ echo Usage: `basename $0` cert_directory [logging_namespace] 1>&2
+}
+
function generate_JKS_chain() {
dir=${SCRATCH_DIR:-_output}
ADD_OID=$1
@@ -147,8 +151,14 @@ function createTruststore() {
-noprompt -alias sig-ca
}
-dir="$CERT_DIR"
+if [ $# -lt 1 ]; then
+ usage
+ exit 1
+fi
+
+dir=$1
SCRATCH_DIR=$dir
+PROJECT=${2:-logging}
if [[ ! -f $dir/system.admin.jks || -z "$(keytool -list -keystore $dir/system.admin.jks -storepass kspass | grep sig-ca)" ]]; then
generate_JKS_client_cert "system.admin"