pormetheus-operator禁用cadvisor-port的方式

目前kubelet已经默认禁用--cadvisor-port的配置,而且后续该配置也会完全移除,因此需要改变prometheus-operator的serviceMonitor,修改的方式如下:

原有的配置方式:

- port: http-metrics
    interval: 15s
- port: cadvisor
interval: 30s
honorLabels: true

修改后的配置方式:

- port: http-metrics
    interval: 15s
- port: http-metrics
path: /metrics/cadvisor
interval: 30s
honorLabels: true

参考的网址

https://github.com/coreos/prometheus-operator/issues/1400

https://github.com/coreos/prometheus-operator/issues/1741

https://github.com/coreos/prometheus-operator/issues/633