-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
What happened (please include outputs or screenshots):
Updating configmap with JSON in python programmatically. Using patch to update.
test3 = '{test1: "test1", test2: "test2"}'
objectMeta = client.V1ObjectMeta(name="configmap1", namespace="testns1")
body = client.V1ConfigMap(api_version="v1",kind='ConfigMap', metadata=objectMeta, data={"proxy": test3})
pretty = 'pretty_example'
retpatch = clientv1.patch_namespaced_config_map("configmap1", "testns1", body, pretty=pretty)
in my config map it shows as
data:
proxy: '{test1: "test1", test2: "test2"}'
because it is adding single quote. it is failing at mount end. And if I pass JSON object then I will get
What you expected to happen:
single quote should be removed from proxy json
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
- Kubernetes version (
kubectl version
): - OS (e.g., MacOS 10.13.6):
- Python version (
python --version
) - Python client version (
pip list | grep kubernetes
)
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.