Skip to content

Commit 5b17e6a

Browse files
authored
Merge pull request #98933 from dfitzmau/OSDOCS-14767
OSDOCS-14767: Expanded steps on customize-certificates-add-service-se…
2 parents 7e7f737 + 4401197 commit 5b17e6a

File tree

2 files changed

+42
-23
lines changed

2 files changed

+42
-23
lines changed

modules/customize-certificates-add-service-serving-configmap.adoc

Lines changed: 38 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,16 @@
66
[id="add-service-certificate-configmap_{context}"]
77
= Add the service CA bundle to a config map
88

9-
A pod can access the service CA certificate by mounting a `ConfigMap` object that
10-
is annotated with `service.beta.openshift.io/inject-cabundle=true`.
11-
Once annotated, the cluster automatically injects the service CA
12-
certificate into the `service-ca.crt` key on the config map. Access to
13-
this CA certificate allows TLS clients to verify connections to
14-
services using service serving certificates.
9+
A pod can access the service Certificate Authority (CA) certificate by mounting a `ConfigMap` object that has the `service.beta.openshift.io/inject-cabundle=true` annotation. After annotating the config map, the cluster automatically injects the service CA certificate into the `service-ca.crt` key on the config map. Access to this CA certificate allows TLS clients to verify connections to services by using service serving certificates.
1510

1611
[IMPORTANT]
1712
====
18-
After adding this annotation to a config map all existing data in it is
19-
deleted. It is recommended to use a separate config map to contain the
20-
`service-ca.crt`, instead of using the same config map that stores your
21-
pod configuration.
13+
After adding this annotation to a config map, the OpenShift Service CA Operator deletes all the data in the config map. Consider using a separate config map to contain the `service-ca.crt`, instead of using the same config map that stores your pod configuration.
2214
====
2315

2416
.Procedure
2517

26-
. Annotate the config map with `service.beta.openshift.io/inject-cabundle=true`:
18+
. Annotate the config map with the `service.beta.openshift.io/inject-cabundle=true` annotation by entering the following command:
2719
+
2820
[source,terminal]
2921
----
@@ -34,15 +26,8 @@ $ oc annotate configmap <config_map_name> \//<1>
3426
+
3527
[NOTE]
3628
====
37-
Explicitly referencing the `service-ca.crt` key in a volume mount will prevent a pod from starting until the config map has been injected with the CA bundle. This behavior can be overridden by setting the `optional` field to `true` for the volume's serving certificate configuration.
29+
Explicitly referencing the `service-ca.crt` key in a volume mount prevents a pod from starting until the config map has been injected with the CA bundle. You can override this behavior by setting the `optional` parameter to `true` in the serving certificate configuration of the volume.
3830
====
39-
+
40-
For example, use the following command to annotate the config map `test1`:
41-
+
42-
[source,terminal]
43-
----
44-
$ oc annotate configmap test1 service.beta.openshift.io/inject-cabundle=true
45-
----
4631

4732
. View the config map to ensure that the service CA bundle has been injected:
4833
+
@@ -61,3 +46,37 @@ data:
6146
-----BEGIN CERTIFICATE-----
6247
...
6348
----
49+
50+
. Mount the config map as a volume to each container that exists in a pod by configuring your `Deployment` object.
51+
+
52+
.Example Deployment object that defines the volume for the mounted config map
53+
[source,yaml]
54+
----
55+
apiVersion: apps/v1
56+
kind: Deployment
57+
metadata:
58+
name: my-example-custom-ca-deployment
59+
namespace: my-example-custom-ca-ns
60+
spec:
61+
...
62+
spec:
63+
...
64+
containers:
65+
- name: my-container-that-needs-custom-ca
66+
volumeMounts:
67+
- name: trusted-ca
68+
mountPath: /etc/pki/ca-trust/extracted/pem
69+
readOnly: true
70+
volumes:
71+
- name: trusted-ca
72+
configMap:
73+
name: <config_map_name> <1>
74+
items:
75+
- key: ca-bundle.crt <2>
76+
path: tls-ca-bundle.pem <3>
77+
# ...
78+
----
79+
<1> Specify the name of the config map that you annotated in an earlier step of the procedure.
80+
<2> `ca-bundle.crt` is required as the ConfigMap key.
81+
<3> `tls-ca-bundle.pem` is required as the ConfigMap path.
82+

modules/nw-proxy-configure-object.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ After you enable the cluster-wide proxy capability for your cluster and you save
3535

3636
.Prerequisites
3737

38-
* Cluster administrator permissions
39-
* {product-title} `oc` CLI tool installed
38+
* You have cluster administrator permissions.
39+
* You installed the {product-title} `oc` CLI tool.
4040
4141
.Procedure
4242

@@ -46,7 +46,7 @@ After you enable the cluster-wide proxy capability for your cluster and you save
4646
====
4747
You can skip this step if the identity certificate of the proxy is signed by an authority from the {op-system-first} trust bundle.
4848
====
49-
49+
+
5050
.. Create a file called `user-ca-bundle.yaml`, and provide the values of your PEM-encoded certificates:
5151
+
5252
[source,yaml]
@@ -65,7 +65,7 @@ metadata:
6565
identity certificate.
6666
<3> The config map name that is referenced from the `Proxy` object.
6767
<4> The config map must exist in the `openshift-config` namespace.
68-
68+
+
6969
.. Create the config map from the `user-ca-bundle.yaml` file by entering the following command:
7070
+
7171
[source,terminal]

0 commit comments

Comments
 (0)