Skip to content

Commit

Permalink
docs: Fix TLS secret name ConfigMap update example (kserve#260)
Browse files Browse the repository at this point in the history
#### Motivation

The script snippet in our TLS docs for creating a configmap with the TLS secret name parameter included incorrect yaml which would not result in TLS being enabled. It should be:
```yaml
        data:
          config.yaml: |
            tls:
              secretName: ${SECRET_NAME}
```
instead of
```yaml
        data:
          config.yaml: |
            tls.secretName: ${SECRET_NAME}
```
#### Modification

- Fix the config yaml
- Change `kubectl apply` to `kubectl create` to avoid overwriting existing config
- Add `> ca.crt` to the cert retrieval command
- Replace `oc` with `kubectl` in Certificate CR example

#### Result

Correct docs.

Signed-off-by: Nick Hill <[email protected]>

Signed-off-by: Nick Hill <[email protected]>
  • Loading branch information
njhill authored Oct 12, 2022
1 parent f2c0b66 commit 10b5f8f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions docs/configuration/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ For basic TLS, only the fields `tls.crt` and `tls.key` are needed in the kube se

3. Create a `Certificate` CR

oc apply -f - <<EOF
kubectl apply -f - <<EOF
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand Down Expand Up @@ -107,16 +107,17 @@ For basic TLS, only the fields `tls.crt` and `tls.key` are needed in the kube se

**Example:**

kubectl apply -f - <<EOF
kubectl create -f - <<EOF
apiVersion: v1
kind: ConfigMap
metadata:
name: model-serving-config
data:
config.yaml: |
tls.secretName: ${SECRET_NAME}
tls:
secretName: ${SECRET_NAME}
EOF

6. Retrieve the `ca.crt` (to be used in clients)

kubectl get secret ${SECRET_NAME} -o jsonpath="{.data.ca\.crt}"
kubectl get secret ${SECRET_NAME} -o jsonpath="{.data.ca\.crt}" > ca.crt

0 comments on commit 10b5f8f

Please sign in to comment.