Skip to content

Latest commit

 

History

History
63 lines (62 loc) · 1.91 KB

dev-readme.md

File metadata and controls

63 lines (62 loc) · 1.91 KB

what it is

ALB (Alauda Load Balancer). a load balancer base on openresty which run in k8s. sometimes we use the same term alb2.

project struct

@startmindmap
* alb
** .build             (ci配置)
** cmd
*** operator          (operator的入口)
*** controller        (alb controller的入口)
*** utils             (一些工具binary)
**** sync_rbac        (更新rbac相应的yaml)
**** tweak_gen        (生成默认的configmapyaml)
** config             (alb controller使用的config [应该迁移到pkg下])
** controller         (alb controller的代码 [应该迁移到pkg下])
** pkg
*** alb
*** apis              (自动生成的alb clientapi)
*** client            (自动生成的alb clientclient)
*** config            (operatoralb controller通用的配置解析相关的逻辑)
*** operator
** scripts            (alb开发/debug/测试相关的actions)
** template           (openrestylua代码)
*** lua 
*** test              (lua的测试)
** test               (e2e测试)
** deploy             (部署所需要的chart)
*** chart             (alb-operatorchart)
*** resource          (生成chart,部署相关的一些资源)
** Dockerfile
** Dockerfile.local   (本地测试用,快速build一个albdocker)
** run-alb.sh         (alb docker内的启动脚本)
@endmindmap

image file struct

@startmindmap
* /alb/
** nginx/
*** /run     (volumed empty dir)
*** lua/
** ctl/
*** alb
** tools/
*** tweak_gen
** tweak/
* /etc/alb2/nginx/ (volume alb容器和nginx容器共享)
** nginx.conf
** policy.new
** nginx.pid
@endmindmap

lint

follow by ./scripts/alb-lint-actions.sh

git repo

https://gitlab-ce.alauda.cn/container-platform/alb2

code style

  • 所有的code style规则都必须以lint体现,否则不是必须要遵循的
  • fix all lint warning
    • cspell check
  • keep same package alias in all go file
  • use snake_case in fn_name var_name (keep cspell happy)