kubecost / kubectl-cost

CLI for determining the cost of Kubernetes workloads
Apache License 2.0
872 stars 55 forks source link

Fix panic when --use-proxy is true #139

Closed michaelmdresser closed 1 year ago

michaelmdresser commented 1 year ago

What does this PR change?

Refactor of query logic caused o.restConfig to always be nil. This commit fixes that by simply passing through the restConfig in the proxy query case.

Problem discovered by CI: https://github.com/kubecost/integration-ci-cd/actions/runs/4014159525/jobs/6906486306

How does this PR impact users? (This is the kind of thing that goes in release notes!)

How was this PR tested?

Locally. Observed panic before change with --use-proxy and no panic after.

michaelmdresser commented 1 year ago

For context, this was probably introduced by https://github.com/kubecost/kubectl-cost/pull/137