When to switch on / off online mode for enrichers ?
See original GitHub issueI did a refactoring of the GitEnricher since he constantly throws errors because trying to contact a running Kubernetes Cluster.
IMO the default should be offline, which could be switched on by a CD. The reason is, that enriching the resource descriptors with service urls coming from random clusters where one is currently logged in, and which end up in an jar-artefact, too, is not really good for versioning and reproducability (you can’t recreate an artefact later if you are not running in the very same environment).
It’s ok when running in a CD in order to store meta data about the current build because this artefact gets pushed around the pipeline (even then, one need to give up the dream that a single GIt tag is enough to reproducably recreate a piece of software).
So my idea is to start in offline mode and let the CD switch it on with a property. This is currently possible by adding a -Dfabric8.online
to the build scripts (if #156 gets merged in). Of course this can be set within the pom.xml
, too for a permanent setting.
I introduced an AbstractLiveEnricher
which does all the on / offline handling and is supposed to be the single entry point for contacting a cluster.
I also renamed the GitEnricher to a BuildEnricher (since it adds also Jenkins meta data).
Is this ok that we start offline by default ? This also avoids nasty errors and pauses when people start from scratch.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (8 by maintainers)
Top GitHub Comments
@rawlingsj Yeah, but isn’t
BUILD_ID
set for any Jenkins environment, whether it is running in Kubernetes or not ? The problem is, when running online then the enricher tries to detect the Service URL for Gogs (also a fabric8 special thing) and Jenkins.What I really look for is an env which is specific to our CD which runs on top of Kubernetes (so that one can be somewhat sure that service lookup succeeds)
Yes, I think we have moved that already out to the deprecated enrichers. Let’s close this issue for now.