cancel
Showing results for 
Search instead for 
Did you mean: 
Ravi_Shanker
Flight Engineer
Flight Engineer
  • 402 Views

configmap mounted as volume doubt in client.yaml in chapter04 slide06 labs

Jump to solution

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 ?"

 

Certification ID: 111-010-393
Labels (1)
2 Solutions

Accepted Solutions
shura
Flight Engineer
Flight Engineer
  • 378 Views

Hi @Ravi_Shanker 

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

View solution in original post

Chetan_Tiwary_
Community Manager
Community Manager
  • 345 Views

@Ravi_Shanker yes it is a typo. Thanks for reporting this - I will mark this for rectification.

View solution in original post

3 Replies
shura
Flight Engineer
Flight Engineer
  • 379 Views

Hi @Ravi_Shanker 

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
Flight Engineer
Flight Engineer
  • 364 Views

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. 

Certification ID: 111-010-393
Chetan_Tiwary_
Community Manager
Community Manager
  • 346 Views

@Ravi_Shanker yes it is a typo. Thanks for reporting this - I will mark this for rectification.

Join the discussion
You must log in to join this conversation.