mirror of
https://github.com/rancher/rke.git
synced 2025-09-25 14:48:06 +00:00
Added info in log messages, more consistency in log messages
This commit is contained in:
committed by
Alena Prokharchyk
parent
c2071495ac
commit
a161d30f78
@@ -106,7 +106,7 @@ func (c *Cluster) deployAddonsInclude(ctx context.Context) error {
|
||||
log.Infof(ctx, "[addons] Checking for included user addons")
|
||||
|
||||
if len(c.AddonsInclude) == 0 {
|
||||
log.Infof(ctx, "[addons] No included addon paths or urls..")
|
||||
log.Infof(ctx, "[addons] No included addon paths or urls")
|
||||
return nil
|
||||
}
|
||||
for _, addon := range c.AddonsInclude {
|
||||
@@ -199,7 +199,7 @@ func (c *Cluster) deployKubeDNS(ctx context.Context) error {
|
||||
if err := c.doAddonDeploy(ctx, kubeDNSYaml, KubeDNSAddonResourceName, false); err != nil {
|
||||
return err
|
||||
}
|
||||
log.Infof(ctx, "[addons] KubeDNS deployed successfully..")
|
||||
log.Infof(ctx, "[addons] KubeDNS deployed successfully")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ func (c *Cluster) deployMetricServer(ctx context.Context) error {
|
||||
if err := c.doAddonDeploy(ctx, metricsYaml, MetricsServerAddonResourceName, false); err != nil {
|
||||
return err
|
||||
}
|
||||
log.Infof(ctx, "[addons] KubeDNS deployed successfully..")
|
||||
log.Infof(ctx, "[addons] Metrics Server deployed successfully")
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ func (c *Cluster) doAddonDeploy(ctx context.Context, addonYaml, resourceName str
|
||||
return &addonError{fmt.Sprintf("Failed to save addon ConfigMap: %v", err), isCritical}
|
||||
}
|
||||
|
||||
log.Infof(ctx, "[addons] Executing deploy job..")
|
||||
log.Infof(ctx, "[addons] Executing deploy job %s", resourceName)
|
||||
k8sClient, err := k8s.NewClient(c.LocalKubeConfigPath, c.K8sWrapTransport)
|
||||
if err != nil {
|
||||
return &addonError{fmt.Sprintf("%v", err), isCritical}
|
||||
@@ -301,7 +301,7 @@ func (c *Cluster) doAddonDelete(ctx context.Context, resourceName string, isCrit
|
||||
}
|
||||
|
||||
func (c *Cluster) StoreAddonConfigMap(ctx context.Context, addonYaml string, addonName string) (bool, error) {
|
||||
log.Infof(ctx, "[addons] Saving addon ConfigMap to Kubernetes")
|
||||
log.Infof(ctx, "[addons] Saving ConfigMap for addon %s to Kubernetes", addonName)
|
||||
updated := false
|
||||
kubeClient, err := k8s.NewClient(c.LocalKubeConfigPath, c.K8sWrapTransport)
|
||||
if err != nil {
|
||||
@@ -316,7 +316,7 @@ func (c *Cluster) StoreAddonConfigMap(ctx context.Context, addonYaml string, add
|
||||
time.Sleep(time.Second * 5)
|
||||
continue
|
||||
}
|
||||
log.Infof(ctx, "[addons] Successfully Saved addon to Kubernetes ConfigMap: %s", addonName)
|
||||
log.Infof(ctx, "[addons] Successfully saved ConfigMap for addon %s to Kubernetes", addonName)
|
||||
timeout <- true
|
||||
break
|
||||
}
|
||||
@@ -371,6 +371,6 @@ func (c *Cluster) deployIngress(ctx context.Context) error {
|
||||
if err := c.doAddonDeploy(ctx, ingressYaml, IngressAddonResourceName, false); err != nil {
|
||||
return err
|
||||
}
|
||||
log.Infof(ctx, "[ingress] ingress controller %s is successfully deployed", c.Ingress.Provider)
|
||||
log.Infof(ctx, "[ingress] ingress controller %s deployed successfully", c.Ingress.Provider)
|
||||
return nil
|
||||
}
|
||||
|
@@ -75,13 +75,13 @@ func ensureJobCompleted(k8sClient *kubernetes.Clientset, j interface{}) error {
|
||||
|
||||
jobStatus, err := GetK8sJobStatus(k8sClient, job.Name, job.Namespace)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Failed to get job complete status: %v", err)
|
||||
return fmt.Errorf("Failed to get job complete status for job %s in namespace %s: %v", job.Name, job.Namespace, err)
|
||||
}
|
||||
if jobStatus.Completed {
|
||||
logrus.Debugf("[k8s] Job %s completed successfully..", job.Name)
|
||||
logrus.Debugf("[k8s] Job %s in namespace %s completed successfully", job.Name, job.Namespace)
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("Failed to get job complete status: %v", err)
|
||||
return fmt.Errorf("Failed to get job complete status for job %s in namespace %s", job.Name, job.Namespace)
|
||||
}
|
||||
|
||||
func ensureJobDeleted(k8sClient *kubernetes.Clientset, j interface{}) error {
|
||||
|
Reference in New Issue
Block a user