helm/chart-testing

kubectl commands fail from inside a cluster

wmcdona89 opened this issue · 2 comments

Is this a request for help?: no


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Version of Helm and Kubernetes:
quay.io/helmpack/chart-testing:v3.7.0 on OpenShift v4.7 (k8s v1.20)

What happened:
kubectl commands on chart-testing:v3.7.0 fail when run inside a cluster.

Looks like this is a known k8s issue

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):
run quay.io/helmpack/chart-testing:v3.7.0 in a cluster
execute ct lint-and-install --debug from the container

output:

kubectl --request-timeout=30s get deployments --namespace [redacted] --selector app.kubernetes.io/instance=[redacted] --output jsonpath={.items[].metadata.name}
kubectl --request-timeout=30s get events --output wide --namespace [redacted]
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Error printing details: Error waiting for process: exit status 1
kubectl --request-timeout=30s get pods --no-headers --namespace [redacted] --selector app.kubernetes.io/instance=[redacted] --output jsonpath={.items[
].metadata.name}
Error printing logs: Error running process: exit status 1

Anything else we need to know:
looks like this issue was introduced in v3.7.0 via #360

As a workaround, one can set kubectl-timeout: 0s in a config file as there isn't currently a --kubectl-timeout cli option.
For example,

echo "kubectl-timeout: 0s" > ct.yaml
ct lint-and-install --debug --config ct.yaml

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

This issue was closed because it has been stalled for 5 days with no activity.