mirror of
https://github.com/prometheus-operator/prometheus-operator.git
synced 2025-04-21 03:38:43 +00:00
configure aws region
This commit is contained in:
parent
73904be8b8
commit
7cea27a6ff
4 changed files with 23 additions and 3 deletions
helm
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
#// TODO move this test and dependencies to a docker container
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
|
|
@ -15,13 +15,14 @@ HELM_CHARTS_PACKAGED_DIR=${3:-"/tmp/helm-packaged"}
|
|||
|
||||
wget -q ${HELM_URL}/${HELM_TARBALL}
|
||||
tar xzfv ${HELM_TARBALL}
|
||||
export PATH=${PATH}:$(pwd)/linux-amd64/helm
|
||||
export PATH=${PATH}:$(pwd)/linux-amd64/
|
||||
|
||||
# Clean up tarball
|
||||
rm -f ${HELM_TARBALL}
|
||||
|
||||
# Package helm and dependencies
|
||||
mkdir -p ${HELM_CHARTS_PACKAGED_DIR}
|
||||
helm init --client-only
|
||||
|
||||
# check if charts has dependencies,
|
||||
for chart in ${HELM_PACKAGES}
|
||||
|
|
|
@ -7,4 +7,21 @@ set -o xtrace
|
|||
|
||||
HELM_BUCKET_NAME="coreos-charts"
|
||||
HELM_CHARTS_PACKAGED_DIR=${1:-"/tmp/helm-packaged"}
|
||||
aws s3 sync --acl public-read ${HELM_CHARTS_PACKAGED_DIR} s3://${HELM_BUCKET_NAME}/stable/
|
||||
AWS_REGION=${2:-"us-west-2"}
|
||||
|
||||
aws configure set region ${AWS_REGION}
|
||||
|
||||
#Check if the current chart has the same hash from the remote one
|
||||
for tgz in $(ls ${HELM_CHARTS_PACKAGED_DIR})
|
||||
do
|
||||
cur_hash=$(cat ${HELM_CHARTS_PACKAGED_DIR}/${tgz}|md5sum)
|
||||
remote_hash=$(aws s3api head-object --bucket ${HELM_BUCKET_NAME} --key stable/${tgz} | jq '.ETag' -r| tr -d '"')
|
||||
if [ "$cur_hash" != "$remote_hash" ]
|
||||
then
|
||||
echo "Current hash should be the same as the remote hash. Please bump the version of chart {$tgz}."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# sync charts
|
||||
aws s3 sync --acl public-read ${HELM_CHARTS_PACKAGED_DIR} s3://${HELM_BUCKET_NAME}/stable/
|
||||
|
|
|
@ -6,10 +6,12 @@ dependencies:
|
|||
|
||||
- name: prometheus-operator
|
||||
version: 0.0.7
|
||||
#e2e-repository: file://../prometheus-operator
|
||||
repository: https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
|
||||
|
||||
- name: grafana
|
||||
version: 0.0.4
|
||||
#e2e-repository: file://../grafana
|
||||
repository: https://s3-eu-west-1.amazonaws.com/coreos-charts/stable/
|
||||
|
||||
- name: prometheus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue