Update to Kubernetes 1.33.0 and Go 1.24.0
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
This commit is contained in:
@@ -217,7 +217,7 @@ func componentsCheck(ctx context.Context, kubeClient client.Client) bool {
|
||||
}
|
||||
}
|
||||
for _, c := range d.Spec.Template.Spec.Containers {
|
||||
logger.Actionf(c.Image)
|
||||
logger.Actionf("%s", c.Image)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ func crdsCheck(ctx context.Context, kubeClient client.Client) bool {
|
||||
for _, crd := range list.Items {
|
||||
versions := crd.Status.StoredVersions
|
||||
if len(versions) > 0 {
|
||||
logger.Successf(crd.Name + "/" + versions[len(versions)-1])
|
||||
logger.Successf("%s", crd.Name+"/"+versions[len(versions)-1])
|
||||
} else {
|
||||
ok = false
|
||||
logger.Failuref("no stored versions for %s", crd.Name)
|
||||
|
||||
@@ -96,7 +96,7 @@ func TestDiffArtifact(t *testing.T) {
|
||||
tt.url = fmt.Sprintf(tt.url, dockerReg)
|
||||
_, err := executeCommand("push artifact " + tt.url + " --path=" + tt.pushFile + " --source=test --revision=test")
|
||||
if err != nil {
|
||||
t.Fatalf(fmt.Errorf("failed to push image: %w", err).Error())
|
||||
t.Fatal(fmt.Errorf("failed to push image: %w", err).Error())
|
||||
}
|
||||
|
||||
cmd := cmdTestCase{
|
||||
|
||||
@@ -87,7 +87,7 @@ var getAllCmd = &cobra.Command{
|
||||
|
||||
func logError(err error) {
|
||||
if !apimeta.IsNoMatchError(err) {
|
||||
logger.Failuref(err.Error())
|
||||
logger.Failuref("%s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ var getImageAllCmd = &cobra.Command{
|
||||
|
||||
for _, c := range allImageCmd {
|
||||
if err := c.run(cmd, args); err != nil {
|
||||
logger.Failuref(err.Error())
|
||||
logger.Failuref("%s", err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ var getSourceAllCmd = &cobra.Command{
|
||||
for _, c := range allSourceCmd {
|
||||
if err := c.run(cmd, args); err != nil {
|
||||
if !apimeta.IsNoMatchError(err) {
|
||||
logger.Failuref(err.Error())
|
||||
logger.Failuref("%s", err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ func isObjectReady(obj client.Object, statusType objectStatusType) (bool, error)
|
||||
case kstatus.InProgressStatus:
|
||||
return false, nil
|
||||
default:
|
||||
return false, fmt.Errorf(result.Message)
|
||||
return false, fmt.Errorf("%s", result.Message)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ func (reconcile reconcileCommand) run(cmd *cobra.Command, args []string) error {
|
||||
if readyCond.Status != metav1.ConditionTrue {
|
||||
return fmt.Errorf("%s reconciliation failed: '%s'", reconcile.kind, readyCond.Message)
|
||||
}
|
||||
logger.Successf(reconcile.object.successMessage())
|
||||
logger.Successf("%s", reconcile.object.successMessage())
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +96,6 @@ func (reconcile reconcileWithSourceCommand) run(cmd *cobra.Command, args []strin
|
||||
if readyCond.Status != metav1.ConditionTrue {
|
||||
return fmt.Errorf("%s reconciliation failed: %s", reconcile.kind, readyCond.Message)
|
||||
}
|
||||
logger.Successf(reconcile.object.successMessage())
|
||||
logger.Successf("%s", reconcile.object.successMessage())
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -251,9 +251,9 @@ func (resume resumeCommand) printMessage(responses []reconcileResponse) {
|
||||
continue
|
||||
}
|
||||
if r.err != nil {
|
||||
logger.Failuref(r.err.Error())
|
||||
logger.Failuref("%s", r.err.Error())
|
||||
}
|
||||
logger.Successf("%s %s reconciliation completed", resume.kind, r.asClientObject().GetName())
|
||||
logger.Successf(r.successMessage())
|
||||
logger.Successf("%s", r.successMessage())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user