bcs-k8s-watch

command
v1.19.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 7 Imported by: 0

README

bcs-k8s-watch

TODO

  1. for resource (not event), should get a buffer, fow 5 seconds, update once
  2. have add health check, but I don't think it is a good idea to use liveness probe in static pod if the apiserver down, apiserver make alarm, not via datawatch

data flow

datawatch -> filter -> writer -> handler -> action -> cc

DONE

  • 实现list-watch监控k8s原生资源, 并汇总上报到storage(http or https)
  • 实现与bcs相关系统交互, zk操作, 获取clusterkeeper/storage地址, 获取clusterID
  • 实现资源定期同步逻辑

TODO

  • 高可用部署方案
  • 上报 LB 相关数据
  • 异常事件上报到bcs-health, 发送告警
  • 补全单元测试

components

  • main.go - enterance
  • app/bcs - access to other bcs components
  • app/http - http client
  • app/k8s - k8s resourcce list-watch
  • app/output - output to log or storage, writers and handlers
  • app/output/action - specific output action
  • app/app.go - Run, start cluster/writer

dependency

test

https://github.com/astaxie/build-web-application-with-golang/blob/master/zh/11.3.md

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
app
bcs
k8s
pkg
kubefed/apis
Package apis contains Kubernetes API groups.
Package apis contains Kubernetes API groups.
kubefed/apis/core
Package core contains core API versions
Package core contains core API versions
kubefed/apis/core/v1alpha1
Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/kubefed/pkg/apis/core +k8s:defaulter-gen=TypeMeta +groupName=core.kubefed.io
Package v1alpha1 contains API Schema definitions for the core v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/kubefed/pkg/apis/core +k8s:defaulter-gen=TypeMeta +groupName=core.kubefed.io
kubefed/apis/core/v1beta1
Package v1beta1 contains API Schema definitions for the core v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/kubefed/pkg/apis/core +k8s:defaulter-gen=TypeMeta +groupName=core.kubefed.io
Package v1beta1 contains API Schema definitions for the core v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/kubefed/pkg/apis/core +k8s:defaulter-gen=TypeMeta +groupName=core.kubefed.io
kubefed/apis/multiclusterdns
Package multiclusterdns contains multiclusterdns API versions
Package multiclusterdns contains multiclusterdns API versions
kubefed/apis/multiclusterdns/v1alpha1
Package v1alpha1 contains API Schema definitions for the multiclusterdns v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/kubefed/pkg/apis/multiclusterdns +k8s:defaulter-gen=TypeMeta +groupName=multiclusterdns.kubefed.io
Package v1alpha1 contains API Schema definitions for the multiclusterdns v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/kubefed/pkg/apis/multiclusterdns +k8s:defaulter-gen=TypeMeta +groupName=multiclusterdns.kubefed.io
kubefed/apis/scheduling
Package scheduling contains scheduling API versions
Package scheduling contains scheduling API versions
kubefed/apis/scheduling/v1alpha1
Package v1alpha1 contains API Schema definitions for the scheduling v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/kubefed/pkg/apis/scheduling +k8s:defaulter-gen=TypeMeta +groupName=scheduling.kubefed.io
Package v1alpha1 contains API Schema definitions for the scheduling v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=sigs.k8s.io/kubefed/pkg/apis/scheduling +k8s:defaulter-gen=TypeMeta +groupName=scheduling.kubefed.io
kubefed/apis/types
Package types contains types API versions
Package types contains types API versions
kubefed/apis/types/v1beta1
Package v1beta1 contains API Schema definitions for the types v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=kubefed_crd/pkg/apis/types +k8s:defaulter-gen=TypeMeta +groupName=types.kubefed.io
Package v1beta1 contains API Schema definitions for the types v1beta1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=kubefed_crd/pkg/apis/types +k8s:defaulter-gen=TypeMeta +groupName=types.kubefed.io
kubefed/client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
kubefed/client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
kubefed/client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
kubefed/client/clientset/versioned/typed/core/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
kubefed/client/clientset/versioned/typed/core/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
kubefed/client/clientset/versioned/typed/core/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
kubefed/client/clientset/versioned/typed/core/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
kubefed/client/clientset/versioned/typed/multiclusterdns/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
kubefed/client/clientset/versioned/typed/multiclusterdns/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
kubefed/client/clientset/versioned/typed/scheduling/v1alpha1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
kubefed/client/clientset/versioned/typed/scheduling/v1alpha1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
kubefed/client/clientset/versioned/typed/types/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
kubefed/client/clientset/versioned/typed/types/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL