由于环境变量是map 数组,怎么给它添加元素呢,如何表达元素添加的路径呢,如下所示:
kubectl patch statfulset -nxxx --type json -p '[{"op":"add","path":"/spec/template/spec/containers/0/env/-","value":{"name":"xxxxx","value":"xxxxx"}}]'
参考:https://erosb.github.io/post/json-patch-vs-merge-patch/