Skip to content

Commit f7c7c00

Browse files
Merge pull request Mirantis#30 from adidenko/fix-rbac
Add namespace to Helm deploy script
2 parents 879ea83 + 7723e0b commit f7c7c00

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
- docker
44
language: go
55
go:
6-
- 1.7.x
6+
- 1.8.x
77
install:
88
- make get-deps
99
script:

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ VENDOR_DIR = vendor
2727
ROOT_DIR = $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
2828

2929
# kubeadm-dind-cluster supports k8s versions:
30-
# "v1.4", "v1.5" and "v1.6".
31-
DIND_CLUSTER_VERSION ?= v1.5
30+
# "v1.6", "v1.7" and "v1.8".
31+
DIND_CLUSTER_VERSION ?= v1.8
3232

3333
ENV_PREPARE_MARKER = .env-prepare.complete
3434
BUILD_IMAGE_MARKER = .build-image.complete
@@ -37,7 +37,7 @@ BUILD_IMAGE_MARKER = .build-image.complete
3737
ifeq ($(DOCKER_BUILD), yes)
3838
_DOCKER_GOPATH = /go
3939
_DOCKER_WORKDIR = $(_DOCKER_GOPATH)/src/github.com/Mirantis/k8s-netchecker-agent/
40-
_DOCKER_IMAGE = golang:1.7
40+
_DOCKER_IMAGE = golang:1.8
4141
DOCKER_DEPS = apt-get update; apt-get install -y libpcap-dev;
4242
DOCKER_EXEC = docker run --rm -it -v "$(ROOT_DIR):$(_DOCKER_WORKDIR)" \
4343
-w "$(_DOCKER_WORKDIR)" $(_DOCKER_IMAGE)

scripts/helm_install_and_deploy.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ HELM_DEBUG=${HELM_DEBUG:-"--debug"}
2727
NETCHECKER_REPO=${NETCHECKER_REPO:-}
2828
KUBECTL_DIR="${KUBECTL_DIR:-${HOME}/.kubeadm-dind-cluster}"
2929
PATH="${KUBECTL_DIR}:${PATH}"
30+
NS=${NS:-netchecker}
31+
REAL_NS="--namespace=${1:-$NS}"
3032

3133

3234
function wait-for-tiller-pod-ready() {
@@ -88,13 +90,13 @@ function lint-helm {
8890
function deploy-helm {
8991
if [ "${NETCHECKER_REPO}" == "k8s-netchecker-server" ]; then
9092
pushd "../${NETCHECKER_REPO}" &> /dev/null
91-
helm "${HELM_DEBUG}" install ./"${HELM_SERVER_PATH}"/
93+
helm "${HELM_DEBUG}" install ${REAL_NS} ./"${HELM_SERVER_PATH}"/
9294
popd &> /dev/null
93-
helm "${HELM_DEBUG}" install ./"${HELM_AGENT_PATH}"/
95+
helm "${HELM_DEBUG}" install ${REAL_NS} ./"${HELM_AGENT_PATH}"/
9496
else
95-
helm "${HELM_DEBUG}" install ./"${HELM_SERVER_PATH}"/
97+
helm "${HELM_DEBUG}" install ${REAL_NS} ./"${HELM_SERVER_PATH}"/
9698
pushd "../${NETCHECKER_REPO}" &> /dev/null
97-
helm "${HELM_DEBUG}" install ./"${HELM_AGENT_PATH}"/
99+
helm "${HELM_DEBUG}" install ${REAL_NS} ./"${HELM_AGENT_PATH}"/
98100
popd &> /dev/null
99101
fi
100102
helm "${HELM_DEBUG}" list

scripts/kubeadm_dind_cluster.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ set -o nounset
2222
NUM_NODES=${NUM_NODES:-3}
2323
KUBEADM_SCRIPT_URL=${KUBEADM_SCRIPT_URL:-https://cdn.rawgit.com/Mirantis/kubeadm-dind-cluster/master/fixed/dind-cluster}
2424
# kubeadm-dind-cluster supports k8s versions:
25-
# "v1.4", "v1.5" and "v1.6".
26-
DIND_CLUSTER_VERSION=${DIND_CLUSTER_VERSION:-v1.5}
25+
# "v1.6", "v1.7" and "v1.8".
26+
DIND_CLUSTER_VERSION=${DIND_CLUSTER_VERSION:-v1.8}
2727

2828

2929
function kubeadm-dind-cluster {

0 commit comments

Comments
 (0)