python icon indicating copy to clipboard operation
python copied to clipboard

Unclear Usage of V1ConfigMap

Open Annieharamad opened this issue 1 year ago • 2 comments

Link to the issue (please include a link to the specific documentation or example):

image

I'm looking for a way to practically "convert" into kubernetes-client code a ConfigMap yaml file and provide it to a V1PodSpec which feeds into V1Pod; However, I've haven't found a clear cut way to execute that, for the reason of unclear documentation and many objects of V1ConfigMapsEtc that are provided in the picture.

If someone can shed some light about how I can perform the following, or point me to some existing example.

An example config map yaml here

apiVersion: v1
kind: ConfigMap
metadata:
  name: game-demo
data:
  # property-like keys; each key maps to a simple value
  player_initial_lives: "3"
  ui_properties_file_name: "user-interface.properties"

  # file-like keys
  game.properties: |
    enemy.types=aliens,monsters
    player.maximum-lives=5    
  user-interface.properties: |
    color.good=purple
    color.bad=yellow
    allow.textmode=true    

Annieharamad avatar Aug 13 '24 12:08 Annieharamad

/help

roycaihw avatar Aug 14 '24 20:08 roycaihw

@roycaihw: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to this:

/help

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

k8s-ci-robot avatar Aug 14 '24 20:08 k8s-ci-robot