diff --git a/analyses.go b/analyses.go index 2a2eb9a..4c8213a 100644 --- a/analyses.go +++ b/analyses.go @@ -52,6 +52,9 @@ type Job struct { } func (j *Job) accessURL() (string, error) { + if VICEURI == "" { + return "", nil + } vice_uri, err := url.Parse(VICEURI) if err != nil { return "", errors.Wrapf(err, "Error parsing VICE URI from %s", VICEURI) diff --git a/main.go b/main.go index a486136..33b8a48 100644 --- a/main.go +++ b/main.go @@ -145,6 +145,7 @@ func ConfigureUserLookups(cfg *viper.Viper) error { return nil } +// ConfigureAnalyses sets up the base VICE url func ConfigureAnalyses(cfg *viper.Viper) error { viceBase := cfg.GetString("k8s.frontend.base") if viceBase == "" { @@ -422,6 +423,12 @@ func main() { } log.Info("done configuring user lookups") + log.Info("configuring VICE URL...") + if err = ConfigureAnalyses(cfg); err != nil { + log.Fatal(err) + } + log.Info("done configuring VICE URL") + var k8sEnabled bool if cfg.InConfig("vice.k8s-enabled") { k8sEnabled = cfg.GetBool("vice.k8s-enabled")