Add basic Make
This commit is contained in:
parent
e550ac0e0d
commit
d6a962cb39
9
Makefile
Normal file
9
Makefile
Normal file
@ -0,0 +1,9 @@
|
||||
all: build
|
||||
|
||||
.PHONY: fmt
|
||||
fmt: ## Run go fmt against code.
|
||||
go fmt ./...
|
||||
|
||||
.PHONY: build
|
||||
build: fmt
|
||||
go build -ldflags "-s -w" -o build/etcdhelper etcdhelper.go
|
@ -259,8 +259,8 @@ func changeProviderId(client *clientv3.Client, nodeName, providerId string) erro
|
||||
fmt.Printf("get key %s %s\n", nodeKey, err)
|
||||
}
|
||||
|
||||
obj, _, _ := decoder.Decode(resp.Kvs[0].Value, nil, nil)
|
||||
node := obj.(*v1.Node)
|
||||
obj, _, _ := decoder.Decode(resp.Kvs[0].Value, nil, nil)
|
||||
node := obj.(*v1.Node)
|
||||
|
||||
if node.Name == nodeName {
|
||||
fmt.Printf("%s %s > %s\n", nodeKey, node.Spec.ProviderID, providerId)
|
||||
@ -277,7 +277,6 @@ func changeProviderId(client *clientv3.Client, nodeName, providerId string) erro
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user