Skip to content

Commit

Permalink
Rename --initializer flag to --enable-initializer (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Jan 27, 2018
1 parent 976e674 commit 6dc58fe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 3 additions & 2 deletions docs/setup/install.md
Expand Up @@ -28,6 +28,7 @@ options:
-n, --namespace=NAMESPACE specify namespace (default: kube-system)
--rbac create RBAC roles and bindings
--run-on-master run stash operator on master
--enable-initializer configure stash operator as workload initializer

# install without RBAC roles
$ curl -fsSL https://raw.githubusercontent.com/appscode/stash/0.7.0-alpha.0/hack/deploy/stash.sh \
Expand All @@ -53,11 +54,11 @@ $ curl -fsSL https://raw.githubusercontent.com/appscode/stash/0.7.0-alpha.0/hack
| bash -s -- --namespace=stash [--run-on-master] [--rbac]
```

Stash operator can be used as a workload [initializer](https://kubernetes.io/docs/admin/extensible-admission-controllers/#initializers). For this, pass the `--initializer` flag. _Please note that, this uses an alpha feature of Kubernetes_.
Stash operator can be used as a workload [initializer](https://kubernetes.io/docs/admin/extensible-admission-controllers/#initializers). For this, pass the `--enable-initializer` flag. _Please note that, this uses an alpha feature of Kubernetes_.

```console
$ curl -fsSL https://raw.githubusercontent.com/appscode/stash/0.7.0-alpha.0/hack/deploy/stash.sh \
| bash -s -- --initializer [--rbac]
| bash -s -- --enable-initializer [--rbac]
```


Expand Down
10 changes: 5 additions & 5 deletions hack/deploy/stash.sh
Expand Up @@ -8,7 +8,7 @@ export STASH_NAMESPACE=kube-system
export STASH_SERVICE_ACCOUNT=default
export STASH_ENABLE_RBAC=false
export STASH_RUN_ON_MASTER=0
export STASH_AS_INITIALIZER=false
export STASH_ENABLE_INITIALIZER=false

show_help() {
echo "stash.sh - install stash operator"
Expand All @@ -20,7 +20,7 @@ show_help() {
echo "-n, --namespace=NAMESPACE specify namespace (default: kube-system)"
echo " --rbac create RBAC roles and bindings"
echo " --run-on-master run stash operator on master"
echo " --initializer configure stash operator as workload initializer"
echo " --enable-initializer configure stash operator as workload initializer"
}

while test $# -gt 0; do
Expand All @@ -43,8 +43,8 @@ while test $# -gt 0; do
export STASH_NAMESPACE=`echo $1 | sed -e 's/^[^=]*=//g'`
shift
;;
--initializer)
export STASH_AS_INITIALIZER=true
--enable-initializer)
export STASH_ENABLE_INITIALIZER=true
shift
;;
--rbac)
Expand Down Expand Up @@ -79,6 +79,6 @@ if [ "$STASH_RUN_ON_MASTER" -eq 1 ]; then
--patch="$(curl -fsSL https://raw.githubusercontent.com/appscode/stash/0.7.0-alpha.0/hack/deploy/run-on-master.yaml)"
fi

if [ "$STASH_AS_INITIALIZER" = true ]; then
if [ "$STASH_ENABLE_INITIALIZER" = true ]; then
kubectl apply -f https://raw.githubusercontent.com/appscode/stash/0.7.0-alpha.0/hack/deploy/initializer.yaml
fi

0 comments on commit 6dc58fe

Please sign in to comment.