Closed mkramb closed 6 years ago
I wrote my first bit of typescript last week so I'm gonna say merge whenever you're happy @mkramb :)
I really wanted to setup a way to build a preview version in CI that we can point our local vscode at using the debug port, or even deploy the change and access via a browser, but I couldn't figure out how or if it's even possible.
@mkramb looks good - though it might be simpler to have a separate KubeWatcher for each CRD URL - as under the covers you can only watch one URL at once in the k8s REST API.
So I wonder if we should have a way to make a KubeWatcher for any URL (anything in k8s or any CRD etc)?
then we could have something like...
let pipelineWatcher = new KubeWatcher(CRDs.Pipeline);
let envWatcher = new KubeWatcher(CRDs.Environment);
...
pipelineWatcher.addCallback()...
@jstrachan i like that approach! will refactor and update PR
yeah - we may wanna watch other stuff (CRD or k8s resources like Deployment / Service) in other namespaces too so leaving it nice and simple - we pass in a URL or something - should mean we can later on build more complex watchers etc.
e.g. when we're on helm3 we could watch the helm CRDs as releases happen in Staging / Production
@jstrachan updated, so API looks like const pipelines = new KubeWatcher(KubeCrd.Pipelines);
@mkramb looks great thanks!
Prework for adding support for
environments
kubeclient
CRDs
@jstrachan @rawlingsj