Update Weave-Kube daemonset YAML files using Launch Generator.
Note that given the YAML's structure is different from previous version, indentation of `COVERAGE_ARGS` had to change (+4 whitespaces to each line). Commands used: ``` $ curl -fsS https://frontend.dev.weave.works/k8s/v1.5/net?v=latest > prog/weave-kube/weave-daemonset.yaml $ curl -fsS https://frontend.dev.weave.works/k8s/v1.6/net?v=latest > prog/weave-kube/weave-daemonset-k8s-1.6.yaml ``` Annotations removed from Launch Generator's files: ``` annotations: cloud.weave.works/launcher-info: |- { "server-version": "master-050965d", "original-request": { "url": "/k8s/v1.6/net?v=latest", "date": "Thu May 25 2017 13:16:43 GMT+0000 (UTC)" }, "email-address": "support@weave.works" } ``` and ``` annotations: cloud.weave.works/launcher-info: |- { "server-version": "master-050965d", "original-request": { "url": "/k8s/v1.5/net?v=latest", "date": "Thu May 25 2017 13:16:43 GMT+0000 (UTC)" }, "email-address": "support@weave.works" } ```
This commit is contained in:
1 parent
9facab53b7
commit
067ce6de9f
3 files changed
+203
-182
No files matched your search
@@ -38,10 +38,16 @@ for host in $HOSTS; do
|
||||
fi
|
||||
done
|
||||
|
||||
[ -n "$COVERAGE" ] && COVERAGE_ARGS="\\n env:\\n - name: EXTRA_ARGS\\n value: \"-test.coverprofile=/home/weave/cover.prof --\""
|
||||
if [ -n "$COVERAGE" ]; then
|
||||
COVERAGE_ARGS="env:\\n - name: EXTRA_ARGS\\n value: \"-test.coverprofile=/home/weave/cover.prof --\""
|
||||
else
|
||||
COVERAGE_ARGS="env: []"
|
||||
fi
|
||||
|
||||
sed -e "s%imagePullPolicy: Always%imagePullPolicy: Never$COVERAGE_ARGS%" "$(dirname "$0")/../prog/weave-kube/weave-daemonset-k8s-1.6.yaml" \
|
||||
| run_on $HOST1 "$KUBECTL apply -f -"
|
||||
# Ensure Kubernetes uses locally built container images and inject code coverage environment variable (or do nothing depending on $COVERAGE):
|
||||
sed -e "s%imagePullPolicy: Always%imagePullPolicy: Never%" \
|
||||
-e "s%env: \[\]%$COVERAGE_ARGS%" \
|
||||
"$(dirname "$0")/../prog/weave-kube/weave-daemonset-k8s-1.6.yaml" | run_on "$HOST1" "$KUBECTL apply -n kube-system -f -"
|
||||
|
||||
sleep 5
|
||||
|
||||
|
||||
Reference in new issue
Block a user