Open sonisaurabh19 opened 4 years ago
This is the configMap I am trying to update and add data to:
kind: ConfigMap apiVersion: v1 metadata: name: my-config-map data: users.json: |- [ { name: 'user-one', age: 10 } ]
I tried the following code, but it fails:
const addToConfig = { data: { "users.json": { name: 'user-two', age: 12 } } } await kubeclient.api.v1.namespaces('my-namespace').configmaps('my-config-map').patch({ body: addToConfig})
How can I use the API to update the configMap and append data to the users.json array?
users.json
This is the configMap I am trying to update and add data to:
I tried the following code, but it fails:
How can I use the API to update the configMap and append data to the
users.json
array?