Format the strings in watchTapperPod method (#331)

This commit is contained in:
M. Mert Yıldıran
2021-10-07 21:06:17 +03:00
committed by GitHub
parent 8b8c4609ce
commit 77710cc411

View File

@@ -632,7 +632,7 @@ func watchTapperPod(ctx context.Context, kubernetesProvider *kubernetes.Provider
}
if modifiedPod.Status.Phase == core.PodPending && modifiedPod.Status.Conditions[0].Type == core.PodScheduled && modifiedPod.Status.Conditions[0].Status != core.ConditionTrue {
logger.Log.Infof(uiUtils.Red, "Wasn't able to deploy the tapper %s. Reason: \"%s\"", modifiedPod.Name, modifiedPod.Status.Conditions[0].Message)
logger.Log.Infof(uiUtils.Red, fmt.Sprintf("Wasn't able to deploy the tapper %s. Reason: \"%s\"", modifiedPod.Name, modifiedPod.Status.Conditions[0].Message))
cancel()
break
}
@@ -649,7 +649,7 @@ func watchTapperPod(ctx context.Context, kubernetesProvider *kubernetes.Provider
if state.Terminated != nil {
switch state.Terminated.Reason {
case "OOMKilled":
logger.Log.Infof(uiUtils.Red, "Tapper %s was terminated (reason: OOMKilled). You should consider increasing machine resources.", modifiedPod.Name)
logger.Log.Infof(uiUtils.Red, fmt.Sprintf("Tapper %s was terminated (reason: OOMKilled). You should consider increasing machine resources.", modifiedPod.Name))
}
}
}