Skip to content

Commit

Permalink
Merge pull request #3 from Tencent/dev_wesley
Browse files Browse the repository at this point in the history
minor: adjust k8s-watch in makefile and numactl-devel in docs
  • Loading branch information
DeveloperJim committed Apr 30, 2019
2 parents 7f3bb7b + 70f798e commit 58d9bc2
Show file tree
Hide file tree
Showing 22 changed files with 53 additions and 45 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
*.DS_Store
.idea/
build/
vendor/github.com/Sirupsen/Sirupsen
vendor/github.com/Nvveen/Gotty/
vendor/github.com/bitly/go-simplejson/
vendor/github.com/coredns/coredns/
Expand Down
17 changes: 9 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ CONFPATH=./build/bcs.${VERSION}/conf
COMMONPATH=./build/bcs.${VERSION}/common
EXPORTPATH=./build/api_export

# options
default:api dns health client storage check executor driver mesos_watch scheduler loadbalance k8s_watch kube_agent api_export
specific:api dns health client storage check executor driver mesos_watch scheduler loadbalance metricservice metriccollector exporter k8s_watch kube_agent api_export hpacontroller

# tag for different edition compiling
inner:
$(MAKE) default bcs_edition=inner_edition
$(MAKE) specific bcs_edition=inner_edition
ce:
$(MAKE) default bcs_edition=communication_edition
$(MAKE) specific bcs_edition=communication_edition
ee:
$(MAKE) default bcs_edition=enterprise_edition

# options
default:api dns health client storage check executor driver mesos_watch scheduler loadbalance metricservice metriccollector exporter k8s_watch kube_agent api_export hpacontroller
$(MAKE) specific bcs_edition=enterprise_edition

clean:
rm -rf ./build
Expand Down Expand Up @@ -125,8 +126,8 @@ hpacontroller:pre

k8s_watch:pre
mkdir -p ${BINARYPATH}/bcs-k8s-watch
go build ${LDFLAG} -o ${BINARYPATH}/bcs-k8s-watch/bcs-k8s-watch ./bcs-k8s/k8s-watch/main.go
cp ./bcs-k8s/k8s-watch/Dockerfile_new ${BINARYPATH}/bcs-k8s-watch/Dockerfile
go build ${LDFLAG} -o ${BINARYPATH}/bcs-k8s-watch/bcs-k8s-watch ./bcs-k8s/bcs-k8s-watch/main.go
cp ./bcs-k8s/bcs-k8s-watch/Dockerfile_new ${BINARYPATH}/bcs-k8s-watch/Dockerfile

api_export:pre
mkdir -p ${EXPORTPATH}
Expand Down
14 changes: 7 additions & 7 deletions bcs-k8s/bcs-k8s-watch/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ import (

"bk-bcs/bcs-common/common/types"
bcsVersion "bk-bcs/bcs-common/common/version"
"bk-bcs/bcs-k8s/k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/k8s-watch/app/k8s"
"bk-bcs/bcs-k8s/k8s-watch/app/options"
"bk-bcs/bcs-k8s/k8s-watch/app/output"
"bk-bcs/bcs-k8s/k8s-watch/app/output/action"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/k8s"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/options"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/action"

global "bk-bcs/bcs-common/common"
glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-common/common/metric"
disbcs "bk-bcs/bcs-k8s/k8s-watch/pkg/discovery/bcs"
disreg "bk-bcs/bcs-k8s/k8s-watch/pkg/discovery/register"
disbcs "bk-bcs/bcs-k8s/bcs-k8s-watch/pkg/discovery/bcs"
disreg "bk-bcs/bcs-k8s/bcs-k8s-watch/pkg/discovery/register"
)

var globalStopChan = make(chan struct{})
Expand Down
2 changes: 1 addition & 1 deletion bcs-k8s/bcs-k8s-watch/app/bcs/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-common/common/ssl"
"bk-bcs/bcs-common/common/types"
"bk-bcs/bcs-k8s/k8s-watch/app/options"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/options"
)

type ClusterKeeperResponse struct {
Expand Down
2 changes: 1 addition & 1 deletion bcs-k8s/bcs-k8s-watch/app/bcs/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"bk-bcs/bcs-common/common/RegisterDiscover"
glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-common/common/types"
"bk-bcs/bcs-k8s/k8s-watch/app/options"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/options"
"strings"
)

Expand Down
2 changes: 1 addition & 1 deletion bcs-k8s/bcs-k8s-watch/app/healthz.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-common/common/ssl"

"bk-bcs/bcs-k8s/k8s-watch/app/options"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/options"
)

