Commit 30b9f404 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

Merge branch 'master' into 'master'

Make optional the use of helmfile --namespace

Closes #6

See merge request to-be-continuous/helmfile!15
parents 04af3eb7 ed07d6f3
Loading
Loading
Loading
Loading
+4 −15
Original line number Diff line number Diff line
@@ -523,11 +523,6 @@ stages:
    helmfile_opts=${TRACE+--debug}
    helmfile_opts="$helmfile_opts --file ${HELMFILE_PATH}"

    if [ -n "$kube_namespace" ]; then
      log_info "--- using \\e[32mnamespace\\e[0m: \\e[33;1m${kube_namespace}\\e[0m"
      helmfile_opts="$helmfile_opts --namespace $kube_namespace"
    fi

    if [ -n "$environment_type" ]; then
      log_info "--- using \\e[32mhelmfile environment\\e[0m: \\e[33;1m${environment_type}\\e[0m"
      helmfile_opts="$helmfile_opts --environment $environment_type"
@@ -568,6 +563,8 @@ stages:
    log_info "--- \$environment_type: \\e[33;1m${environment_type}\\e[0m"
    log_info "--- \$environment_name: \\e[33;1m${environment_name}\\e[0m"

    kubectl config set-context --current --namespace="$kube_namespace"

    # maybe execute pre delete script
    prescript="$HELMFILE_SCRIPTS_DIR/helmfile-pre-delete.sh"
    if [[ -f "$prescript" ]]; then
@@ -580,11 +577,6 @@ stages:
    helmfile_opts=${TRACE+--debug}    
    helmfile_opts="$helmfile_opts --file ${HELMFILE_PATH}"

    if [ -n "$kube_namespace" ]; then
      log_info "--- using \\e[32mnamespace\\e[0m: \\e[33;1m${kube_namespace}\\e[0m"
      helmfile_opts="$helmfile_opts --namespace $kube_namespace"
    fi

    if [ -n "$environment_type" ]; then
      log_info "--- using \\e[32mhelmfile environment\\e[0m: \\e[33;1m${environment_type}\\e[0m"
      helmfile_opts="$helmfile_opts --environment $environment_type"
@@ -613,14 +605,11 @@ stages:
    log_info "--- \$environment_name: \\e[33;1m${environment_name}\\e[0m"
    log_info "--- \$environment_type: \\e[33;1m${environment_type}\\e[0m"

    kubectl config set-context --current --namespace="$kube_namespace"

    helmfile_opts=""
    helmfile_opts="$helmfile_opts --file ${HELMFILE_PATH}"

    if [ -n "$kube_namespace" ]; then
      log_info "--- using \\e[32mnamespace\\e[0m: \\e[33;1m${kube_namespace}\\e[0m"
      helmfile_opts="$helmfile_opts --namespace $kube_namespace"
    fi

    if [ -n "$environment_type" ]; then
      log_info "--- using \\e[32mhelmfile environment\\e[0m: \\e[33;1m${environment_type}\\e[0m"
      helmfile_opts="$helmfile_opts --environment $environment_type"