capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
80 stars 19 forks source link

Add option to pass optional kubeconfig TypeInstance to helm runner #540

Closed mszostok closed 2 years ago

mszostok commented 2 years ago

Description

Changes proposed in this pull request:

Issues

The current impl doesn't handle the cert properly. https://github.com/capactio/capact/blob/d7724224548b5fcdc4e747a39f97e0705d427cfe/cmd/helm-runner/main.go#L41-L48

As a result, I decided to stick to single method for getting kubeconfig and only override the KUBECONFIG env if needed (it's only for a given process execution) as the https://github.com/kubernetes-sigs/controller-runtime/blob/13f1400cd4fc0f15b6877453c50c95d35d146e47/pkg/client/config/config.go#L98-L99 do the job. Unfortunately the underlying methods are private, so I had to use the hack with env variable.

Related issue(s)