Skip to content

Commit

Permalink
clustermesh: Fix error capitalization and typos
Browse files Browse the repository at this point in the history
'make staticcheck' does not allow error messages starting with a
capital letter, so do not use 'Cilium' to start an error message.

Correctly spell 'DaemonSet' in error messages.

Signed-off-by: Jarno Rajahalme <jarno@covalent.io>
  • Loading branch information
jrajahalme authored and tklauser committed Mar 25, 2021
1 parent 381082f commit ac78a56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clustermesh/clustermesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ func (k *K8sClusterMesh) WriteExternalWorkloadInstallScript(ctx context.Context,
return err
}
if daemonSet == nil {
return fmt.Errorf("DaemomSet %s is not available", defaults.AgentDaemonSetName)
return fmt.Errorf("DaemonSet %s is not available", defaults.AgentDaemonSetName)
}
k.Log("✅ Using image from Cilium DaemonSet: %s", daemonSet.Spec.Template.Spec.Containers[0].Image)

Expand All @@ -1464,7 +1464,7 @@ func (k *K8sClusterMesh) WriteExternalWorkloadInstallScript(ctx context.Context,
return err
}
if ai.Tunnel != "" && ai.Tunnel != "vxlan" {
return fmt.Errorf("Cilium datapath not using vxlan, please install Cilium with '--config tunnel=vxlan'")
return fmt.Errorf("datapath not using vxlan, please install Cilium with '--config tunnel=vxlan'")
}

clusterAddr := fmt.Sprintf("%s:%d", ai.ServiceIPs[0], ai.ServicePort)
Expand Down
2 changes: 1 addition & 1 deletion status/k8s.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (k *K8sStatusCollector) daemonSetStatus(ctx context.Context, status *Status
}

if daemonSet == nil {
return fmt.Errorf("DaemomSet %s is not available", name)
return fmt.Errorf("DaemonSet %s is not available", name)
}

stateCount := PodStateCount{Type: "DaemonSet"}
Expand Down

0 comments on commit ac78a56

Please sign in to comment.