-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package bind should support updating a binding #466
Comments
For others who might have the same need in the meantime, here is a little bash script named #!/bin/bash
if [ $# -lt 2 ]; then
echo "Usage: `basename $0` <pkg> <target>"
echo
echo "Creates or updates a package binding (symlink)."
exit 1
fi
package="$1"
target="$2"
apihost=$(wsk property get -o raw --apihost)
auth=$(wsk property get -o raw --auth | base64)
namespace=$(wsk property get -o raw --namespace)
curl -X PUT -H "Authorization: Basic $auth=" \
-H "Content-Type: application/json" \
-d "{\"binding\":{\"namespace\":\"$namespace\",\"name\":\"$target\"}}" \
"$apihost/api/v1/namespaces/$namespace/packages/$package?overwrite=true" |
this is a great idea, how about adding a boolean flag like it would be great if you have time to create a PR for this, if not, I can do it later |
I think this is can be closed |
Haven't tested it since then but seems very much like #474 addressed this. |
Problem
Currently,
wsk package bind
can only create bindings, but not update them. Because it always setsoverwrite=false
.Proposal
Would be nice to have either
wsk package bind-update
wsk package bind
setovewrite=true
Motivation
Updating a package binding in one go is a useful feature to do e.g. "stack flips" with openwhisk, switching to a new code version deployed in a different package.
Details
I haven't found another way to update a package with
wsk
. Updating the binding works with the openwhisk HTTP API when settingoverwrite=true
:Example curl to update that
<package>
binds to<target-package
:The text was updated successfully, but these errors were encountered: