Skip to content

Commit

Permalink
Fix vet error
Browse files Browse the repository at this point in the history
  • Loading branch information
hakman committed Nov 4, 2023
1 parent 86f808f commit 3597bdd
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion nodeup/pkg/model/kubectl.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (b *KubectlBuilder) Build(c *fi.NodeupModelBuilderContext) error {
func (b *KubectlBuilder) findKubeconfigUser() (*fi.User, *fi.Group, error) {
users, err := b.Distribution.DefaultUsers()
if err != nil {
klog.Warningf("won't write kubeconfig to homedir for distribution %s: %v", b.Distribution, err)
klog.Warningf("won't write kubeconfig to homedir for distribution %v: %v", b.Distribution, err)
return nil, nil, nil
}

Expand Down
2 changes: 1 addition & 1 deletion nodeup/pkg/model/protokube.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (t *ProtokubeBuilder) ProtokubeFlags() (*ProtokubeFlags, error) {
}

if t.UsesLegacyGossip() {
klog.Warningf("using (legacy) gossip DNS", t.NodeupConfig.ClusterName)
klog.Warningf("using (legacy) gossip DNS")
f.Gossip = fi.PtrTo(true)
if t.NodeupConfig.GossipConfig != nil {
f.GossipProtocol = t.NodeupConfig.GossipConfig.Protocol
Expand Down
2 changes: 1 addition & 1 deletion nodeup/pkg/model/update_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func (b *UpdateServiceBuilder) buildFlatcarSystemdService(c *fi.NodeupModelBuild
}
}

klog.Infof("Detected OS %s; building %s service to disable update scheduler", b.Distribution, flatcarServiceName)
klog.Infof("Detected OS %v; building %s service to disable update scheduler", b.Distribution, flatcarServiceName)

manifest := &systemd.Manifest{}
manifest.Set("Unit", "Description", "Disable OS Update Scheduler")
Expand Down
2 changes: 1 addition & 1 deletion pkg/kubemanifest/visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (m *visitorBase) VisitFloat64(path []string, v float64, mutator func(float6
}

func (m *visitorBase) VisitMap(path []string, v map[string]interface{}) error {
klog.V(10).Infof("object value at %s: %f", strings.Join(path, "."), v)
klog.V(10).Infof("object value at %s: %v", strings.Join(path, "."), v)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/nodeidentity/openstack/identify.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (i *nodeIdentifier) IdentifyNode(ctx context.Context, node *corev1.Node) (*
case kops.InstanceGroupRoleAPIServer:
labels[nodelabels.RoleLabelAPIServer16] = ""
default:
klog.Warningf("Unknown node role %q for server %s(%d)", value, server.Name, server.ID)
klog.Warningf("Unknown node role %q for server %s(%s)", value, server.Name, server.ID)
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/nodeidentity/scaleway/identify.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (i *nodeIdentifier) IdentifyNode(ctx context.Context, node *corev1.Node) (*
case kops.InstanceGroupRoleAPIServer:
labels[nodelabels.RoleLabelAPIServer16] = ""
default:
klog.Warningf("Unknown node role %q for server %s(%d)", role, server.Name, server.ID)
klog.Warningf("Unknown node role %q for server %s(%s)", role, server.Name, server.ID)
}

info := &nodeidentity.Info{
Expand Down
6 changes: 3 additions & 3 deletions protokube/cmd/protokube/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,20 +189,20 @@ func run() error {
gossipName := cloudProvider.InstanceID()
gossipSeeds, err := cloudProvider.GossipSeeds()
if err != nil {
klog.Errorf("error finding gossip seeds: %w", err)
klog.Errorf("error finding gossip seeds: %v", err)
}

channelName := "dns"
gossipState, err := gossiputils.GetGossipState(gossipProtocol, gossipListen, channelName, gossipName, []byte(gossipSecret), gossipSeeds)
if err != nil {
klog.Errorf("error initializing gossip: %w", err)
klog.Errorf("error initializing gossip: %v", err)
os.Exit(1)
}

if gossipProtocolSecondary != "" {
secondaryGossipState, err := gossiputils.GetGossipState(gossipProtocolSecondary, gossipListenSecondary, channelName, gossipName, []byte(gossipSecretSecondary), gossipSeeds)
if err != nil {
klog.Errorf("error initializing secondary gossip: %w", err)
klog.Errorf("error initializing secondary gossip: %v", err)
os.Exit(1)
}
gossipState = &gossiputils.MultiGossipState{
Expand Down
2 changes: 1 addition & 1 deletion upup/pkg/fi/cloudup/awstasks/iamrole.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func (s *IAMRole) CheckChanges(a, e, changes *IAMRole) error {

func (_ *IAMRole) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *IAMRole) error {
if e.RolePolicyDocument == nil {
klog.V(2).Infof("Deleting IAM role %q", a.Name)
klog.V(2).Infof("Deleting IAM role %q", fi.ValueOf(a.Name))

var attachedPolicies []*iam.AttachedPolicy
var policyNames []string
Expand Down

0 comments on commit 3597bdd

Please sign in to comment.