<@UCZ0LS7NZ> function in `transformation` receives...
# general
d
@full-dress-10026 function in
transformation
receives given yaml string already parsed to JS object. given your yaml string, it should look like this:
Copy code
{
  "apiVersion": "v1",
  "kind": "ConfigMap",
  "metadata": {
    "name": "honeycomb-agent-config",
    "namespace": "default"
  },
  "data": {
    "config.yaml": "# By default, submit logs from interesting system pods such as the\n# kube DNS\nwatchers:\n  - dataset: kubernetes-logs\n    labelSelector: \"k8s-app=aws-node\"\n    namespace: kube-system\n    parser: glog\n  - dataset: kubernetes-logs\n    labelSelector: \"k8s-app=kube-proxy\"\n    namespace: kube-system\n    parser: glog\n  - dataset: kubernetes-logs\n    labelSelector: \"k8s-app=kube-dns\"\n    namespace: kube-system\n    parser: glog\nverbosity: info\n# splitLogging directs trace, debug, info, and warn log levels to stdout\n# rather than stderr.\nsplitLogging: false"
  }
}
therefore, you need to
JSON.parse(manifest.data["config.yaml"])
, modify the object as you need, and
JSON.stringify()
it back to
manifest.data["config.yaml"]