Add flags for prometheus-to-sd components.

Configure prometheus-to-sd-endpoint and prometheus-to-sd-prefix base on
the environment.
This commit is contained in:
Marian Lobur
2017-08-09 17:45:08 +02:00
parent 07dea6b447
commit d48e2d338d
8 changed files with 58 additions and 3 deletions

View File

@@ -63,12 +63,14 @@ spec:
- name: usr-ca-certs
mountPath: /usr/share/ca-certificates
readOnly: true
# BEGIN_PROMETHEUS_TO_SD
- name: prom-to-sd
image: gcr.io/google-containers/prometheus-to-sd:v0.2.1
command:
- /monitor
- --source=heapster:http://localhost:8082?whitelisted=stackdriver_requests_count,stackdriver_timeseries_count
- --stackdriver-prefix=container.googleapis.com/internal/addons
- --stackdriver-prefix={{ prometheus_to_sd_prefix }}/addons
- --api-override={{ prometheus_to_sd_endpoint }}
- --pod-id=$(POD_NAME)
- --namespace-id=$(POD_NAMESPACE)
volumeMounts:
@@ -83,6 +85,7 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# END_PROMETHEUS_TO_SD
- image: gcr.io/google_containers/addon-resizer:2.0
name: heapster-nanny
resources: