Open aslakknutsen opened 6 years ago
In addition to this, it would be nice to maybe flip the 'ShouldIdle' toggle or introduce another toggle to 'IgnoreUser' in prod. That way you could temporarily disable the prod idler for a given user while you run a local debug session to not have it interfere.
Input: Namespace Basename, OSIO User UUID, CLuster URL and OS User Token
Watches builds and deployments in a single namespace relying only on a User token (require admin/edit of -jenkins ns to perform Idle/Unidle)
See cmd/fabric8-jenkins-idler-test/main.go for "var"s required.
Run on cli
Or run/debug the test TestSingleIdler in cmd/fabric8-jenkins-idler-test/main_test.go
Currently uses a copied and modified v of idler.go. The changes are only related to passing in the namespace and switch between calling the 'WatchNamespaceXXX' Openshift Client to watch the Cluster or a given Client. (Trying to avoid changing the original code as much as possible during debugging)