mirror of https://github.com/knative/docs.git
Guard script fix - for 1.9 (#5394)
* identation and order fix Signed-off-by: David Hadas <david.hadas@gmail.com> * identation and order fix Signed-off-by: David Hadas <david.hadas@gmail.com> Signed-off-by: David Hadas <david.hadas@gmail.com>
This commit is contained in:
parent
98b4e656e4
commit
76d16efee9
|
@ -164,10 +164,33 @@ It is recommended to secure the communication between queue-proxy with the `guar
|
|||
Example script to install Security-Guard with TLS and Serving with Kourier using the Knative Operator.
|
||||
|
||||
```
|
||||
kubectl apply --filename - <<EOF
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: knative-serving
|
||||
---
|
||||
apiVersion: operator.knative.dev/v1beta1
|
||||
kind: KnativeServing
|
||||
metadata:
|
||||
name: knative-serving
|
||||
namespace: knative-serving
|
||||
EOF
|
||||
|
||||
echo "Waiting for secret to be created (CTRL-C to exit)"
|
||||
while [[ -z $PEM ]]
|
||||
do
|
||||
echo -n "."
|
||||
sleep 1
|
||||
DOC=`kubectl get secret -n knative-serving knative-serving-certs -o json 2> /dev/null`
|
||||
PEM=`echo $DOC | jq -r '.data."ca-cert.pem"'`
|
||||
done
|
||||
echo " Secret found!"
|
||||
|
||||
echo "Copy the certificate to file"
|
||||
ROOTCA="$(mktemp)"
|
||||
FILENAME=`basename $ROOTCA`
|
||||
kubectl get secret -n knative-serving knative-serving-certs -o json| jq -r '.data."ca-cert.pem"' | base64 -d > $ROOTCA
|
||||
echo $PEM | base64 -d > $ROOTCA
|
||||
|
||||
echo "Create a temporary config-deployment configmap with the certificate"
|
||||
CERT=`kubectl create cm config-deployment --from-file $ROOTCA -o json --dry-run=client |jq .data.\"$FILENAME\"`
|
||||
|
@ -176,11 +199,6 @@ It is recommended to secure the communication between queue-proxy with the `guar
|
|||
rm $ROOTCA
|
||||
|
||||
kubectl apply --filename - <<EOF
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: knative-serving
|
||||
---
|
||||
apiVersion: operator.knative.dev/v1beta1
|
||||
kind: KnativeServing
|
||||
metadata:
|
||||
|
|
Loading…
Reference in New Issue