Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

Commit

Permalink
Merge pull request #63 from rimusz/revert-code-to-v0.8.4
Browse files Browse the repository at this point in the history
Revert code to v0.8.4, remove build options
  • Loading branch information
rimusz authored Sep 19, 2019
2 parents 2e98247 + 2d50917 commit d31b985
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 163 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ jobs:
- run:
name: lint
command: |
shellcheck -x scripts/build-patch.sh
shellcheck -x scripts/build.sh
shellcheck -x scripts/install.sh
shellcheck -x scripts/semver
shellcheck -x scripts/tiller.sh
17 changes: 0 additions & 17 deletions Makefile

This file was deleted.

21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Check it out my new blog post [How to migrate from Helm v2 to Helm v3](https://r

## Installation

Install Helm client as per one of recomended [ways](https://docs.helm.sh/using_helm/#installing-the-helm-client).
Install Helm client as per one of recommended [ways](https://docs.helm.sh/using_helm/#installing-the-helm-client).

**Note:** Initialize helm with `helm init --client-only`, flag `--client-only` is a must as otherwise you will get `Tiller` installed in to Kubernetes cluster.

Expand Down Expand Up @@ -144,22 +144,3 @@ $ minikube start
$ helm tiller stop
$ helm tiller start
```

## Tiller binaries

### Tiller binaries for v2.11 Helm and above versions

Beginning of Helm v2.11 release, `helm` archive file comes packed with `tiller` binary as well.
Plugin will check the version and download the right archive file. No more building/retrieving of
`tiller` binary is needed anymore.


### Build patched Tiller binaries and publish them for pre v2.10 Helm

**Note:** `Tiller`in pre `v2.10` does not support kubeconfig files which use user authentication via `auth-provider`, so you need to use this approach for all pre `v2.10` `tiller` releases.

To build patched `MacOS` and `Linux` `tiller` binaries and then publish them to `GCS` bucket run on your Mac:

```console
TILLER_VERSION=2.9.1 GCS_BUCKET=my_bucket make build-patch
```
2 changes: 1 addition & 1 deletion plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: "tiller"
version: "0.8.6"
version: "0.8.7"
usage: "Please see https://github.com/rimusz/helm-tiller for usage"
description: "Start a Tiller server locally, aka Tillerless Helm"
command: "$HELM_PLUGIN_DIR/scripts/tiller.sh"
Expand Down
51 changes: 0 additions & 51 deletions scripts/build-patch.sh

This file was deleted.

40 changes: 0 additions & 40 deletions scripts/build.sh

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/tiller.patch

This file was deleted.

33 changes: 3 additions & 30 deletions scripts/tiller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -155,32 +155,14 @@ tiller_env() {
fi
}
tiller_pid_file() {
if [ -z "$TMPDIR" ]; then
export TMPDIR="/tmp"
fi
echo "$TMPDIR/helm-tiller-${HELM_TILLER_PORT}.pid"
}
tiller_save_pid() {
local tiller_pid="$1"
local tiller_pid_file
tiller_pid_file=$(tiller_pid_file)
echo "$tiller_pid" > "$tiller_pid_file"
}
start_tiller() {
tiller_env
PROBE_LISTEN_FLAG="--probe-listen=127.0.0.1:${HELM_TILLER_PROBE_PORT}"
# check if we have a version that supports the --probe-listen flag
./bin/tiller --help 2>&1 | grep probe-listen > /dev/null || PROBE_LISTEN_FLAG=""
# shellcheck disable=SC2188
(
./bin/tiller --storage=${HELM_TILLER_STORAGE} --listen=127.0.0.1:${HELM_TILLER_PORT} ${PROBE_LISTEN_FLAG} --history-max=${HELM_TILLER_HISTORY_MAX} &
tiller_save_pid "$!"
) 2>"${HELM_TILLER_LOGS_DIR}"
if [[ "${HELM_TILLER_SILENT}" == "false" ]]; then
( ./bin/tiller --storage=${HELM_TILLER_STORAGE} --listen=127.0.0.1:${HELM_TILLER_PORT} ${PROBE_LISTEN_FLAG} --history-max=${HELM_TILLER_HISTORY_MAX} & 2>"${HELM_TILLER_LOGS_DIR}")
if [[ "${HELM_TILLER_SILENT}" == "false" ]]; then
echo "Tiller namespace: $TILLER_NAMESPACE"
fi
}
Expand All @@ -194,16 +176,7 @@ stop_tiller() {
if [[ "${HELM_TILLER_SILENT}" == "false" ]]; then
echo "Stopping Tiller..."
fi
local tiller_pid_file
tiller_pid_file=$(tiller_pid_file)
if ! [ -f "$tiller_pid_file" ]; then
echo "can not find tiller pid file $tiller_pid_file" 1>&2
exit 1
fi
local tiller_pid
tiller_pid="$(cat "$tiller_pid_file")"
kill -9 "$tiller_pid"
rm -f "$tiller_pid_file"
pkill -9 -f ./bin/tiller
}
COMMAND=$1
Expand Down

0 comments on commit d31b985

Please sign in to comment.