modify log msg as per suggested

This commit is contained in:
Song.Jin 2018-11-06 11:05:36 +11:00
parent 9b5bec1ddf
commit 5f0a03a06b

View file

@ -149,10 +149,12 @@ func (cli *client) registerCustomResources(useTPR bool) (ok bool) {
} else { } else {
r := customResourceDefinitions[i] r := customResourceDefinitions[i]
var i interface{} var i interface{}
cli.logger.Infof("checking if resource %s has been created already...", r.ObjectMeta.Name) cli.logger.Infof("checking if custom resource %s has been created already...", r.ObjectMeta.Name)
if err := cli.list(r.Spec.Names.Plural, &i); err == nil { if err := cli.list(r.Spec.Names.Plural, &i); err == nil {
cli.logger.Infof("The custom resource already created %s, hence continue", r.ObjectMeta.Name) cli.logger.Infof("The custom resource %s already available, skipping create", r.ObjectMeta.Name)
continue continue
} else {
cli.logger.Infof("failed to list custom resource %s, attempting to create: %v", r.ObjectMeta.Name, err)
} }
err = cli.postResource("apiextensions.k8s.io/v1beta1", "", "customresourcedefinitions", r) err = cli.postResource("apiextensions.k8s.io/v1beta1", "", "customresourcedefinitions", r)
resourceName = r.ObjectMeta.Name resourceName = r.ObjectMeta.Name