type HealthChecker struct {
Expand Down
6 changes: 3 additions & 3 deletions bcs-k8s/bcs-k8s-watch/app/k8s/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import (
"k8s.io/client-go/rest"

glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-k8s/k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/k8s-watch/app/options"
"bk-bcs/bcs-k8s/k8s-watch/app/output"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/options"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output"
)

// =================== interface & struct ===================
Expand Down
4 changes: 2 additions & 2 deletions bcs-k8s/bcs-k8s-watch/app/k8s/exportservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import (
"k8s.io/api/extensions/v1beta1"
"k8s.io/apimachinery/pkg/util/intstr"

"bk-bcs/bcs-k8s/k8s-watch/app/output"
"bk-bcs/bcs-k8s/k8s-watch/app/output/action"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/action"

commtypes "bk-bcs/bcs-common/common/types"
lbtypes "bk-bcs/bcs-common/pkg/loadbalance/v2"
Expand Down
6 changes: 3 additions & 3 deletions bcs-k8s/bcs-k8s-watch/app/k8s/synchronizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
jsoniter "github.com/json-iterator/go"

glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-k8s/k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/k8s-watch/app/output/action"
"bk-bcs/bcs-k8s/k8s-watch/app/output/http"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/action"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/http"
)

type Synchronizer struct {
Expand Down
4 changes: 2 additions & 2 deletions bcs-k8s/bcs-k8s-watch/app/k8s/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ import (
//"k8s.io/api/apps/v1beta2"

glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-k8s/k8s-watch/app/output"
"bk-bcs/bcs-k8s/k8s-watch/app/output/action"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/action"
)

// =================== interface & struct ===================
Expand Down
4 changes: 2 additions & 2 deletions bcs-k8s/bcs-k8s-watch/app/output/action/alertor.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-common/common/version"

"bk-bcs/bcs-k8s/k8s-watch/app/options"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/options"

//"bk-bcs/bcs-k8s/k8s-watch/app/output/action"
//"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/action"
"k8s.io/api/core/v1"
)

Expand Down
2 changes: 1 addition & 1 deletion bcs-k8s/bcs-k8s-watch/app/output/action/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/json-iterator/go"

glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-k8s/k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/bcs"
)

type LogAction struct {
Expand Down
4 changes: 2 additions & 2 deletions bcs-k8s/bcs-k8s-watch/app/output/action/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package action
import (
glog "bk-bcs/bcs-common/common/blog"

"bk-bcs/bcs-k8s/k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/k8s-watch/app/output/http"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/http"
)

type StorageAction struct {
Expand Down
2 changes: 1 addition & 1 deletion bcs-k8s/bcs-k8s-watch/app/output/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"k8s.io/apimachinery/pkg/util/wait"

glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-k8s/k8s-watch/app/output/action"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/action"
)

// =================== interface & struct ===================
Expand Down
2 changes: 1 addition & 1 deletion bcs-k8s/bcs-k8s-watch/app/output/http/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (
glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-common/common/ssl"
"bk-bcs/bcs-common/common/types"
"bk-bcs/bcs-k8s/k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/bcs"
)

type Client interface {
Expand Down
2 changes: 1 addition & 1 deletion bcs-k8s/bcs-k8s-watch/app/output/http/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package http
import (
"testing"

"bk-bcs/bcs-k8s/k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/bcs"
)

func TestGetURL(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions bcs-k8s/bcs-k8s-watch/app/output/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"k8s.io/apimachinery/pkg/util/wait"

glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-k8s/k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/k8s-watch/app/output/action"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/bcs"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app/output/action"
)

// writer queue -> handler queue -> action func
Expand Down
4 changes: 2 additions & 2 deletions bcs-k8s/bcs-k8s-watch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (

"github.com/spf13/pflag"

"bk-bcs/bcs-k8s/k8s-watch/app"
"bk-bcs/bcs-k8s/k8s-watch/pkg/util/basic"
"bk-bcs/bcs-k8s/bcs-k8s-watch/app"
"bk-bcs/bcs-k8s/bcs-k8s-watch/pkg/util/basic"

glog "bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-common/common/conf"
Expand Down
2 changes: 1 addition & 1 deletion bcs-k8s/bcs-k8s-watch/pkg/discovery/bcs/leaderelection.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ package bcs

import (
"bk-bcs/bcs-common/common/blog"
"bk-bcs/bcs-k8s/k8s-watch/pkg/discovery/register"
"bk-bcs/bcs-k8s/bcs-k8s-watch/pkg/discovery/register"
"fmt"

"github.com/json-iterator/go"
Expand Down
3 changes: 1 addition & 2 deletions bcs-services/bcs-client/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"bk-bcs/bcs-services/bcs-client/cmd/get"
"bk-bcs/bcs-services/bcs-client/cmd/inspect"
"bk-bcs/bcs-services/bcs-client/cmd/list"
"bk-bcs/bcs-services/bcs-client/cmd/metric"
"bk-bcs/bcs-services/bcs-client/cmd/offer"
"bk-bcs/bcs-services/bcs-client/cmd/template"
"bk-bcs/bcs-services/bcs-client/cmd/update"
Expand All @@ -53,7 +52,7 @@ func main() {
list.NewListCommand(),
inspect.NewInspectCommand(),
get.NewGetCommand(),
metric.NewMetricCommand(),
//metric.NewMetricCommand(),
deployment.NewCancelCommand(),
deployment.NewPauseCommand(),
deployment.NewResumeCommand(),
Expand Down
7 changes: 6 additions & 1 deletion docs/install/source_compile.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ mkdir -p $GOPATH/src #为GOPATH新建源代码存放路径
## 编译环境

- golang >= 1.11.2
- numactl-devel >= 2.0.9

``` shell
sudo yum install numactl-devel -y
```

## 源码下载

Expand Down Expand Up @@ -39,5 +44,5 @@ source ./scripts/env.sh

### 编译
``` shell
make
make -j
```
2 changes: 1 addition & 1 deletion install/community_edition/service/#etc#bcs#api.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"local_ip": "__LAN_IP__",
"bkiam_auth": {
"auth": false,
"bkiam_auth_host": "__IAM_SERVER_HOST__",
"bkiam_auth_host": "http://__IAM_HOST__",
"bkiam_auth_app_code": "__APP_CODE__",
"bkiam_auth_app_secret": "__APP_TOKEN__"
},
Expand Down

0 comments on commit 58d9bc2

Please sign in to comment.