Skip to content

Helmfile does not respect paths like ~/pull-secret.txt or KUBECONFIG=~/KUBECONFIG.yaml #23

@robertgshaw2-redhat

Description

@robertgshaw2-redhat

When deploying make deploy-all with KUBECONFIG=~/KUBECONFIG.yaml, I would see issues like this:

STDERR:
  Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp 127.0.0.1:8080: connect: connection refused

COMBINED OUTPUT:
  Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp 127.0.0.1:8080: connect: connection refused
Comparing release=cert-manager-operator, chart=., namespace=cert-manager-operator
in ./helmfile.yaml.gotmpl: in .helmfiles[0]: in charts/cert-manager-operator/helmfile.yaml.gotmpl: command "/opt/homebrew/bin/helm" exited with non-zero status:

Inside make, kubectl get-context would work properly, but helmfile seemed to have an issue with relative paths.

Setting an absolute path for my KUBECONFIG solved the problem.

We should document this and check for it in make check-kubeconfig

check-kubeconfig:
	@kubectl cluster-info >/dev/null 2>&1 || (echo "ERROR: Cannot connect to cluster. Check KUBECONFIG." && exit 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions