Closed ArthurSens closed 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.
k8sutils.NewClusterConfig
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
@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