prometheus-operator / poctl

[EXPERIMENTAL] Manage, troubleshoot and validate Prometheus-Operator resources via Command Line Interface!
Apache License 2.0
18 stars 2 forks source link

chore: Replace internal client pkg with prometheus-operator's #6

Closed ArthurSens closed 6 months ago

ArthurSens commented 6 months ago

@nicolastakashi , here's an example of how we can reuse Prometheus-Operator's code to set up the clients here :)

I just had one small problem, k8sutils.NewClusterConfig requires $KUBECONFIG to be set, which is not always the case in local environments.

I've created this commit: https://github.com/prometheus-operator/prometheus-operator/commit/b250e9f2b6dfe6365fe176e168e54997e469ed53 (added as a replace directive in go.mod here) just to make it work on my environment, but I could open a PR upstream to avoid the replace