Skip to content

How do I add a configmap to the volume of a sidecar? #1130

Answered by SandraGH5
SandraGH5 asked this question in Q&A
Discussion options

You must be logged in to vote

katrina:
Just to double-check, are you generating the full pod spec similar to the example here

The protobuf objects in generated_pb2 are legacy and no longer the recommended way. It is better to simply use the k8s python client.

You need to specify them as a list - so change:

volume_mounts=V1VolumeMount(
            name="proxy-config",
            mount_path="/data",
        ),

to:

volume_mounts=[V1VolumeMount(
            name="proxy-config",
            mount_path="/data",
        )],

Also, volume definition might be wrong as well here

you want V1ConfigMapVolumeSource: https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ConfigMapVolumeSource.md

see: https://git…

Replies: 1 comment

Comment options

SandraGH5
Jun 11, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by kumare3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
flytekit FlyteKit Python related issue
1 participant