Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions kube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Required environment variables:
* `GCP_PROJECT`: GCP project parameter for the sidecar
* `SIDECAR_IMAGE_TAG`: Version parameter for the sidecar

Optional environment variables:
* `SIDECAR_IMAGE_NAME`: Image name parameter for the sidecar (default:
gcr.io/stackdriver-prometheus/stackdriver-prometheus-sidecar)

If your cluster is not the default context:

```sh
Expand Down
5 changes: 4 additions & 1 deletion kube/patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,16 @@ if [ $# -le 1 ]; then
exit 1
fi

# Override to use a different Docker image name for the sidecar.
export SIDECAR_IMAGE_NAME=${SIDECAR_IMAGE_NAME:-'gcr.io/stackdriver-prometheus/stackdriver-prometheus-sidecar'}

kubectl -n "${KUBE_NAMESPACE}" patch "$1" "$2" --type strategic --patch "
spec:
template:
spec:
containers:
- name: sidecar
image: gcr.io/stackdriver-prometheus/stackdriver-prometheus-sidecar:${SIDECAR_IMAGE_TAG}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script is used in the public docs. We shouldn't change the API. Can you preserve the current value as a default value?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, moved it over to patch.sh.

image: ${SIDECAR_IMAGE_NAME}:${SIDECAR_IMAGE_TAG}
imagePullPolicy: Always
args:
- \"--stackdriver.project-id=${GCP_PROJECT}\"
Expand Down