Skip to content
This repository was archived by the owner on Mar 27, 2018. It is now read-only.

Commit 62a78de

Browse files
author
Reto Lehmann
committed
Registry checks are optional because of artifactory.
1 parent f653096 commit 62a78de

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/root.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func runChecks(cmd *cobra.Command, args []string) {
145145
}
146146

147147
if viper.GetString("node.type") == "master" {
148-
if len(viper.GetString("etcd.ips")) == 0 || len(viper.GetString("registry.ip")) == 0 || len(viper.GetString("router.ips")) == 0 {
148+
if len(viper.GetString("etcd.ips")) == 0 || len(viper.GetString("router.ips")) == 0 {
149149
log.Fatal("Can't read service IPs from configuration file.")
150150
}
151151
}
@@ -204,8 +204,10 @@ func runChecks(cmd *cobra.Command, args []string) {
204204
data.Events = append(data.Events, createMajorEvent(err))
205205
}
206206

207-
if err := checks.CheckRegistryHealth(viper.GetString("registry.ip")); err != nil {
207+
if len(viper.GetString("registry.ip")) > 0 {
208+
if err := checks.CheckRegistryHealth(viper.GetString("registry.ip")); err != nil {
208209
data.Events = append(data.Events, createMajorEvent(err))
210+
}
209211
}
210212

211213
for _, rip := range strings.Split(viper.GetString("router.ips"), ",") {

0 commit comments

Comments
 (0)