Merge pull request #55715 from shyamjvs/fix-prom-to-sd-sidecar-in-metadata-proxy

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix prometheus-to-sd sidecar in metadata proxy

Ref https://github.com/kubernetes/kubernetes/issues/55695#issuecomment-344300188

This is making 2 changes:
- restoring resource requests and limits of the metadata-proxy sidecar as it was before, and remove them for prom-to-sd sidecar (best effort) like at everywhere else
- pass pod name and namespace args to prom-to-sd sidecar (because just noticed)

/cc @ihmccreery @loburm @crassirostris - Does this make sense?
pull/6/head
Kubernetes Submit Queue 2017-11-14 19:28:54 -08:00 committed by GitHub
commit f44608171a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 11 deletions

View File

@ -43,11 +43,11 @@ spec:
privileged: true
resources:
requests:
memory: "16Mi"
cpu: "15m"
memory: "32Mi"
cpu: "30m"
limits:
memory: "16Mi"
cpu: "15m"
memory: "32Mi"
cpu: "30m"
# BEGIN_PROMETHEUS_TO_SD
- name: prometheus-to-sd-exporter
image: gcr.io/google_containers/prometheus-to-sd:v0.2.2
@ -56,13 +56,17 @@ spec:
- --stackdriver-prefix={{ prometheus_to_sd_prefix }}/addons
- --api-override={{ prometheus_to_sd_endpoint }}
- --source=metadata_proxy:http://127.0.0.1:989?whitelisted=request_count
resources:
requests:
memory: "16Mi"
cpu: "15m"
limits:
memory: "16Mi"
cpu: "15m"
- --pod-id=$(POD_NAME)
- --namespace-id=$(POD_NAMESPACE)
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# END_PROMETHEUS_TO_SD
nodeSelector:
beta.kubernetes.io/metadata-proxy-ready: "true"