-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[GH#87271] Add information about the openshift-service-ca.crt ConfigMap #87272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // * security/certificates/service-serving-certificate.adoc | ||
|
|
||
| :_mod-docs-content-type: PROCEDURE | ||
| [id="access-default-service-serving-configmap_{context}"] | ||
| = Access the service CA bundle in the default config map | ||
|
|
||
| A pod can access the service CA certificate by mounting the default | ||
| `ConfigMap` object that exists in every namespace (project). The service CA | ||
| certificate is in the `service-ca.crt` key of the `openshift-service-ca.crt` | ||
| config map. Access to this CA certificate allows TLS clients to verify | ||
| connections to services using service serving certificates. | ||
|
|
||
| .Procedure | ||
|
|
||
| . View the default config map: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| $ oc get configmap openshift-service-ca.crt -o yaml | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably needs a namespace set here?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, in the context of mounting that configmap it would be necessary to use a specific namespace. If you don't specify any, it returns the one on the default namespace / current project, so it works, but we can't be sure, that this is from the current project.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As the configmap is in every namespace, I didn't include the namespace argument here. |
||
| ---- | ||
| + | ||
| The CA bundle is displayed as the value of the `service-ca.crt` key in the YAML output: | ||
| + | ||
| [source,terminal] | ||
| ---- | ||
| apiVersion: v1 | ||
| data: | ||
| service-ca.crt: | | ||
| -----BEGIN CERTIFICATE----- | ||
| ... | ||
| ---- | ||
|
|
||
| . Mount the config map as a volume to each container that exists in a pod by configuring your `Deployment` object. | ||
| + | ||
| .Example Deployment object that defines the volume for the mounted config map | ||
| [source,yaml] | ||
| ---- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: my-example-custom-ca-deployment | ||
| namespace: my-example-custom-ca-ns | ||
| spec: | ||
| ... | ||
| spec: | ||
| ... | ||
| containers: | ||
| - name: my-container-that-needs-custom-ca | ||
| volumeMounts: | ||
| - name: trusted-ca | ||
| mountPath: /etc/pki/ca-trust/extracted/pem | ||
| readOnly: true | ||
| volumes: | ||
| - name: trusted-ca | ||
| configMap: | ||
| name: openshift-service-ca.crt <1> | ||
| items: | ||
| - key: ca-bundle.crt <2> | ||
| path: tls-ca-bundle.pem <3> | ||
| # ... | ||
| ---- | ||
| <1> `openshift-service-ca.crt` is the name of the default config map. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🤖 [error] AsciiDocDITA.CalloutList: Callouts are not supported in DITA. |
||
| <2> `ca-bundle.crt` is required as the ConfigMap key. | ||
| <3> `tls-ca-bundle.pem` is required as the ConfigMap path. | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 [error] AsciiDocDITA.ShortDescription: Assign [role="_abstract"] to a paragraph to use it as in DITA.