kubernetes-client/python

Unclear Usage of V1ConfigMap

Open

#2.263 aberto em 13 de ago. de 2024

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)Python (3.323 forks)batch import
help wantedkind/support

Métricas do repositório

Stars
 (6.225 stars)
Métricas de merge de PR
 (Mesclagem média 10d 3h) (2 fundiu PRs em 30d)

Description

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    

Guia do colaborador