The deployment file client.yaml in this chapter exercise has configmap mounted as volume. At the end of he client.yaml there is mention of name of volume as trusted-ca which has identation inside volumes.
There is another "name: trusted-ca" which is at same indentation level as volumes:
What is the purpose of this entry. I could run the deployment without this entry. Need to understand this entry. If anyone can explain. The deployment deploys the pod without this last line entry and with it as well for the client.yaml deployment file.
volumes: - configMap: defaultMode: 420 name: ca-bundle
items:
- key: service-ca.crt
path: tls-ca-bundle.pem
name: trusted-ca
name: trusted-ca <----------------------------------- "What is the purpose of this
name entry in client.yaml file ?"
You can get explanation by:
$ oc explain deployment.spec.template.spec.name
GROUP: apps
KIND: Deployment
VERSION: v1
error: field "name" does not exist
So "name: trusted-ca" in your example does not influent on created deployment. Why it appear in guide? I suppose it is typo.
Good lack
@Ravi_Shanker yes it is a typo. Thanks for reporting this - I will mark this for rectification.
You can get explanation by:
$ oc explain deployment.spec.template.spec.name
GROUP: apps
KIND: Deployment
VERSION: v1
error: field "name" does not exist
So "name: trusted-ca" in your example does not influent on created deployment. Why it appear in guide? I suppose it is typo.
Good lack
Thanks @shura for your detailed response. Got to learn something new about oc explain and how this can be leveraged to dig deeper on the subject.
I could use this in different cases like:
oc explain limitRange.spec.limits
to know complete fields for LimitRange from this documentation.
I think you are right about the wrong entry in lab exercise and will wait for further confirmation from Red Hat experts.
@Ravi_Shanker yes it is a typo. Thanks for reporting this - I will mark this for rectification.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.