--- apiVersion: v1 kind: ConfigMap metadata: name: prometheus data: prometheus.yml: |- global: scrape_interval: 15s scrape_configs: - job_name: 'mixer' # Override the global default and scrape targets from this job every 5 seconds. scrape_interval: 5s # metrics_path defaults to '/metrics' # scheme defaults to 'http'. static_configs: - targets: ['istio-mixer:42422'] --- apiVersion: v1 kind: Service metadata: annotations: prometheus.io/scrape: 'true' labels: name: prometheus name: prometheus spec: selector: app: prometheus ports: - name: prometheus protocol: TCP port: 9090 --- apiVersion: extensions/v1beta1 kind: Deployment metadata: name: prometheus spec: replicas: 1 selector: matchLabels: app: prometheus template: metadata: annotations: alpha.istio.io/sidecar: ignore name: prometheus labels: app: prometheus spec: containers: - name: prometheus image: harbor-001.jimmysong.io/library/prometheus:v1.1.1 args: - '-storage.local.retention=6h' - '-storage.local.memory-chunks=500000' - '-config.file=/etc/prometheus/prometheus.yml' ports: - name: web containerPort: 9090 volumeMounts: - name: config-volume mountPath: /etc/prometheus volumes: - name: config-volume configMap: name: prometheus ---