1 1. Day2 config to add a remote_write to existing config
3 Assuming initial/day0 config in namespace "edge1" and helm release name as "cp" (helm install -n cp collection/ --namespace=edge1)
5 Run below command to apply day2 config
7 kubectl patch --namespace=edge1 prometheus cp-prometheus-prometheus -p "$(cat add_remote_write.yaml)" --type=merge
9 2. Day2 config to remove remote_read and remote_write from existing config
11 Assuming initial/day0 config in namespace "edge1" and helm release name as "cp" (helm install -n cp collection/ --namespace=edge1)
13 Run below commands to apply day2 config
15 To remove remote_read -----> kubectl patch -n edge1 prometheus cp-prometheus-prometheus --type=json -p="$(cat remove_remote_read.json)"
16 To remove remote_write ----> kubectl patch -n edge1 prometheus cp-prometheus-prometheus --type=json -p="$(cat remove_remote_write.json)"