Merge pull request #26 from chancez/fix_hack_deploy_kubeconfig

Don't pass $KUBECONFIG to kubectl --kubeconfig flag
This commit is contained in:
Frederic Branczyk
2017-01-02 09:09:08 +01:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -1,17 +1,17 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [ -z "${KUBECONFIG}" ]; then if [ -z "${KUBECONFIG}" ]; then
KUBECONFIG=~/.kube/config export KUBECONFIG=~/.kube/config
fi fi
if [ -z "${NAMESPACE}" ]; then if [ -z "${NAMESPACE}" ]; then
NAMESPACE=monitoring NAMESPACE=monitoring
fi fi
kubectl --kubeconfig="$KUBECONFIG" create namespace "$NAMESPACE" kubectl create namespace "$NAMESPACE"
kctl() { kctl() {
kubectl --kubeconfig="$KUBECONFIG" -n "$NAMESPACE" "$@" kubectl --namespace "$NAMESPACE" "$@"
} }
kctl create -f manifests/prometheus-operator.yaml kctl create -f manifests/prometheus-operator.yaml

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [ -z "${KUBECONFIG}" ]; then if [ -z "${KUBECONFIG}" ]; then
KUBECONFIG=~/.kube/config export KUBECONFIG=~/.kube/config
fi fi
if [ -z "${NAMESPACE}" ]; then if [ -z "${NAMESPACE}" ]; then
@@ -9,7 +9,7 @@ if [ -z "${NAMESPACE}" ]; then
fi fi
kctl() { kctl() {
kubectl --kubeconfig="$KUBECONFIG" -n "$NAMESPACE" "$@" kubectl --namespace "$NAMESPACE" "$@"
} }
kctl delete -f manifests/exporters kctl delete -f manifests/exporters