|
13 | 13 | #
|
14 | 14 | # The sytax of the script is:
|
15 | 15 | #
|
16 |
| -# kubernetes/samples/scripts/rest/generate-external-rest-identity.sh <SANs> -n <namespace> |
| 16 | +# kubernetes/samples/scripts/rest/generate-external-rest-identity.sh -a <SANs> -n <namespace> |
17 | 17 | #
|
18 | 18 | # Where <SANs> lists the subject alternative names to put into the generated self-signed
|
19 | 19 | # certificate for the external WebLogic Operator REST https interface, for example:
|
20 | 20 | #
|
21 |
| -# DNS:myhost,DNS:localhost,IP:127.0.0.1 -n weblogic-operator |
| 21 | +# DNS:myhost,DNS:localhost,IP:127.0.0.1 |
22 | 22 | #
|
23 | 23 | # You should include the addresses of all masters and load balancers in this list. The certificate
|
24 | 24 | # cannot be conveniently changed after installation of the operator.
|
|
27 | 27 | # certificate and private key
|
28 | 28 | #
|
29 | 29 | # Example usage:
|
30 |
| -# generate-external-rest-identity.sh IP:127.0.0.1 -n weblogic-operator > my_values.yaml |
| 30 | +# generate-external-rest-identity.sh -a IP:127.0.0.1 -n weblogic-operator > my_values.yaml |
31 | 31 | # echo "externalRestEnabled: true" >> my_values.yaml
|
32 | 32 | # ...
|
33 | 33 | # helm install kubernetes/charts/weblogic-operator --name my_operator --namespace my_operator-ns --values my_values.yaml --wait
|
34 | 34 | usage(){
|
35 | 35 | cat <<EOF
|
36 |
| -Usage: $0 [options] <subject alternative names> <-n namespace> |
| 36 | +Usage: $0 [options] -a <subject alternative names> -n <namespace> |
37 | 37 | Options:
|
38 |
| - --subject-alternative-name SANS Required, the SANs for the certificate |
39 |
| --n, --namespace NAMESPACE Required, the namespace where the secret will be created. |
40 |
| --s, --secret-name SECRET_NAME Optional, the name of the kubernetes secret. Default is: |
41 |
| - weblogic-operator-external-rest-identity. |
42 |
| --h, --help Display this help text. |
| 38 | +-a SANS Required, the SANs for the certificate |
| 39 | +-n NAMESPACE Required, the namespace where the secret will be created. |
| 40 | +-s SECRET_NAME Optional, the name of the kubernetes secret. Default is: weblogic-operator-external-rest-identity. |
| 41 | +-h, --help Display this help text. |
43 | 42 | EOF
|
44 | 43 | exit 1
|
45 | 44 | }
|
@@ -88,25 +87,25 @@ while [ $# -gt 0 ]
|
88 | 87 | do
|
89 | 88 | key="$1"
|
90 | 89 | case $key in
|
91 |
| - --subject-alternative-name) |
| 90 | + -a) |
92 | 91 | shift # past argument
|
93 | 92 | if [ $# -eq 0 ] || [ ${1:0:1} == "-" ]; then echo "SANs is required and is missing"; usage; fi
|
94 | 93 | SANS=$1
|
95 | 94 | shift # past value
|
96 | 95 | ;;
|
97 |
| - -n|--namespace) |
| 96 | + -n) |
98 | 97 | shift # past argument
|
99 | 98 | if [ $# -eq 0 ] || [ ${1:0:1} == "-" ]; then echo "Namespace is required and is missing"; usage; fi
|
100 | 99 | NAMESPACE=$1
|
101 | 100 | shift # past value
|
102 | 101 | ;;
|
103 |
| - -s|--secret-name) |
| 102 | + -s) |
104 | 103 | shift # past argument
|
105 | 104 | if [ $# -eq 0 ] || [ ${1:0:1} == "-" ]; then echo "Invalid secret name $1"; usage; fi
|
106 | 105 | SECRET_NAME=$1
|
107 | 106 | shift # past value
|
108 | 107 | ;;
|
109 |
| - -h|--help) |
| 108 | + -h) |
110 | 109 | shift # past argument
|
111 | 110 | ;;
|
112 | 111 | *)
|
|
0 commit comments